Learning and Mastering Java

December 25, 2012

Here is my target list for the enxt year. I have read all these books in some bits and pieces, but this year I want to be thorough with my knowledge.

1) SUN Certified Java programmer for  Java 6 exam

2) A programmer’s guide to SCJP Certification

3) Effective Java

4) Java Concurrency in Parctice

5) Head First Design Patterns

6) Java Puzzlers

7) Java Generics and Collections


Microbenchmarking in Java

October 23, 2011

I was worried about how to measure the performance of a feature in Java. I was overwhelmed by the complexities of the JVM that might affect my results. Before I could finish my experiments, I wanted to have a look at some of the parameters that I need to take care of before I finally go ahead with my Microbenchmarking results.

I came across this excellent article Dynamic Compilation and Performance Measurement by Brian Goetz. It is an excellent introduction and gives good insights about the ways the JVM works.

I will find out some time later to publish a blog about how I did some of my experiments after reading this.


Why use Netty

October 23, 2011

I have been investigating networking frameworks over the weekend, mainly JBoss’s Netty and Apache MINA. This has been a good experience after having studied and implemented all the transport layer protocols like TCP/IP and UDP in my Networks course in college. The change took some time. Initially, I was thinking from the ground that we will need to make a session layer and make our new application level protocols over that. The discussions with my manager were all going great and I was really happy with the solutions I was coming up with. Until, finally during a scrum he told me that now you can lookup Netty framework and that will probably solve the purpose.

My first reaction was a shock because that nullified my efforts over the last week. Then I cursed myself over the fact that my literature survey was not good and should have been done first. Finally, the feeling sank in and I realized that it was good that I thought about the whole problem rather than looking at the solution myself. This is probably an effect of reading Head First Design Patters. 🙂 You will understand from my book review post. 🙂

In this post I will list down the reasons why I like Netty. This is an initial assessment and I will update this post.

  1. Netty has an excellent documentation. That makes it easy to leverage its functionality. The time to market gets reduced because the developer can get production quickly.
  2. The Netty Buffers are faster as they have made good use of the OO composition principle to implement zero copy strategies.
  3. Netty uses Intercepting filter patterns which makes the controller code maintainable and reduces the complexity on the developer side. Look here to understand the intercepting filter pattern.
  4. Code maintainability is also made easier by the availability of decoder and encoders.
WIP.

Book Reviews : Head First Design Patterns in Java

October 23, 2011

Have you ever taken an interview with a good tech company, may be Amazon, Google or Microsoft ? No, I am not saying that in order to do that you need to read this book first. But, then you must have realized, how you have to solve a problem on your own with some hints from the interviewer. The main job of the interviewer will be to direct you to the solution. He will discuss the pros and cons, set the objectives of the solution, and tell you whether you are going towards that or not.

The reason why I talk about interviews is that I am fresh out of college. This is probably the way you will think,understand and engineer new designs and suggest better algorithmic solutions in your job. This book does exactly that.

It makes you think and it helps you come up with the solutions. That enhances your learning. All the design patterns in this book are like real life case studies of evolution. The reader will see how the initial system was designed, how the problems arose while scaling up and how the solutions address those problems. One inherent problem about learning design patterns is that you try to use them anywhere and everywhere. However, when you learn them with such a grounded approach, you will first try to see the problem and not the solution.

Overall, this book is an excellent read and is highly recommended.