Friday Aug 12, 2005

NetBeans and FIXME's (and other notes to self)

We recently went through the process of scrubbing our code, that is looking for comments in the code which shouldn't be in a released product. The comments generally start off with FIXME, TODO, and XXX, although they can include anything (I usually start mine with my login id. That way I know its my comment). NetBeans has a couple of tools you can use to easily find all of the 'notes to self' in your source code. The first is the 'To Do' window. If you go to the Window menu, you can select the 'To Do' window (Ctrl-6 for you keyboarders). Once selected, you'll see a window display at the bottom of the NetBeans window which takes the entire width of the window. You'll see 'Current File', 'Opened Files', and 'Selected Folder' tabs. If you have any notes in the file which currently has focus, you'll see them listed. You can select the 'Opened Files' tab to see a list of all of the notes in all of the files which you have open. You can also select the 'Selected Folders' tab and specify a folder. Doing so will give you a list of all the files in and beneath that directory which contain notes. Double-clicking on any line will take you to the line in the correct file. BTW, you can also specify custom text as being 'notes'.

Another tool is the Error Stripe. I recently installed this cool tool by updating my NetBeans 4.1 installation. This displays a vertical bar along the right side of the text editor. If all is well with the current file your displaying, you'll see a small green square at the top of the Error Stripe indicating everything is OK. If you see a red square, you have errors in your file . You can hover the mouse over the square and a popup indicating the number of errors is displayed. If you have errors (e.g. cannot find symbol), you'll see red horizontal stripes in the Error Stripe. If you see a blue horizontal stripe, this indicates you have a note to yourself. The Error Stripe displays these dispersed up and down the Error Stripe to give you and indication of how far down the error is. If you move the mouse over a stripe, the cursor will change to a pointer. You can single click on the stripe and NetBeans will take you to the issue. The Error Stripe gives you a good visual indication of issues with your file.

Thursday Aug 11, 2005

Opera Ships Opera Mini J2ME Browser

Opera has done a real good business making money shipping "commodity" browsers. In fact, I recently read an article in Business 2.0 on Opera and how well they're doing selling browsers for small devices. They recently annouced their Opera Mini Browser for J2ME enabled devices. What makes Opera Mini different from the Opera Mobile Browser is that Opera Mini gets its web pages from a remote server, which pre-processes the web page before sending it to the device. This makes your web experience better because you don't spend more money shipping across a lot of information you don't need on a small device and you don't waste your time trying to decipher a web page targetted for a desktop while browsing on a mobile device. Upon looking at the FAQ's, I noticed that they don't list specific devices in their requirements list, only that the device support Java and GPRS Internet connections. This is a real testament to the power of the Java platform's Write Once Run Anywere feature. With all of the various mobile devices out there, Opera only needs to write their browser once in Java. Opera states the browser is free, but you need to access it through your operator...and by the way, it's only available in Norway right now. I hope this provides a better surfing experience then I currently have on my mobile device.

Wednesday Aug 10, 2005

Apache Derby To Full Project Status

Recently, the Apache Derby project (a sub-project of the Apache DB project) went from incubator status to project status. This occured in part because Sun voiced backing for the project and is committing people to work on the project. To be a full project, not an incubator project, a project needs to have backing from more then one vendor. For those of you who don't know, Derby is a database, written entirely in Java, and was submitted to the Apache Software Foundation about a year ago by IBM. Derby came from IBM's Cloudscape acquisition. It looks like Sun will use Derby in various Java technologies. Considering Derby is designed to be an embedded database, and not a "database server" ala Oracle's flagship product, I think it will have some good applications in the J2ME CDC space.

Tuesday Aug 09, 2005

Soccer On Your J2ME Phone

EA Sports is close (October) to releasing FIFA Soccer 2006 on J2ME phones. I read this article which statest the graphics on this game are pretty amazing. You can pick from 32 international teams using full rosters. You can pick your 11 starters and make adjustments during the game. Play mimics the console version fairly closely, but to play you'll need both hands (probably the right thing to do when playing a more involved game). You can "pan the camera" and even save parts of a game for replay. Although I'm not a soccer fan, this game looks pretty good.

