rosscode.com - RossCode.com

asp.net tourney logic nfl football (1)

Example domain paragraphs

posted on 12/13/12 at 07:05:33 pm by Joel Ross

I recently came across some code that was causing an exception because a value was added to an enumeration, and the code never got updated to handle the new value. Fixing it is pretty simple. Just add another case statement, and be done with it.

But fixing it correctly is a bit more work. And any time I'm editing code, my goal is to leave it better than it was when I started. While adding the handling for the missing enumeration value seems fine, it's really not, because it's just putting a band-aid on the issue.