Posts

Pair Programming Know - how

This is a very good start for knowing the ABCs of pair programming. http://www.wikihow.com/Pair-Program Believe me, it helps. i experienced it a lots. It takes you to the solution quickly. It also gets your code to look cleaner and better. Of course, you will end up writing the best possible code.

Autoboxing & Null Pointers

By this time, you should all be used to the java 5 concepts and most of you might be using them in your development. There are few naunces to the auto boxing, which we should be handling carefully. One fine day, in a flow, suddenly i get a NPE. Looking through the logs, i was astonished to find where it occurred. Long userId = args.getParameter("UserId"); int resultCount = updateAllUserInfo(userId, userVO); -- The line where NPE occured. For an instance, i was wondering, how will NPE occur without us doing any object related operations! Have a look at the updateAllUserInfo() method signature below. private updateAllUserInfo(long userId, UserVO userVO){ . . } The user id i pass to the method is a Long object, but the method takes in the primitive long. With the tiger, java takes care of converting an object to primitive value & hence the exception. interesting finding for the day! Powered by ScribeFire .

Spring & AOP

The wold is going towards the collaboration suite way. People don't want to write all the generic code again & again. All applications are sure to have the common modules like, login, DB & user session management. As a developer, i don't want to write any more of the user session checks & user roles, permissions etc. Its okay if you are a beginner and trying to learn few basic concepts, but after a certain point, the developer should be just developing the business logic for their product/application. Spring & AOP comes to our rescue. There are many other ways, but in this blog session, i am going to deal with Spring & AOP. What is Spring Spring is a framework. What is a framework? A framework is a basic conceptual structure used to solve a complex issue. i.e It is a wrapper or Its a way of repackaging a function or set of functions (related or not) to achieve one or more of the following goals * Simplification of use * Consistency in interface * En...

Tiger Tiger Burning bright.....

Does the title speak to itself, well it was intended to, but if its not, read through so that it makes sense. Java came with its version 5.0 long back, and the advantages of the same are posted everywhere in the web. Thought, Let me also put my contribution :-) I was working with the earlier versions of java [1.42] until i joined my new company in July 07. I realized the power of tiger only when i literally starting doing development using Java 5.0 The main concepts i would like to share are 1. Java Generics 2. Advanced features of Collections The items in the list are of utmost concern to us, the developers. Java 5.0 has made developers life lot more easier. Java Generics By introducing the java generics, the developers now are not required to do the class typecasting at each and every point. An example would me more apt. Here is a typical usage of that sort: List myIntList = new LinkedList(); // 1 myIntList.add(new Integer(0)); // 2 Integer x = (Integer) myIntList.iterator().next(...

Full Outer Join

Let us start our blog knowledge with Database [That was my first step into the world of software !]. During my days at one of the consulting companies, i was working as a Data conversion specialist, additional to my Java Lead role [Its always like this in consulting, you will be given huge amount of work with less time to complete them uhhh..] One of our business requirements was to get the records from two tables, together. The is a column which is present in both table A & B. i.e Table A had Col1 & Table B also had Col1. Now, when entering data, Table A will have some rows, Table B will have some rows. We have to query both the tables, get the records and show them in same line if they both have same data for Col1 in their tables. OK, in normal world, i would have been thinking of putting two outer joins and then integrating the results in the Java using some crap logic. This is due to the fact that an outer join extends the result of an inner join by including rows from on...

Gyaanam Parama Balam - Knowledge is Power Supreme.

The first blog would be on What/When/Why/how of this blog's name - [Please read it as " Kalavum Katru Mara " DOT Blogspot DOT com] - This means "Learn even to steal and then forget it". This does not mean we have to learn to steal, but the essence of it is not to discard any sort of Knowledge. Just go ahead and learn it, it might be of some use somewhere in your path of life. Another reason to start this blog is to share the knowledge. Once of my strong belief is "Sharing the knowledge" will speed up the learning process. So i thought, let me share the knowledge thought this blog.