Posts

Tomcat JDBC-pool

There is a new JDBC connection pool implementation that comes with Tomcat, called JDBC-pool. You can read more about this pool implementation here . I can already see that quite a few projects (including the Spring tc server) have started using or supporting this connection pool. I am currently hooked to DBCP, yet to try this pool. There is also an article that compares DBCP and JDBC-pool .

Python 3 I/O

I came across this useful page that helps you understand whats new in Python 3 I/O and what are all the significant performance enhancements you can achieve/expect.

Returning an empty collection instead of null

For one of my recent projects, I had to work with legacy code. There were methods that are returning collections, like lists or sets. These collections were created by reading data from the database. Whenever there is no data to form the collection, these methods return null. Now that is bad! One of the issues of returning null is that the caller always have to check for null. Most of the time the caller either searches for a particular value in the returned collection or iterate through the elements in the returned collection. The code will look like this: List rows = myDao.getRowsFor("key"); if(rows != null) {   for(Row row:rows) {     // Do something with the row   } } As you can see, it is easy to avoid the null pointer check if the getRowsFor() returned an empty list instead of a null pointer when there is no data in the database. The clutter caused out of the null pointer checks all over the code. You can read more about this simple principle in ...

Issue while upgrading the GrEclipse plug-in

I upgraded my GrEclipse plug-in today to a newer version. The upgrade URL is given in this page . Since it was an upgrade, I click on Help -> Check for updates in Eclipse. Immediately I got the following error: Cannot complete the install because of a conflicting dependency.   Software being installed: Groovy-Eclipse Feature 2.0.0.xx-20091211-1000-e35 (org.codehaus.groovy.eclipse.feature.feature.group 2.0.0.xx-20091211-1000-e35)   Only one of the following can be installed at once:     JDT Core patch for Groovy-Eclipse plugin 2.0.0.xx-20091017-2200-e35 (org.codehaus.groovy.jdt.patch.feature.jar 2.0.0.xx-20091017-2200-e35)     JDT Core patch for Groovy-Eclipse plugin 2.0.0.xx-20091211-1000-e35 (org.codehaus.groovy.jdt.patch.feature.jar 2.0.0.xx-20091211-1000-e35) ... and a lot more ... To recover from the error, I just uninstalled the version of JDT that was conflicting. To do this, click on Help -> Install New Software and click on...

Hurray! I have installed 2 GB RAM in my laptop

Last night I upgraded the RAM installed in my laptop from 1 GB to 2 GB. I found the following YouTube video to be very helpful and informative.

Two performance tweaks to boost your Vista performance

I have a HP dv6000 laptop with Vista Home Premium. Since day 1, my machine was terribly slow for no reason. I tried so many tweaks that didn't seem to work at all. I installed Process Explorer from sysinternals tools to monitor which process is taking much resources. There were two things that gave me a good performance boost: Disable Windows defender. Disable the windows indexing service. I have my own anti-virus software (Avira) which provides protection against much better protection than the Windows defender. But because both the defender and Avira were scanning each file and process, it effectively doubled amount of load to protect the system. So I disabled the defender. You can read how to turn off the defender here . I don't need the indexing service offered by Windows. The indexer hogs so much resource and I have not used the search feature much. You can easily disable indexing by right clicking on the drive in Windows Explorer and un-checking the indexing for th...

Everything you want to know about memory

Recently I have been looking around to upgrade the memory in my laptop. I was trying to understand what are the specs and how to find out the right RAM model for my laptop. I found this article to be extremely useful. You can also read a follow up article that talks about the details of the RAMs used in GPUs. Also this article was helpful in understanding the FSB speeds and bus speeds in general.