Jun 8 2009

NetBeans 6.7 RC2

NetBeans 6.7 Release Candidate 2 was released recently and I already have it installed and running. It is also worth noting that several NetBeans related books came out in print just before JavaOne 2009.

In full disclosure, NetBeans is not my primary IDE. I mainly use Eclipse for Java development, sometimes Visual Studio for some C# projects, and occasionally Aptana Studio for Ruby and Rails applications… I probably use Komodo Edit more than NetBeans. In essence I am an IDE connoisseur. I use NetBeans for the sake of familiarizing myself it, for evaluating its features and plugins, and for rapid GUI prototyping.

That said, I am really impressed with NetBeans 6.7 and in particular NetBeans 6.5. NetBeans has very good out of the box support for Ruby, Groovy, and PHP. It has a good GUI Builder support out of the box, no additional plugins required. It also has Spring MVC, JavaServer Faces, Struts, Hibernate support out of the box as well. NetBeans 6.7 is definitely worth the download and install.

NetBeans 6.7 RC2

NetBeans 6.7 RC2

To help you get started with NetBeans, take a look at some of these recent books covering NetBeans and the NetBeans Platform.

Oct 20 2008

Develop Flash Applications with ActionScript and FlashDevelop

My abilities as an artist extends to drawing stick figures. Although this might be enough for internet comics such as xkcd, I always wanted to create complex geometric based artwork. I played around with Flash before, but I found many of the designer oriented concepts in the Flash authoring tool a bit to cumbersome for my programmer mindset. I didn’t want to start with a timeline, I wanted to start with a main method. Fortunately for programmers like me that want to dabble with Flash animations, Flash fully supports ActionScript, a programming language based on JavaScript. With Flash, I could write ActionScript programs that would create designs as precise as my programming abilities would dictate, not my drawing abilities. The only major drawback to using Flash, if it is not part of your job, is the is the price tag. The Flash CS4 authoring tool is priced well beyond my budget for Open Source projects, which is $0. Fortunately, FlashDevelop fits right between my price range.

FlashDevelop is a free and open source editor for Flex, Air, and ActionScript projects. FlashDevelop is a .NET project and has a look and feel similar to Visual Studio. To get started with FlashDevelop you will need to download the latest version of Flex SDK and FlashDevelop.

To configure FlashDevelop, you need to point to the location where you unzipped the Flex SDK. I typically unzip Open Source libraries under C:\OSDEV. Once FlashDevelop has been configured to point to the Flex SDK, you can create an ActionScript 3.0 project by going to Project | Create Project and selecting ActionScript 3.0 project from the project wizard.

FlashDevelop New Project

Creating a new project will create a project directory structure with a bin, lib, and src folders. Under the src folder there is an Main.as ActionScript file with the following scaffold code…

  import flash.display.Sprite;
  import flash.events.Event;

  * ...
  * @author DefaultUser (Tools -> Custom Arguments...)
  public class Main extends Sprite

    public function Main():void
      if (stage) init();
      else addEventListener(Event.ADDED_TO_STAGE, init);

    private function init(e:Event = null):void
      removeEventListener(Event.ADDED_TO_STAGE, init);
      // entry point

Inside the init function, below the comment ‘entry point’ you can add your custom ActionScript code. For example, to create the standard ‘Hello, World!’ example you can add the following code.

      var texty:TextField = new TextField();
      texty.text = "Holla, World!";
      texty.textColor =  0xFF00f0;

If you want to work with shapes here is an example to create a square and a circle.

      var shapely:Shape = new Shape();
      shapely.graphics.moveTo(0, 0);
      shapely.graphics.lineTo(100, 0);
      shapely.graphics.lineTo(100, 100);
      shapely.graphics.lineTo(0, 100);

      shapely.graphics.drawCircle(150, 150, 50);


Build the project and open launch the index.html file under the bin directory.

Technorati Tags: , , , , , , ,

Jul 9 2008

Microsoft DreamSpark

Even thought I am a Windows user, I am no where near a Microsoft lackey but recently I learned that Microsoft is giving away a ton of professional grade software to students. Through the Microsoft DreamSpark program, students can get access to Visual Studio 2008 Professional, Windows Server 2003 Standard Edition, Microsoft Expression Studio, XNA Studio, XNA Creators Club, SQL Server 2005, as well as other free software such as their express edition software. That is well over $1,500 of free software. I am typically not a Microsoft fanboy but I do have to give credit to Microsoft for making its development tools free of charge to students across the world. Now I wish Adobe would do the same.

Technorati Tags: , , , , , , ,

Jun 6 2008

Eclipse Tool Tip #7: Resource and Class Type Find

