We all as Java programmers been through the situation where in we invoke a method to get some value and then instead of directly invoking some methods on the return value, we first have to check that the return value… Read More ›
Code
A brief introduction to using Option and Either classes
Previously I had written about Companion classes in Scala and there in I had mentioned one of its uses i.e defining the apply method to support object literals. In this post I am continuing from where I had previously left… Read More ›
HTML5 Geolocation API with Goolge Maps
I have been reading Head First HTML5 and read about the Geolocation support in HTML5 and also went through the example they have shared about using the Google Maps with HTML5 geolocation API. It was an interesting example and I… Read More ›
DSL based approach to input Graph data in graph theory based java programs
Most of us have coded some programs which deal with graph theory algorithms like finding the shortest path between two vertices, finding the minimum spanning tree for a given graph and so on. In each of these algorithms the programatic… Read More ›
Creating External DSLs using ANTLR and Java
In my previous post sometime back I had written about creating Internal DSLs in Java. In the book Domain Specific Languages by Martin Fowler, he discusses about another type of DSL called External DSLs in which the DSL is written… Read More ›
Using BULK COLLECT INTO construct in Oracle PLSQL
At times when you are programming in PLSQL you would want to fetch multiple records into an ARRAY or some collection. One approach to do is to loop through the result of the SQL query and then keep adding each… Read More ›
Using JAXB to generate Java Objects from XML document
Quite sometime back I had written about Using JAXB to generate XML from the Java, XSD. And now I am writing how to do the reverse of it i.e generating Java objects from the XML document. There was one comment… Read More ›
Using ROWNUM with ORDER BY in Oracle SQL
Lot of times you have tried to use ROWNUM clause along along with the ORDER BY clause and must have been treated with a different output than you expected. You would expect the ROWNUM to be applied after the results… Read More ›
What it takes to participate in Open source projects?
There was a query on Javaranch regarding participating in Open Source projects and I made an attempt to provide somewhat elaborate reply to it. I thought of putting up the reply on my blog as well and may be update… Read More ›
Why is the legacy code is the way it is?
What is legacy code?
At the start of the post I tried to get some definition for the term: “legacy”. (we wish if the noun was true! but indirectly they are one of the reasons for our pay). The adjective definition is somewhat closer to our “legacy code”.
Legacy code is something:
that has been written previously ( may be years old or even months, may be written by another developer or by the same developer) and continues to work just well to satisfy the customer needs.
that is being written as I am writing this post (and it is something which evolves to a legacy code stature in no time) and just enough to implement the requirements.