Friday, December 7, 2007

Most beautiful Swing look and feel

Its not Nimbus. Its not JGoodies or Substance. It is Synthetica - white vision look and feel.
Its plain beautiful and usable. I appled this to SQuirreL-SQL client and it is look so awesome that I had to blog about it. Here is a screenshot. Only gripe is that it has Vista folder icons for tree nodes.

Monday, December 3, 2007

Leopard-like toolbar buttons in Java Swing

Thanks to Java2D and Java 6 speed, it is easy and less-expensive to create modern User interfaces. Here is my attempt to create a "leopard", that is OS X 10.5 like buttons. This is fairly easy to create. For source you may check out my google project jSpent. (I haven't checked in the source for these yet. But soon I will, after some refactoring is done)

Thursday, November 8, 2007

Work in progress - my very rich swing application - part 5

Yet another close look:


Features added :
  • Rendering proper table header icon/color while sorting
  • Initial stages of OFX import
  • iTunes look
I am also working in building "leopard" like toolbar buttons. Once that is added, the application will be OS X 10.5 ready. But not sure when Apple is planning to give out Java 6 for OS X 10.5. I happen to be one of the lucky guys with Java 6 developer preview.

Saturday, November 3, 2007

Work in progress - my very rich swing application - part 4

Recently, I shifted focus from the "swing" factor. As I was building and polishing the application, I realized that most of my expenses are covered using my bank card. So, if the application just accepts journal entries, it is useful only to students and kids.
So, I started learning about the bank statement formats - yes, OFX - the open financial exchange format. The format is in SGML to my dismay - and there is NO SGML Parser in Java. SGML is a loosely structured but complex language to express data - and XML has replaced it in most fields. 
But anyway, I need to parse OFX. So, I turned to ANTLR - the excellent parser generator. I am in the initial stages of learning curve, but it is really interesting and simple. I think any student who is learning compiler theory should use ANTLR as the learning tool. Oh, coming back to my application - right now, the focus is on parsing only bank statements.

Friday, October 26, 2007

Leopard - No Java 6

So, I went, stood in line, got T-Shirt and checked out the latest and greatest OS X - Leopard at the Providence Apple store.
Ran a terminal and typed java -version.
Sad, but true, it returned version 1.5.
The java in OS X is officially still at 5, and no idea when apple will release Java 6. Btw, leopard looks way cool and pretty fast just like Tiger.

Wednesday, October 24, 2007

More to Awesomeness!!!!!!!

Came across http://www.goowy.com accidentally during a Google search and I was totally taken in!! This is an "on-line desktop", your own personal computer over the internet. They call it a "Web Top".
The user interface is so cool that it can compete with any modern desktop environments. The beauty is that you have all your apps - mail, calendar, chat, widgets of interest available on an online deskop no matter where or from what you are accessing it. Here is a screenshot from Firefox.

Thursday, October 18, 2007

This can not be considered as a blog. But however, I wanted to record this somewhere so that it gets picked up by search engines and provides a useful clue to a developer struggling with setting up IBM DB2 CLI (TYPE 2) JDBC XA Connection pool.
Scenario:
Setting up an XA Connection pool with "COM.ibm.db2.jdbc.DB2XADataSource"
Database server on remote host. You have IBM DB2 client installed.

Exception:
DB2 DSRA8100E: Unable to get a XAConnection from the DataSource
Root Exception:
[IBM][CLI Driver] SQL1032N No start database manager command was issued. SQLSTATE=57019

If you got this error, got to your command prompt and issue "DB2START" command.
This is a hidden action associated with CLI drivers to work. Hm!

Saturday, October 13, 2007

Where is leopard?

Where is Apple's new version of OS X? Its been a while since I heard anything about it and I eagerly check my regular Mac web resources for any updates. Looks like Apple is getting it ready - as per the last announcement, its release has to happen somewhere this month. 
No signs, whatever!
Anyway, I am not going to install Leopard unless it is absolutely necessary for latest Java 6. OS X tiger is the ultimate operating system on Desktop that one can imagine.

Work in progress - my very rich swing application - part 3

Writing UI has always been a very interesting task for me. Plus the very extensible java swing and java2d, it is instant gratification. Here is a screenshot of my application. Latest addition, iTunes like table, table header, light gray separator lines - yes that all matters in a UI. Have a look:

Thursday, October 11, 2007

My x12 syntax highlighter for vim/gvim

I have always been a big fan of "vi", "vim" and "gvim" - or any other tool like "vimdiff" that vim.org provides. If you are a little fast with the "qwerty" keyboard, vim is the editor for you. It is the least distracting and most extensible text editor available on all platforms.
So, it was time to contribute something for this great editor. I created my X12 syntax highlighter, a very basic syntax highlighting for ASC X12 files. Currently, I have covered most of the common segments used in health-care industry. Please feel free to use it if you use vim and deal with X12 files.

Sunday, September 30, 2007

Work in progress - my very rich swing application - Part 2

I got some "free" time over the weekend, and I made some good progress on my "very rich" swing application. Here is a screenshot for your viewing pleasure. On the course of my development I learned a lot of new Java Swing techniques. Thanks to the swing/UI design gurus like Romain Guy and John Lipsky.
I have added basic features of "CRUD" - create, read, updated and delete; so I will say that the application is in early beta stage. I am yet to finalize further requirements, ideas etc. If you have any suggestion, please post.

Wednesday, September 19, 2007

Work in progress - my very rich swing application

Here are screenshots of work in progress so far. Right now, the code is open and available under google project called "jSpent".
But be aware of the fact that the code is still in some primitive shape, requires some refactoring etc.

Here is screenshot from a windows
environment. Sad but true, java Swing ( Java 6) in Windows looks better than compared to OS X.

Monday, September 17, 2007

A simple plugin framework in Java

As part of my hobby project, I thought of coming up with some sort of a plug-in mechanism. Though I have worked in a "plug and play"-like J2EE project, I have never done a desktop application with plug-in nature.
I like the way plug-ins work in eclipse. Just extract your plug-ins in to a specific folder. So, my application also would have a similar plug-in mechanism.
Following is the way I have implemented the plug-in manager:

Get to plugins directory
For each file in plugins directory
If file ends with ".jar"
See if there is a plugin-manifest.xml inside the jar
If found read the XML and get data about the Plugin
Save plugin data to a list/map for future use
Add the jar to current classpath as plugin may be used.
End if
End if
End for

Tuesday, September 11, 2007

Putting together a modern UI using Java swing.

I had been working a lot with Java2D and graphics in my free time. So, when I thought of a little utility application for myself, I thought of applying all sorts of "Swing hacks" that I came across so far. Thanks to swing gurus like 'Roamin Guy' and 'John Lipsky', I am able to build somewhat beautiful UI. A lot of time is being spent in putting all the components together and testing while I am losing focus on the real task in my hand - building my little utility application. Hm.. some day I will build it. Here is a screenshot of the work so far for now.

Java has come a very long way in terms of UI and graphics performance. I am only an entry level programmer when it comes to graphics and swing painting. But this application is running pretty smooth on both windows and OS X and it only can be attributed to Java 6's performance.

Thursday, August 16, 2007

How to: Using thirdparty URLs in Netbean's Update center

In my free time, I was playing around with Netbeans and I wanted to add the JS and CSS editor plugins at http://www.liguorien.com/javascripteditor/#download to my Netbeans. I am impressed by the ease at which you can add a thirdparty update center to Netbeans. Here are the steps that I followed based on my intuition.

First, Know your URL. In this case, the URL was http://www.liguorien.org/download/jseditor/updates.xml

Launch the Options dialog. By Tools->Options menu.



This shows the Options dialog. Click on the "Advanced Options" as we are "advanced users".



In the advanced options dialog,
choose IDE Configuration/System/Audoupdate Types from the options tree on left hand side.



Add a new thirdparty update center. For this, right click on "Autoupdate Types". From the context(popup) menu, choose New->General Update Center.



A dialog appears that prompts for the 'update center name'. Enter a name that you will recognize. In my case, "JS and CSS tools".



Click on the "Finish" button and it will add a new node( with a globe icon) on the left hand tree under "Autoupdate Types". The name that you just gave will appear along with the node.
Click on the new node and it will open up a simple form on the right hand pane where you can insert details about the plugin/update that you are interested in. Fill values as required. In my case
Server URL: http://www.liguorien.org/download/jseditor/updates.xml
Enabled: checked(checkbox)



Close the dialog, close Options dialog and go back to main window.
Now, choose Tools->Update center from the main menu



This will show the update centers available. Note that your new update center is available in the list. Check that and proceed for your updates.



I was using Netbeans 5.5

Tuesday, July 31, 2007

Ruby? hmmmm!

Well, another day with Ruby and here is something that was bothering me right from day one.
If you have ever written something in Ruby, you might have noticed that Ruby is SLOW. I would go ahead and say that it is "pretty darn slow". May be this is the price you pay for all that 'syntactic sugar'?
A very simple bench mark - I created a class, added a to_s method, tried to print contents of the class, It took 10X time compared to Java 5 & Java 6 on Windows. 

Oh by the way, I have to check out if this is same in OS X too.

Monday, July 30, 2007

Attempts to learn Ruby

Long time since I seriously looked at a programming language. I was thinking of which one to select. Given all the hype around Ruby, I thought of studying Ruby in a structured way. Why I say "structured" is, because I have had enough dabbling experience with Ruby already. 
So, I came across this very interesting construct called "symbols" in ruby. It is just like a variable, a name that starts with a colon - ':'
For a clear understanding I read through a lot of forums about symbols, and all I found is that this is a very confusing idea for new comers. As you can see, Ruby symbols generated a 100+ post thread on the ruby-talk@ruby-lang.org mailing list - and some of them are really heated.
Anyway, my take for now about symbols is:
In ruby, if you say, "some double quoted string" a thousand times, ruby creates different objects for it. But if you use a "Symbol"-ised reference to it, as :"Some double quoted string", it is a symbol and it is created only once. This seems to be useful in places where you create hashes.
Anyway, I agree, this is not a very satisfying explanation of Symbols(or at least their usage). But for a Ruby newbie, this should hold good enough.

Monday, June 4, 2007

Status changed!

One month, and now, I am married. So, that explains the 1 month long silence! more to come soon..

Saturday, May 5, 2007

Hm! I had been very busy this week, did not get enough time to check my new mac book pro out. First, I was away in NYC on the weekend. The visit bled over to Monday and I was late to get to work, and the usual snafu followed. Anyway, here are my first impressions of mac book pro and OS X

Ups

  • Ease of use - things just work (may be it is so in Windows too;but prolonged use of Linux makes me say this)
  • Beauty - everything is beautiful
  • Scrollpad - very very very innovative way of user input
  • Speed - very fast, and very smooth graphics
  • Very sleek

Downs
  • Heat - the core duo gets hotter and the SMC fans wont cool it down until it is really hot. I can not think of using this in a country like India.
  • Font rendering - I find Apple's font rendering ( sub-pixel smoothed) a little inferior to Microsoft's Cleartype.

Saturday, April 21, 2007

A passing thought

As I am switching to Mac Book, I would like to register my high regards for IBM's T - Series Laptops - In "wintel" world, IBM is the best laptop one can get.
I had/have a T42p, pimped up with 2GB RAM; the computer came with default 7200RPM 60GB Hard drive and 2.0 GHZ Pentium M. Though the video card ( ATI FireGL Mobility T2) was kind of lower end, I happily completed "Far Cry" and "DOOM 3" on this laptop.
I just love the Hard shell, hinges and parts of IBM thinkpad, Minimalistic and professional design, innovative track button located above the 'B' Key, which is very very useful once you get used to it. I may miss this one in Mac.
Love you thinkpad!

Thursday, April 19, 2007

At last..

Today I ordered a 15" Mac Book Pro. Lately, I had been checking out so much of Apple related stuff, that I had to succumb to the temptation. I had been frequenting the Apple stores so many times - enough to create suspicion for the security guards.
Strange coincidence, Ubuntu has released their latest version of Linux - Feisty Fawn - today. Though Ubuntu being my favorite OS, I am not going to install this version. Instead, I am waiting to start my life on Mac. Anyway, this month on, my life is going to change in a big way :)
May be when Apple releases leopard in October and if it is very highly priced, I will think of dual booting Ubuntu on my pro.

