Archive for the ‘Programming’ Category

NetBeans 6.0 – First Impressions

Posted on December 30th, 2007 by Dalton Filho

Finally, after some RCs that didn’t quite make it for me, NetBeans 6.0 (production release) has definitely won me over. These are my first impressions:

  • Editor – code font and colors are not always updated when I change settings on the Font & Color dialog. For example: if I change the field color, I have to reopen the code to see the changes. Font & Color settings weren’t imported from my NB 5.5 settings, even though I’ve chosen to do so when I first opened NB 6.0. This is a minor issue that should be fixed soon;
  • MUCH better CSS support – clicking on a CSS rule updates a “Style Builder” form where you can change font, background, border and other settings plus a window where you can preview the style. That means much less dependency on tools like Dreamweaver;
  • Javascript support – in NB 5.5 I had to use a plugin for Javascript code completion, which is now native to NB 6.0. To make things even better, you can see the minimum DOM version to use every function. With the widespread use of Javascript libraries like Prototype and Scriptaculous, I would like NB to parse all the Javascript files in my project just like it’s currently done with Java files. That would yield a better code completion support for Javascript;
  • Easier encoding configuration – if you ever moved your code across different OSes and saw your “é” become a “?”, you know encoding is something you have to care about. It would be easy to write an entire project in NB 5.5 and forget that because the encoding option is so well hidden within the advanced options inside the options dialog. Now you can easily set the encoding for the project in a more intuitive manner by simply choosing a value in a combo box that is inside the very first page of the project options dialog;
  • Cool Code insertion – I remember I was once bashed in a forum for requesting method delegate facilities in the Java language. Maybe we’re not quite there yet, but NB 6.0 now features a code insertion facility that makes it easy to proxify methods of objects that your class contains. Just press Alt + Insert and choose “Delegate method…”

JAI saves the day

Posted on December 23rd, 2007 by Dalton Filho

A while ago I was working on a new feature of a CG project that involved loading hundreds of textures from disk. So far, so good. The images, however, were like an order from the devil: I needed RGBA images, but the images were all in BMP format (no chance for alpha channels) and splitted. How great is that?! To solve this problem, I had two alternatives: the first was joining and converting the images manually. If you consider the ammount of images (422) and the average time to join and convert them (aprox. 3 minutes), that would take more than 21 hours (assuming the bore factor wouldn’t spoil my productivity in the meanwhile). Fortunately, there was a second alternative: automating the whole process. As I could not find a program that could supply my very specific need, I knew I had to make a little program for that, and there came JAI for the rescue.