The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Mortal sin: Just "Doit"

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Roy Osherove

Posts: 1807
Nickname: royo
Registered: Sep, 2003

Roy Osherove is a .Net consultant based in Israel
Mortal sin: Just "Doit" Posted: Feb 19, 2004 9:54 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Roy Osherove.
Original Post: Mortal sin: Just "Doit"
Feed Title: ISerializable
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/rosherove/Rss.aspx
Feed Description: Roy Osherove's persistent thoughts
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Roy Osherove
Latest Posts From ISerializable

Advertisement
You've been there before, right? a big ass method (200-600 lines ) with a mess of SQL, logic and “SELECT * from...” in it. And it's called... “Doit”. Yep. I swear.
But then it got worse.
A method just as big, looks practically the same, named... aha. “Doit1”. I kid you not.
 
Can you guess the problems arising from such code, kids?
Can you guess how many serial killers got started the day they had to maintain such code?
 
Solution: Don't Doit.
  • Give a good name to your method that describes what it's trying to do.
  • Make sure it only does one task and calls other methods to do other stuff.
  • Learn what Refactoring means.

Read: Mortal sin: Just "Doit"

Topic: Dispelling myths about Frameworks Previous Topic   Next Topic Topic: Ward Cunningham

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use