July 13, 2014

The weakest of homes is the home of the spider if only they knew,
and it's not just because of the web but also for what happens inside it too
The most fragile of homes, home to the most ferocious of family feuds
A husband and wife relationship that is solely based on being used
for consummation, see as soon as they finish mating the wife
would then consume the body of hew own husband

May 7, 2014

(For the programmers) You need to pick your side

Let me state a fact, you spend time a lot of time on the internet reading about debate between design features of various programming languages, there pros and cons, why one language is better or should be preferred over the other. It's just not very relevant. You'll be lost for long and just won't get up and do something if you don't quit the above described behavior.

January 8, 2014

Java memory analysis using inbuilt tools

jhat(Heap Analysis Tool) is a tool that comes along with the jdk and is present under jdkxxx/bin/ .

There are two way to get the heap dump

1. Give it while starting the java program as
java -Xrunhprof:format=b,file=file.hprof class-name
2. Get the heap dump using jmap as
jmap -dump:file=file-name process_id

Here I am using the first method. The java code ran is the same as described in this post about Thread-Creation-Time.

January 1, 2014

Java analyzing thread creation time

In Java, the thread creation time increases with the number of thread that are already created, hence it is advisable to keep the thread count minimal and only create a Thread when actually needed.

The below gist is a minimal piece of java code that helps in proving this

December 25, 2013

Code Re-use or Build from scratch ?

You'll often here these terms in your programming life
- reuse is better
- code is made to be reused
- don't reuse other's code
- reuse of code breaks things

The above arguments each of them stand true in different scenarios. And this is the part most programmers miss. They hear one fact and applies it to all known problems in their life.