It is hard to keep track of all class files you may need to edit in large project, much less the package those classes reside in. When I need to lookup and inspect a class I use the Ctrl+Shirt+T to open the Open Type dialog. This dialog allows you to enter the class name, or a regular expression of the class name, and will list all classes available to your project that match your query. One good feature about the Open Type dialog is that for each class type that it does match, it will display the package, jar, and location where it found the type.

Eclipse Open Type

If you don’t want to open the the type in the default editor you can instead use the Ctrl+Shirt+H shortcut to open the selected type in the hierarchy view.

Instead of a class, if you need to quickly lookup a XML, JSP, Properties or other resource files you can use the Ctrl+Shirt+R shortcut key combination to launch the Open Resource dialog. You can pretty much query lookup all resources with the Open Resource.

Find this tool tip helpful, try the additional Eclipse Tool Tips.

Technorati Tags: , , , , , , ,

Mar 6 2008

iPhone and iPod Touch SDK

At a press conference earlier today, Apple released the much anticipated native SDK for the iPhone.

iPhone applications will be created using Cocoa. To develop native applications for the iPhone, developer will be using the XCode IDE and the newly released iPhone SDK and iPhone simulator. Third party applications will be made available through an iPhone App Store. The applications developed on the iPhone SDK also work on the iPod Touch.

The App Store is the exclusive distribution channel to deliver applications to the iPhone. From the press conference, it is reported that the developer picks the price of the application and get to keep 70% of the sales. The developer can release applications for free to the end user, Apple will not put charge fee for free applications.

The SDK is available right now, but the App Store might not be released to end users until sometime after June, perhaps in the next upgrade release of the iPhone kernel and software.

The iPhone SDK is free but Apple has a iPhone Developer Program starting at $99. At this point it is not entirely clear what you get from the iPhone Developer Program, but I imagine that you need to be in the program for you to actually sell your applications on the App Store.

At the press conference, John Doerr of the Kleiner Perkins Caufield & Byers venture capital firm said, “best way to predict the future is to invent it. At Kleiner, we say the second best way is to fund it.” Doerr announced a $100 million iFund to fund companies and ventures developing application for the iPhone and iPod touch.

Apple had a few demos at hand at the press conference, which all seemed to make use of the iPhone’s great touch ui, touch gestures, and accelerometer.

Back in July of last year, I was at the iPhone Dev Camp where I had a small part in developing Tilt, perhaps the first iPhone motioned controlled game for the iPhone. Having full access to the accelerometer and location data will open the possibilities for a wide array of new applications.

Prior to the SDK being freely available, the only option for custom applications for the iPhone was web development.

Technorati Tags: , , , , , , , ,

Jan 2 2008

Debugging Users and Invisible Characters

As a developer working for a startup with live software in the field, I often have to problem solve some interesting and out of the box bugs. One recent bug was related to changes to the Daylight Standard Time and Sun’s Java Timezone Updater, which is far from the control of my code. The Timezone Updater is a simple Java application that can be run as follows.

"c:\Program Files\Java\jre1.5.0_10\bin\java" -jar tzupdater.jar -f -bc

After documenting, testing, and validating the process of running the Timezone Updater from the command prompt we had our sales engineer upgrade the all of our clients’ JRE with the current timezone data. After some time we had reports that some clients had a problem running the above command, they where getting the following Java error.

Exception in thread "main" java.lang.NoClassDefFoundError: ûjar

It seemed that Java could not find a class named ujar (notice that funny hat over the u). Our sales engineer, with the aid of a software engineer, spent all day going back and forth with the client. As you might have guessed, updating the timezone data worked for our engineers but at the client site they consistently got the above error. After a long email thread full of instructions, screen shots, and frustration I was pull in.

I too was unable to reproduce the error until I considered the error. The only clue in the above error is the funny character u. After some time it occurred to me that the -jar had been corrupted into ujar. But what would distort the dash? Word. The instructions to run the Java Timezone Updater where written and sent in Outlook and cut and pasted from Outlook. Outlook uses Word as the default mail editor and Word has the awful tendency of distorting plain old ASCII text into special characters at will, try typing :) in Word.

This bug was not obvious to our client’s IT personnel, our front line sales engineer, and an experienced software engineer. Having code working on the developer’s machine is not a valid solution, software needs to work at the client’s site too!

One lesson that most developers don’t learn is to debug outside the debugger. As an engineer there are times you need to trouble shoot, problem solve, and debug not just your software from the comforts of your favorite IDE but the whole software stack, network, hardware, user’s environment, and even the user himself.

Every problem, issue, and bug experienced by the end user directly and indirectly with your software eventually needs to be implicitly and explicitly dealt with by your software development team. Bugs that are on the fringes of the code base are the most difficult to solve, that is why each member a software development team needs to take full ownership of the whole code base, and every known issue.

Technorati Tags: , , , , , ,