Archive for the ‘Java’ Category

At work, we have multiple libraries that provide us with small small functionalities. This design keeps things simple and makes code sharing easy. But it also has it’s own set of problems. In very large projects where there are multiple branches and complicated dependencies, it’s impossible to ask customers to provide you with jar versions. [...]

Thursday, May 26th, 2011 at 11:41 | 0 comments
Categories: Java, Tips & Tricks
Tags:

There’s no doubt that Joda time is now the defacto date time library for java. And a well written library it is. You get almost everything you can ever want to do with Date objects and best of all, almost all operations are dummy-proof. By dummy proof I mean that programmers making silly mistakes can’t [...]

Friday, November 27th, 2009 at 13:19 | 5 comments
Categories: Java
Tags:

Over the last couple of years I have had various discussions about this with my colleagues. I myself favoured foreign keys relationships rather than join tables till a little while ago. If you’re not aware of how to do one or the other, the eamples below should explain that. Consider a very simple parent child [...]

Sunday, November 22nd, 2009 at 20:35 | 1 comment
Categories: Java

I had an interesting discussion with a colleague of mine regarding the differences between the proxy and the decorator pattern which made me give it some thought. To the untrained eye (that includes my eye!), they seem exactly the same. Infact you sometimes wonder, why the heck are there two names for the same pattern. [...]

Wednesday, November 18th, 2009 at 23:57 | 4 comments
Categories: Java

I’m a bit ashamed to write this post. I have been working on Java 5 for well over two years and yet I was unaware of the power of the java.util.concurrent.TimeUnit class. While I have used almost all the other juc classes over this time and subsequently TimeUnit as well (in some of them), I [...]

Wednesday, October 14th, 2009 at 19:10 | 0 comments
Categories: Java
Tags:

It’s ironic the stuff we get used to as developers. There’s so much we do repeatedly in every class or in every project or maybe even in every method yet we never realize that it’s probably best to add a new “feature” to java to make our life easier. While searching for some reading material [...]

Wednesday, April 8th, 2009 at 21:59 | 1 comment
Categories: Java

In-memory cache’s can be extremely useful for small web applications where you don’t want to full-blown cache system like ehCache or simply can’t afford one. I recently had such a requirement and I must say that I kind of made a mess of it. The requirement was to cache User objects so that we didn’t [...]

Wednesday, March 11th, 2009 at 14:37 | 5 comments
Categories: Java

I have noticed a lot of people on the internet asking about method inlining. The term generally arises whenever the final keyword is discussed. Basically, it is said that compilers inline methods which are declared final thereby avoiding the cost of putting them on the stack etc and thus improving performance drastically under heavy load [...]

Thursday, February 12th, 2009 at 16:48 | 1 comment
Categories: Java

ConcurrentHashMap is a pretty ignored class. Not many people know about it and not many people care to use it. The class offers a very robust and fast (comparatively, we all know java concurrency isn’t the fastest) method of synchronizing a Map collection. I have read a few comparisons of HashMap and ConcurrentHashMap on the [...]

Thursday, February 5th, 2009 at 13:16 | 8 comments
Categories: Java, Tips & Tricks
Tags:

More often than not you need your java program to perform an operation at a particular time. It gets trickier when the operation needs to be performed at regular intervals. There are a lot of solutions to implement a java “cron” of sorts available. There’s the quartz scheduler which has pretty much everything that you [...]

Saturday, January 31st, 2009 at 15:48 | 3 comments
Categories: Java

I’m asked the difference between the two interfaces, Serializable and Externalizable more often than i’d like. It’s pretty simple really. Serializable does all the dirty work for you, it writes the object to the output stream on it’s own without you having to bother about anything at all. Externalizable on the hand makes you do [...]

Friday, January 30th, 2009 at 22:43 | 0 comments
Categories: Java

Of all the new topics in Java 5.0, the most confusing has been Generics, atleast for me. I realised that, while studying for SCJP 1.5, I would need a summary of generics so it doesn’t escape me a little while later.

Friday, October 12th, 2007 at 13:22 | 1 comment
Categories: Java
Tags:

Calling International from India has always been a … pain to say the least. First off, getting through was impossible. Notice how I say “was” because that was the case in the early and mid 90′s. With the entry of private operators into the field, things got easier because the state monopoly was over. Getting [...]

Monday, May 22nd, 2006 at 11:48 | 0 comments
Categories: Java
Tags:

I stand corrected. I always though things like these were about 100 times more likely to happen in a third world country than in a “union”, european union more specifically. I’m talking about the recent .eu domain name fiasco. Simply put, Pool.com a registrar, cheated to obtain .eu domains on the first day of the [...]

Sunday, April 9th, 2006 at 11:40 | 0 comments
Categories: Java
Tags:
TOP