Monday Aug 08, 2005

Performing a Find in NetBeans

One of the features I like about Emacs is being able to go to a shell and perform a search. I usually use the find command. This lets me find things using wildcards and to perform a search within the found files. Now that I'm using NetBeans, I needed to learn how to search using NetBeans. The way I do this is to highlight the top level directory in which I want to search. I usually use the Favorites list for this. I then hit 'Ctrl-F' or right click on the mouse and choose 'Find' from the menu if I have the mouse in my hand...which I ususally do since I need to select the correct directory. The Find dialog displays.

To search for data within a file, enter your criteria in the 'Full Text' tab (the first tab in the dialog).

To search for a Java file with a specific name, go to the next tab entitled 'Object Name'. For you keyboarders out there, you can hit 'Ctrl-Page Down'. Enter the name of the file \*without the .java extension\*. NetBeans knows this is a managed object and it knows what type of object is being searched for (we'll get to that next), so it already knows the extension.

Next, go to the 'Type' tab. To select 'Java Source Objects', the selection you want, I usually hit the 'J' key 6 times and it is highlighted. The last thing to do is hit 'Enter' and the search will start. You'll see the 'Search Results' window display and let you know if it found anything. Happy Searching!

Friday Aug 05, 2005

Sony's VHS to DVD machine

Sony sells the Sony DVDirect VRD-VC20 machine, which transfers your VHS and camcorder tapes to DVD. A machine like this has been out for a while, but this is a new version of the box. The big advantage is that you don't have to deal with your PC to transfer videos from VHS to DVD, the machine does everything for you. You can hook your VCR directly up to the machine, or if you have a camcorder, you can hook the camcorder up to the DVDirect device and transfer directly from your camcorder to DVD. You can also hook up your computer if you want to do video editing before you burn the DVD. All this for under $300.

Thursday Aug 04, 2005

The Mozilla Corporation

There was an announcement today regarding a reorganization of the Mozilla Foundation. They've stated they're starting a Mozilla Corporation. I suppose in this day of "give the source code away for free and charge for support or a better version", it make sense that Mozilla would do this. On the web page they've dedicated to this issue, they state the corporation will "provide funds to support development, testing, and productization of the various Mozilla open source technologies". It appears the Mozilla Corporation will distribute Firefox and Thunderbird, but still give others the right to distribute Firefox and Thunderbird in accordance with the Mozilla trademark policy. They'll also make money by integrating various search engines into the product. There are no plans to charge for support or for the product. Most of the Mozilla Foundation "employees" (36) will move the new Mozilla Corporation. The Mozilla Foundation will still oversee the Mozilla open source projects.

I have no problem with them doing this, I just hope it doesn't scare off all of the engineers who have volunteered their time to make such great products and I hope they can continue to update it with new and inventive features..

Tuesday Aug 02, 2005

Interactive, Multimedia Self-Guided NYC Tours Using Your J2ME Enabled Phone

Racontours Inc. has released an interactive tour of NYC using your J2ME enabled phone. Take a tour of Central Park, Greenwich Village, Lower Manhattan, Soho, South Seaport and Washington Square. With the Voyager software, you can take a self-paced, self-guided tour of these areas. You can see images of how each of these areas looked in years past. One real advantage of this is you won't look like a tourist to the pick-pockets of the area, dealing with a fold-out map of NY. The software automatically adjusts itself to the device upon which it is running.

Central Park

Friday Jul 29, 2005

Roaming Messenger on J2ME

Roaming Messenger recently announced support for J2ME phones. In this article, they state "Now, with the support of J2ME MIDP 2.0 devices, the Company's breakthrough platform can support almost all of the new generation smart phones coming to market.". Roaming Messenger lets you send a roaming message, which can show up on one of your many devices. If you don't respond to the message, it will then go to the next device you have listed in your list until you're found or until another action is taken. J2ME let's Roaming Messenger build this application once and support the many different types of devices you may use: PC, laptop, PDA, cell phone, and others (e.g. police in-vehicle device).

Wednesday Jul 27, 2005

J2ME Version of WeatherBug

WeatherBug has released a Java version of its mobile WeatherBug program named WeatherBug Mobile. With WeatherBug, you can get live streaming local weather data, severe weather alerts, detailed forecasts, local radar, access live weather cameras, post and receive weather photos from other WeatherBug users, and customize your own weather reports...all on your J2ME enabled phone. This is pretty cool. You can pick the camera from which you want to see the image and prepare for your daily outing knowing what the climate will be like at your destination. Here are some sample images from the application.

Live Conditions
Live Cameras
Local Radar

Tuesday Jul 26, 2005

Google Maps Now Works with J2ME Phones

You can now use Google Maps with your J2ME enabled cell phone. The application is a 478KB Java application that can be downloaded via WAP from Mobile GMaps for free. This application is an independently built (not a Google product) application by Chrisitian Streng.

Friday Jul 15, 2005

NetBeans' Navigator Window

One feature of NetBeans I like is the ability to select the Inheritance View of the Navigator Window. This will display the SuperClasses and SuperInterfaces of the class at which you're looking.

Another nice feature of the Navigator Window is the fact that it displays the object type of a variable. I recently started reading new code on a project I'm working on. Having the object type listed in the Navigator Window saved me time by not requiring me to move to the variable declaration in the code to determine a variable type, then moving back to the code I was reading.

Tuesday Jun 21, 2005

Beautifying NetBeans Code

One of the first things I used to do when opening a file for editing is to beautify it. Beautifying (also called auto-indenting) is the process of indenting the lines of code in a file "properly", where properly means "to my liking". I say this because everyone has their own opinion of proper indenting, number of indentation spaces, using tabs or whitespace, putting the curly bracket at the end of a declaration line or at the beginning of the next line, etc. Of course, beautifying ends up causing a bunch of meaningless diffs if you diff the file with a previous "un-beautified" version, but it makes the file much more readable for me (and therefore, I'm more productive).

In Emacs, I use:

Ctrl X, H, Esc, Ctrl \\

'Ctrl X, H' highlights the entire file and 'Ctrl \\' beautifies it.

NetBeans supports the same feature. You don't need to highlight any code if you want to beautify the entire file. To beautify a subset of the file, you can hightlight the text you want using standard keys. To beautify the text hit 'Ctrl Shift F' (you can also hit the right mouse button and choose 'Reformat Code'). This will beautify your code according to your settings in the indentation engine used for the type of file your beautifying.

Tuesday Jun 14, 2005

Congratulations to the OpenSolaris Team!

Congratulations to the OpenSolaris Team for getting the long awaited OpenSolaris source code on the website. If you're interested, you can browse the source code using your web browser here.

I look forward to seeing how fares out in the world now that it has been released. It certainly doesn't have the momentum that Linux currently enjoys, but I do feel it is technically superior.

Friday Jun 10, 2005

Sony Ericsson's Java Platform Strategy

Here is a great article about how Sony Ericsson is embracing the J2ME platform for exactly what it was designed for, to remove the differences in the underlying device and OS. In it, Sony Ericsson states "The Java™ technology enabled handset and mobile games market is booming.", "there will be a total of about 2 billion mobile phone users in the world within the next year or so, of which, according to Ovum, there are today 450 million Java-enabled handsets globally), representing potentially the biggest platform for electronic games in the world". Sony Ericsson has released a couple of papers, including one to port BREW applications to J2ME. Also, there's a list of the Sony Ericsson devices and the Java technologies available on them at the bottom of the article.

If you're writing applications for mobile devices, check out J2ME.


Darryl Mocek


« July 2016