Pages

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.



December 5, 2013

Meaining of Life - Spoken Word [video]

A great 7 min vid explaning the meaning of life, existance of a being and existance of one creator. From lebo2196. A must watch.


What are we doing here and where we gonna go?
It's like we just woke up one morning and then it's welcome to the show
Don't ask any questions just go with the flow.
Make as much money as you can and try your best not to get robbed.

December 3, 2013

Whats the buzzword 'programming best-practices' all about?

This post is about what does the programming best practices buzz word means, and not a actual list of the best practices(which will surely differ language to language and scenario to scenario, but the core best-practices would be the same, few of which discussed here).

It's kind of hard to think the usefull-ness of this buzz-word when it is taught(ok not actually taught ;)) in collage. You need to work on some actual project, mission critical app, or any software that deals with money ;), to understand it in real sense. Until then it's just another `yea-i-know-it-well` kind of word in your head.