This is a continuation of my previous blog
Top 10 Things Every Developer MUST Do
1. Documenting Your Code
I have seen developers do not like to write documentation. Obviously, there are tight deadlines and frequent deliverable but it does not take too much time to write about the functionality you are implementing. If you spend 1 hour for every 7 hours of code you write or even less, it will go a long way and eventually will save your company a lot more time.
OK, let's try to understand this with an example.
So here is some sample code. As you can see from this method called MessySample, I create two ArrayList objects and add some integer and string values to them and display the contents on the console.
private void MessySample()
{
ArrayList obj = new ArrayList();
obj.Add(32);
obj.Add(21);
obj.Add(45);
obj.Add(11);
obj.Add(89);
ArrayList obj2 = new ArrayList();
obj2.Add("Mahesh Chand");
obj2.Add("Praveen Kumar");
obj2.Add("Raj Kumar");
obj2.Add("Dinesh Beniwal");
int bs = obj2.BinarySearch("Raj Kumar");
Console.WriteLine(bs);
foreach (object o in obj2)
{
Console.WriteLine(o);
}
}
Nothing wrong with this code. Right? WRONG!
Problem with this code is, if I end up using these ArrayList objects somewhere else or some other programmers read this code, they have no clue what obj and obj2 are, unless the go through the code line by line. I also do not know what this method really does and where can it be used.

Venkatesh KumarPosted Feb 4, 2013, 1:30 AM
Waiting for Part2 Mahesh....
Mahesh ChandPosted Feb 16, 2011, 10:07 AM
As I said in my comments, that's part 2.
Manuel KorrmannPosted Feb 16, 2011, 5:13 AM
I agree with Sutish Nair. I would suggest a good combination of reasonable variable names and comments which aren't what, but why you do something.
RAKESH SAPARIYAPosted Feb 11, 2011, 7:04 AM
REALY ITS GOOD ,, HI, I M MCA STUDENT FROM SOUTH GUJARAT UNV. U CAN HELP ME FOR MULTIPLEC CINEMA & medical manegement store PLESE TELL ME FOR ABOUT medical manegement store, MULTIPLEX CODE IN VB.NET IN MY EMAIL ID [email protected]
Mahesh ChandPosted Feb 6, 2011, 10:41 AM
Good point Suthish. That comes under Part 2. Keep Your Code Clean (Naming conventions)
Suthish NairPosted Feb 6, 2011, 5:13 AM
good start, why dont we have meaning full variable names... that also comes under documenting?