Implementing Java Comparable

Implementing the Comparable interface in Java give the object a natural ordering, as in makes it Sortable. The comparable interface only has one method:

Ungit the ultimate tool for git

Ungit is the easiets way to use GIT. It is great tool that visiually represents your repository and completly removes the learning curve with GIT. It uses node.js and is available via npm.

Bluk update GIT master location

The server hosting the GIT repository has moved to an new domain name. Now is very painfull to update manually so here is quick command to find all the GIT config files and replace the old domain name with the new domain name.

Guava LoadingCache invalidate call while loading?

I have a application that needs to pull data from the database do some calculations (This takes a second or two) then returns. I have been using Guava’s LoadingCache to do this. The problem came in when a user makes a change to the source data which in effect invalidates the calculation results. Easy solution just invalidate. But what happens if the data is modified during the calculation process. For example you have 2 threads, Thread 1 calls get on the loading cache then during the Loading process in Thread 1, Thread 2 calls invalidate since the underlying data has changed. Is the data invalidated or is the invalid/stale data stored in the cache?

Hiding data on a Excel Spreadsheet using POI

I had a requirement where I needed to hide some meta data in Excel Spreadsheet. Instead of using hidden row/columns/cells I used Custom Properties. Custom properties is a map in the Spreadsheet file where you can store key/value data. I found this much safer than hiding the data on the sheets since users could delete/corrupt the data very easily.