Tuesday, March 20, 2007

Screencast - creating round gradient button in Inkscape

As promised, here is a demo of how to create professional grade rounded button for your website using Inkscape.
By the way, in order to create this video, I learned how to do screen recording in Ubuntu Linux. Well, soon I will post that how to :)

Thursday, March 15, 2007

How to create beautiful button using Inkscape

For the un-initiated, Inkscape is a very powerful, free, open source and friendly SVG graphic editor. When I was browsing around Apple's web store, I saw a beautiful "select" button. That is a typical apple-ish button with gradient and rounded edges. I did some research to find how to create such a nice button in Inkscape. I could create a nice professional looking button in a few minutes (not as good as Apple though). Here it is:


Watch for a step by step tutorial on how to create this - over the weekend.

Monday, March 5, 2007

The new way of technical presentation.

Recently, I came across a discussion on presentation and content delivery in the web 2.0(whatever that is) world.
With fast computing resources and huge availability of graphics and other media ( who cares about licenses anyway), the face of presentation has started changing.
If you are still stuck on the old way of textual/animated text presentations(PowerPoint, keynote or whatever), you should take a look at the presentations by Dick Hardt and Lawrence Lessig. Very innovative and capturing.
But the point is you cannot effectively convert any presentation in to this genre. Though you might succeed, the audience may not be ready yet to accept the quick and "on-your-face" mode of delivery. I guess this suits generic introduction kind of talks.

