Friday, June 5, 2009

Afterall they're humans too!

Were there times when u get scared of your boss, faculty, giving presentations? Just remember this one thing, bottom line they're also humans...just like us. They have also made mistakes and must have been nervous at some point.

Just imagine yourself in their position. Would have just laughed it off wouldn't you? So just tell them whatever it is that you're so hesitant about. Want a pay raise...wouldn't agree with their ideas, SPEAK OUT! At the most what will happen? You may get fired or ridiculed at...but will always be happy that you did the RIGHT THING!...In the end its the satisfaction that matters.

Wednesday, May 27, 2009

My ideal desktop recipe

Don't know about others, but i sure am confused by the vast ocean of frameworks and libraries available out there to help aid in java desktop applications.

This blog is not about frameworks and libraries that offer the best functionality and power, but those that do with a faster learning curve.

Typically, these are the pain points you'll encounter (sooner or later) in a large desktop application.

  • Validation
  • Binding Pojo's with GUI
  • Database Management
  • Cool and sleek GUI
  • Code complexity
  • Packaging and deployment
  • Creating Trialware's

1) Validation

I never paid much attention initially, but validation is one aspect that tends to get laborious. There are popular validation frameworks out there to help you with it. But as a beginner you'll want to learn it quick and easy. I'd prefer the Simple Validation Api by Tim Boudreau. Powerful and simple at the same time. Hardly takes 10 minutes to learn.


2) Binding POJO's with GUI

In my opinion there is no good tool for data binding, its currently unstable and there's no out of the box support for it. Its usually more pain than gain. But if u insist i suggest that you use the Netbeans IDE, it features mattise GUI builder with binding support. It'd be nice if JComponent binds POJO via annotations. In either case be on a look out, some one is probably developing it right now.


3) Database Management

Wouldn't it be nice if you didnt have to write all the plumbing code required to execute a database transaction and just concentrate on the task itself? ORM's typically sheild you from all the database junk. Hibernate will probably be the first result if u ever tried to google. It however has a lot of XML mapping stuff to be done.

In my opinion, ActiveObjects orm by Daniel Spiewak is the easiest to use, i.e., in case u dont have distributed databases to deal with. It conpletely sheilds you from database complexity. The only disadvantage is that u need to create POJO interfaces first to generate the database schema . If you already have a database then you must create the interfaces yourself (no generator tool for now). A great feature worth noting is that it has Database Migrations (useful for maintenance).


4) Cool and sleek GUI

Get substance look and feel by Kirill Grouchnikov is an excellent option to spice up you UI. All you have to do is add one line of code. If you're on MAC OS consider Quaqua lnf. Also check out SwingX, Flamingo, L2fProd, JGoodies for cool swing components.

If you have time to spare and want some extreme GUI with cool animation effects consider using Animated Transitions Api and Timing Framework by Romain Guy and Chet Haase. I also suggest that you read Filthy Rich clients by the same authors.

For a quickie, with almost no learning curve u should use substance look and feel with SwingX components along with mattise in NetbeansIDE.


5) Code Complexity

Be it a small or a large project, a GUI application soon gets out of the hand or you'll find yourself handling messy code or writing lots of plumbing code instead of putting effort into the business logic of the application. There's no point in reinventing the wheel, its always better to reuse a well tested framework instead of making one on your own.

For a small scale application its better to use to use your own MVC pattern to separate model, view and control. Major concerns in such application would be to maintain configuration. You'll probably use bean property change listeners...in this case consider using AbstractSerializableBean from swingX project to reduce the amount of boilerplate code for firing property change. It your application still gets out of hand consider using JIDE Application framework...havent really tried it, but looks good and has a moderate learning curve (2-3 days)

For a large application it is best of you use Netbeans Platform, its pretty complex and has a high learning curve, i would'nt recommend it unless you want to reuse netbeans features such as pallete, property sheets and editors etc...but on the bottom line its got great support and excellent documentation. Since its developed by sun, you can expect great support. Moreover NetbeansIDE has lots of code completion features for leveraging a netbeans platform based application.

If you have at least made 5-6 desktop applications and have good knowledge of OOPS, especially the use of interfaces and abstract classes (read this post for information on abstract classes) then you must consider using the Netbeans platform. Start by viewing these excellent screencasts.


6) Packaging and deployment

Consider an application based on java comm api. In such an app, you cant ask your client to copy and paste dll's at different locations, this should instead be done automatically at the deployment time, typically by distributing a setup file. To encash the benefits of cross platform nature of your java code, you'll need to use a cross platform deployer. Again, there are many of them, the easiest one to use and learn is by using PackJacket, a GUI frontend to the IzPack project. It also lets you create runtime scripts to execute custom tasks. whats more, the project is open sourced and is free to use.


7) Creating Trialwares

Depending on your marketing strategy, you might want to create trialware applications that expire after a certain time period.I recommend using TrueLicense library. Will take 1 day to get a hang of it.


Hope the above collection of tools and libs help you be more productive... Please let me know if you find better and easier tools.

Monday, January 12, 2009

Tyranny of autorun.inf

Irritated with the darn viruses...?
A friend of mine came up with this cool idea.

As u all might already know. Most of the viruses create an autorun.inf file (hidden obviously) in the drive. On double clicking the drive, the script is , triggering the virus (Trojans).

Here's the big idea, create a autorun.inf file (blank one) with read only and hidden attributes set. Paste this file in all your drives...even your pen drives. That way, even if a virus is present, it wont be able to create its own autorun.inf, as one already exists, i.e., with the read only permission.

Viola, the virus is as good as useless as it wont be triggered. This applies to most of them but not all.

Friday, January 2, 2009

Cool web pages...

Designing cool looking web pages is not a rocket science. Awesome effects can be acheived without javascript, flash etc etc...

Dont let these things deter you, best example is my friend vivek...with just 2-3 days of work he managed to make a gr8 web page (just needed to learn CSS). Take a look at his page.

Also he showed me some of the coolest web pages ever...very simple in concept and could have been implemented by YOU.

Check out Tyler's web page, this page takes time to load...let it load completely before clicking on any thing. This page was made using the '#' element...pretty cool nah!

Also there is a site called CSS beauty, it has a listing of all the cool web pages...hope this gives you enough inspiration to work on that innovate page of urs :)

Pic of the year...hehe

My stupid cousin naveen never misses opportunities to take ediotic pics of mine...not just mine but of every one else. This one was particularly funny...Believe it or not, that damn brown dog is just 5 months old (super big lol). Its gonna be like 90 kgs, but i still beat it in terms of weight :)

Wednesday, December 31, 2008

Awesome Header

Searching a university for MS was one heck of a journey. Frankly, it was deemag karab. Admist all that headache, i found this really good header from SUNY stony brook university. It's so good that i decided to put it up as my first blog entry...










Pretty good eh? Was refreshing to me!

Saturday, December 20, 2008

Pure Genius...

I accidentally came across a lecture on 'human computing' by Louis Von Ahn, a professor at Carnegie Mellon University. This is one of the best works i have seen. Pure genius and totally awesome...

Dont forget to check this out:
http://video.google.com/videoplay?docid=-8246463980976635143&hl=en