Programming

Automated Web Testing

Posted by amit on August 25, 2010 at 6:39 am

We have now adoped Selenium for automated web application testing. This increases the quality level of our software and generates better confidence for our clients.

How to embed a Google map in a Wordpress blog

Posted by amit on April 16, 2010 at 8:56 pm

Overview
I get a lot of requests from people who want to put up a google map in their blog (which most of the time is Wordpress) but they have no idea how to do it. Unlike embedding  a google map in a standard web page ,  a simple pasting of the map script will not [...]

JQuery - difference between append() and prepend()

Posted by amit on April 12, 2010 at 9:49 pm

append() and prepend() methods: similar to appendChild, except jQuery accepts a string, a DOM element, or a jQuery object as valid arguments. jQuery converts the argument into a text node or element depending on what is passed.

$(”#leftNav ul”).append(”<li>after the last &lt;li&gt;</li>”); // adds <li> at the end of <ul>
$(”#leftNav ul”).prepend(”<li>before the first &lt;li&gt;</li>”); [...]

Linked List class in Javascript

Posted by amit on March 18, 2009 at 4:44 am

This  is an exercise in using the object oriented concepts in Javascript to implement a doubly linked list.
There is a class called Node which encapsulates the actual node in the list. The linked list is implemented as a global object with class variables and methods to:

Add a node
Remove a node
Search for a node
Sort the list [...]

A perfectly normalized database is a timebomb waiting to explode..

Posted by amit on March 6, 2009 at 4:56 am

Once upon a time, God came down on earth in the form of E.F.Codd and gave us the Holy Tenets of Database Design.
Among the most important thing that every database designer or application developer had to learn was
“Thou shalt design your database so that it at least fulfills the conditions of 3NF (3rd [...]

How not to name a boolean variable

Posted by amit on February 27, 2009 at 4:40 am

Out of personal experience and reading other people’s code,  I have come to realize a small but very tricky issue about how NOT to name boolean variables or any kind of variable where the code to evaluate is usually in the form of a boolean expression.
The pitfall to avoid is :
Do not use a name [...]

Moving from Mantis to Flyspray for issue tracking

Posted by amit on December 3, 2008 at 3:10 am

i have recently shifted from Mantis to Flyspray for issue tracking.
I have been using Mantis for over a year now and its a very comprehensive bug tracker with a lot of features. The UI is a little dated though. One of my main problems was that the UI became a little slow in loading once [...]

How to prevent CDialog closing on pressing Escape key

Posted by amit on November 19, 2008 at 12:11 am

MFC CDialog classes have a default behaviour of closing if the user presses Esc key anytime while the dialog has focus. To overcome this behaviour, the Esc key has to be trapped and disabled in the PreTranslateMessage event handler:

BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
// TODO: Add your specialized code here and/or call the base class
// disable closing by [...]

Amazing javascript

Posted by amit on January 8, 2007 at 9:55 pm

Since the last couple of years, with the advent of AJAX , Javascript has got a new lease of life and has gone from becoming from a ‘web application sidekick’ to the ‘big guy for Web interfaces’. Heres a neat little trick which anyone can do
1.Load up a site with a good amount of [...]

11 golden rules to become rich writing code for a living

Posted by amit on November 24, 2006 at 10:09 pm

Why am I qualified to write this?
I have been an independent software developer in India since 1992 and I always knew software was my calling in life. I started out by writing customised applications for the healthcare industry. This was in the days of MS-DOS - no Windows, no internet, no GUI. Today I write [...]