Monday, February 26, 2007

Pimpin' Netbeans UI in Linux (laptop)

This assumes you know how to do stuff around Netbeans and Linux.
I have the following in my Laptop.
Ubuntu Dapper Drake - Running GNOME 2.14 and Sun JDK 6.
Default X11 font rendering sucks a little. So, I applied sub-pixel smoothing patches.
I downloaded and started using Netbeans 5.5, which is pretty good. But by default it has the "Metal" look and feel, which is not very exciting. So, I decided to make Netbeans look "better".

I tried enabling the GTKLookAndFeel so that it looks native. But I must confess, the Java font rendering on GTKLookAndFeel is just plain horrible. My next choice for look and fee was JGoodies. JGoodies is a pretty neat and simple Look and feel library.

So, first you need JDK6 for better UI and Font rendering.
Download JGoodies look and feel and place the looks-2.1.3.jar in to your netbeans-5.5/core folder.

Now, edit your netbeans-5.5/etc/netbeans.conf file so that your netbeans_default_options value looks like :

netbeans_default_options="-J-Xms32m -J-Xmx384m -J-XX:PermSize=32m -J-XX:MaxPermSize=384m -J-Dswing.aatext=true -J-Xverify:none -J-DPlastic.defaultTheme=ExperienceBlue -J-DmarkContentBorders=true -laf com.jgoodies.looks.plastic.PlasticXPLookAndFeel -J-Dapple.laf.useScreenMenuBar=true"

