Qoders Blog     About     Archive     Feed
by Qadeer Ahmad Khan

Effective Java - Method Common to All Objects

Methods Common to All Objects (Ch 3) This is a short summary of Joshua Blochs book Effective Java chapter 3. I have only included items that are relevant for myself. The general equals() contract (item 8) The equals contract describes the equivalence relation as: x.equals(null) == false Reflexive - x.equals(x)... View entire post

Effective Java - Creating and Destroying Objects

Creating and Destroying Objects (Ch 2) This is a short summary of Joshua Blochs book Effective Java chapter 2. I have only included items that are relevant for myself. Static Factories (item 1) Some advantages of static factories vs constructors: Factory methods have names which add a description to the... View entire post

Shell (unix) commands you always forget

This is a list of typical commands that I often have to Google because I forget either their usage or important flags. Using grep with perl type regex ls | grep -P "dirNo\d\d$" Using the -P flag lets you search for more advanced regex expressions. Other useful grep flags: -i... View entire post

Running shell commands with Python

Although bash scripts are powerful, the language contains many gotchas that makes your head scratch. I therefore really enjoy the simplicity of Python. The following is a simple way to run shell command and get the result, using Python. Note that output to stderr will not be returned. import subprocess... View entire post

A Cheap and Painless Mass Regression Testing Approach

My new client and project has been alive quite a time and has involved many people and consultants going in and out. It also has a large code base and typically, these combinations entail code being written in different styles making it harder to read and maintain. However, involving many... View entire post

Learning log4j configuration once and for all

Logging is an essential part of programming, and in Java, you are bound to run into slf4j and log4j some time. Even if you have no idea what they actually do, you are probably using them already. And you may have even used some time to learn how to configure... View entire post