Mortal sin: Just "Doit"

My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2004/2/19/mortal-sin-just-quotdoitquot.html
Published Thursday, February 19, 2004 4:05 PM by RoyOsherove
Filed under:

Comments

Thursday, February 19, 2004 11:10 AM by Thomas Tomiczek

# re: Mortal sin: Just "Doit"

::Learn what Refactoring means.

Wrong.

Learn what PROGRAMMING is in the first place :-)

Wholy shit - your storeis are as bad as mine if I ever publish them.
Thursday, February 19, 2004 12:58 PM by Steve

# RE: Mortal sin: Just "Doit"

I completely agree. A more appropriate name like DoItNow would do wonders ;-) In all seriousness reading this stuff makes me cringe. I've been bitten way to many times by the "creative programming" of others.
Thursday, February 19, 2004 3:59 PM by Udi Dahan - The Software Simplist

# re: Mortal sin: Just "Doit"

I like "Execute()" - I promptly rename it "ExecuteMe()" =)
Thursday, February 19, 2004 9:37 PM by TrackBack

# Moron1, Moron2, Moron3

Thursday, February 19, 2004 9:37 PM by TrackBack

# Moron1, Moron2, Moron3

Friday, February 20, 2004 2:40 AM by Hamza GOLYERI

# re: Mortal sin: Just "Doit"

> Can you guess how many serial killers got started the day they had to maintain such code?

I'm one of them. I had to maintain a critical (COBOLish) C++ program which includes a +15000 lines of .cpp file and that includes a +2000 lines of function (no I don't want to call it a function: it is just shit). I'm afraid to touch it because after almost one year I could not understand yet what it is really doing. Every time I started to read it I forget the beginning of it when a reach the end. I really don't understand how this program really works. It must be a miracle. Calling people who write these kind of code “engineers” or “programmers” is reviling real programmers and engineers.
Friday, February 20, 2004 3:29 AM by yuri90

# re: Mortal sin: Just "Doit"

I am currently maintaining an application that follows along the same lines.. "copy and paste inheritance" is what I call it.. instead of inheriting functionality from a base class, you copy it to every method of every class that might need that functionality.. end result 2 million lines of code that doesn't do much except throw up bugs.

There is an up-side.. for every bit of functionality I have to add, the codebase gets 2000 lines smaller :-)

Refactoring is a wonderful thing!

By the time I am finished this release, it might vbe down to as little as 150,000 lines of code. There's my silver lining, even if it is only me that recognises it.
Friday, February 20, 2004 5:20 AM by Michael Dorfman

# re: Mortal sin: Just "Doit"

Great post.

Too often, programmers forget that code is meant to be read by humans, not by machines. The machine would be perfectly happy to have us write IL in binary,

Methods called "Doit" are a clear separator between the hobby programmer and the professional. Or, should be.
Friday, February 20, 2004 2:50 PM by Ken Robertson

# re: Mortal sin: Just "Doit"

Another annoying thing is two versions of a function that essentially do the same thing a different way. In the system I took over, there is a function AddParameter and SetParameter. AddParameter is more verbose, but problematic. Both are used everywhere, but they can't be used together in the same function.

They (the lazy contractors that designed this) also have exact same function in multiple places with different names. A custom number formatting function in one page is called "FormatNumber", while in another place it has it again, this time called "MyFormatNumber".

I think these guys hadn't heard of "re-use" a whole lot.