Tuesday, August 13, 2013

How many objects are created when you create an object of a plain class?

This is shared out of a random thought. Let’s say we’ve got two classes:
class A{}
class B extends A{
 static B obj = new B();
}
Do not read further until you have the answer to the question.

Tuesday, July 16, 2013

Understanding the Java bytecode even before the JVM takes it!

Yeah....passion and endurance is what I'll need in order to go through the wreckage of my so-beautifully-written piece of Java code, bytecode as known by nerds.
I'll update what and how I learned once I kick in its tooth. And with that I mean, ASAP.
3 days later….
javap -c
Legends say that the "p" stands for printer. But we never met 'em... And "c" option is for disassembling the class files.
javap as described in the JSE documentation is an utility that disassembles the class files provided in its argument and prints a human-readable version of the bytecode.
I stumbled upon this utility just for enjoyment and in my first encounter, I instantly entered "exit" when I saw a weird output on my console. But now, I find it as the first step to understand program behavior for simple programs (I'll never do that for a bigger program :D)

Monday, June 10, 2013

How to create a tar.Z file? The .Z extension in Unix!

We are talking on how to create a tar.Z (nicknamed .taz) file in UNIX-based systems like Linux, because this particular file format could not be easily found, so I tried randomly and learned, leading to this share. This is a normally compressed tar file in Unix-based systems The name of the utility itself is compress[1] [2].

Monday, June 3, 2013

Loose Coupling and High Cohesion in Java


These are the most religiously known or learnt but orthodoxly neglected principles of so-called Object-Oriented-Programming concept.

Tuesday, May 7, 2013

What is SQL injection? - Infographic


A lot of SQL queries function behind our everyday use, be it on Facebook, Twitter, Gmail or university result. The information that we enter in the web pages or web apps are taken and put into SQL queries to fetch our resutls. The simplest that anyone understands is their username and password for a specific online service. Okay, good. But what if someone passes some tricky input to those fields in order to mess up the system or just by mistake. If there is strong validation in presentation layer (in the user front-end itself), then user will be notified about the wrong/undesirable input, and what if there's no stringent validation?