Eclipse Tweak: Show more ‘recent workspaces’


I like to keep my projects categorized into various workspaces when working with eclipse. This help me keep my work organized and keeps eclipse from indexing all the stuff at once. Also, this way it takes less toll on my RAM. Problem Whenever you open eclipse, it greets you with a welcome screen, where you can choose which workspace you’ll be working with. This is basically a drop-down having a list of 5 recently opened workspaces. The problem is that ...
Setting Up Sonar

Setting Up Sonar


Even if we know everything about code quality, the human error factor will still persist. There is always a chance of making some error, as we are human after all. Some, if not all such errors can be brought to notice using some quality management tool. There are several such tools/plugin which can be integrated into eclipse. All such tools can assist a developer with a code review, just like a peer code review. e.g. PMD Findbugs Java Analyzer HammurAPI ...

When are Custom Exceptions worth it?


There is a common practice of making new custom exceptions which extend Exception class. These exceptions are given names in order to make the code readable. Although these make the code readable, but the overhead something one cannot be forgiven for. To cut the story short, these custom exceptions must be created only if they carry some extra information about the exception. Unless they carry some extra information, Exception object is suffice. e.g. Lets say there is a certain set ...

Returning From Finally Block


Here I am posting another very strange fact about java. I mentioned something about exit points in my short and sweet post http://lekhak.tumblr.com/post/38312047723/single-exit-point-funda In this post, I’ve stated that exceptions can be considered as exit points from a method. Well that is true, EXCEPT FOR ONE CASE. The only exception to this statement can be returning a value from finally block or throwing and exception from the finally block. Use of Finally Block I’m sure you know what finally blocks ...

Modifying A Final Variable


Have you ever tried to update a final variable? Or it always has been holy and heavenly enough to try and update? Well I came across this piece of information a few months ago, I so wanted to read the whole documentation of Java, hoping to invalidate my assumption that final variables couldn’t be touched. A final variable can be modified unless it is immutable Immutables Yes, a final variable can be modified, but only if it is a mutable ...