Here, important lines are
  • J-DPlastic.defaultTheme=ExperienceBlue - this is a good theme on eyes
  • -laf com.jgoodies.looks.plastic.PlasticXPLookAndFeel - XP like look and feel.
  • -J-Dswing.aatext=true - Force font anti-aliasing options.

Start your netbeans with these options and it will look much better. But the tab headers are grayish and they look really horrible:

So, here is a fix for that. Download the tab header netbeans module from this site, and install it in your netbeans - by the following steps.

From Tools -> Module Manager, Click update button.
In Update center wizard, select Install manually selected downloads, and add and install the downloaded nbm module.



Restart your netbeans, and it should look pretty good. ( Here, I have included my Ubuntu Menu text to show how the font still sucks a bit)



Now, for editor font, get "Consolas" ( it is a Vista font so get it by hook or crook) and use it as your editor font. It looks nice - as nice as Apple's Monaco.

Sunday, February 25, 2007

Exploring the infinite

Lately, I have been doing some research in art, one of my passions. I am a big fan of impressionism and post-impressionism. I am equally intrigued by deception artists like Dali and the great M.C.Escher. So, with GIMP, I thought of taking a shot at my own version of Escher's self "repeating patterns" or the tessellations. Here it is. Yes, I agree it is very primitive - I did it on my laptop with 2hrs of effort - if that makes this look any better :)


Fish, bird and some weird lizard taking part in my tessellation.

Saturday, February 24, 2007

Java swing components library

Just a random bookmark post!
I came across JIDE http://www.jidesoft.com/
Ran an instant online web start demo! quite impressive.

Wednesday, February 7, 2007

Expensive software and yucky user interfaces

