Wednesday, February 3, 2010

Idea of a litmus test for the company that hires you

I suspect this might be a good question to raise on an interview with any potential employer in software engineering industry: "With regard to the engineering you do when creating your product(s), if you were a car manufacturer what kind of car make would you match your whole production line with - AvtoVAZ, Toyota, Ferrari?". The list, of course, can vary to contain names known to the other party but the idea would still be the same.

I see no other way to quickly reveal how significant and relevant the tools and technologies employed by the company are. Sometimes they might tell you they use Perforce but then it appears they don't use branches and store compiled binaries in it for some wierd reason. Sometimes they claim to use Continuous Integration system but then you find out they don't write unit-tests so it makes using of CI close to sheer nonsense. Or, even worse, they do write unit-tests but without assertions. Some mention they are Agile but meaning by that things are in total mess and uncontrolled. Think for some time and I bet you will be able to find your own examples of such lies.

It is just a rough guess, yet I hope it is on the right track.

Tuesday, February 2, 2010

Servlets vs Messaging

Being kind of not a big fan of Web development I wonder what is so special about Servlets that requires a separate API to use them?

Integer.valueOf(): a few facts

Integer.valueOf(int x) added since Java 1.5 has one interesting feature - it resolves all incoming int values through a cache so to minimize the number of java.lang.Integer instances in application by re-using the cached values. This cache is also configurable with a system property java.lang.Integer.IntegerCache.high which is used to define the upper bound to populate the cache to. The minimum value is hard-coded and it is -128.

Surprisingly the upper bound for java.lang.Long, where a similar cache also exist, is hard-coded to 127 and is not at all configurable.