An interesting software tool that I came across last year is "Ascential datastage". This software is bought over by IBM and given some name change. This is basically a data integration software, that provides connectivity across wide platforms and has a handful of utility functions and adapters.
But there is an aspect that really sucks. Its UI. The "designer" UI is so cluttered that you feel like running away from it. It has umpteen number of docking windows that distract and confuse you. And a useless company banner image shining on top of the tool bar just takes away a lot of your screen real estate.( I figured you can disable this, but come on guys!). The integration flow designer's Icons are anything but user friendly. The stand alone components and the executable components has the same basic design. The only way to tell the apart is one is blue and the other is bluish gray! well, if your monitor is not tuned up well, you will never tell it apart. Just for example look at this dialog box that shows successful build.

Hell? what is that "Cancel" button for? Will it rollback all my builds and delete the target code generated? Why the heck this dialog has to be this big? and, why the heck you don't use some graphics to convey the result. They got to read the apple human Interface guidelines.

Monday, February 5, 2007

Best GNOME audio player

At last! a very robust audio player for GNOME.
Banshee. Go check it out. I installed it from source and it was a cake walk. Interestingly, this is written in mono ( the Open source implementation of MS dot net c#). I am a Java fan, but when it comes to interfacing with the powerful gstreamer engine, Mono is a little ahead of Java. Java do not have a JNI implementation layer on top of gstreamer as of today. It is very easy to build Banshee from source. RTFM at Banshee website and you are good to go.

Cool Features:
  1. Cool user interface
  2. iTunes and other player support
  3. Album art
  4. Tag filling
  5. Podcast support
  6. Music sharing
  7. Music recommendations
  8. A lot of plug-ins like: meta data search, Mini mode, Tray based player etc.

Banshee Still lacks the following. But these are not very necessary.
  1. Graphic equalizer
  2. DSP effects
  3. Funky skins(who needs it anyway while GNOME themes satisfy all your aesthetic whims)
  4. Funky Visualizations
Here is a screenshot from my desktop. Note that I am playing a song in my native tongue while Banshee is suggesting similar Indian singers and songs to me in the bottom panel...this is awesome. I haven't seen iTunes doing this yet.

Sunday, February 4, 2007

Phish proof

Dark forces that employ phishing occasionally use paypal email as their Trojan horse.
But there is a very easy way to identify between a "scam"-paypal email and the real paypal email. Original paypal email would have your first name and last name in the email body. Phishers would not have that information.
So, today, I saw yet another fake paypal email sitting in my inbox saying:

We have reason to believe that your account was accessed by a third party. Because protecting the security of your account is our primary concern, we have limited access to sensitive PayPal account features. We understand that this may be an inconvenience but please understand that this temporary limitation is for your protection.
To remove the limitation click on the following link:

Followed by a link. Just out of curiosity I clicked on that Link and my "Thunderbird" advised me not to follow the link. Here is a screen shot

And I did not have any intentions whatsoever to got to bubblewebdesign.ch and give away my paypal credentials.
So, my advice - Be smart.
Use smart tools like Firefox, gmail and thunderbird, that would alert you about such scams.

Sunday, January 28, 2007

My Favorite war movies

Time for some movie talk, I had been watching a lot of English movies. For this weekend, I chose some war movies. However, here is my fav. list.

  • Saving private Ryan
  • Black Hawk Down
  • Stalingrad
  • Apocalypse Now
  • The thin red line
  • Where eagles dare
  • And .. I am looking forward to catch - Das Boot, Letters from Iwo jima ..

Tuesday, January 9, 2007

Completely out of windows

It has been a while(2 months to be exact) since I started my computer in Windows XP.

Desktop - GNOME
Internet -
FireFox
Thunderbird (emails)
Gaim ( no Audio video chatting - I don't waste time on that anyway)
Office suite - OpenOffice.org (Document editor, Spreadsheet, presentation ...)
Text editing - Gvim
iPod management - gtkpod
Playing music - Rhythmbox, Amarok, ...
DVD/VCD/Movies - MPlayer, GXine, VLC
Dabase - My SQL.
Java - Sun's Java 1.6 - which ever is latest.
Flash - Flash Player 9 for Linux.
Acrobat reader/Document Viewer - for PDF
Inkscape - for SVG image creation
GIMP - for serious image editing

And above all, the cool feeling ...

Tuesday, January 2, 2007

Holiday gift from Bush and Co.

"deplorable" video of Saddam's execution
Why? why it has to be on at this particular time? as if someone had placed a bet saying 'Saddam will never see 2007' - may be it would make some sense to investigate if some betting mafia was involved behind this sudden and calculated 'punishment'.
Now that Saddam is done with, .. next in line please, uncle Sam wants your head.