Random Code

May 14, 2008

You know you are working on bad code when …

Filed under: General — Neal @ 9:59 am
  • There’s more orange in ReSharper’s gutter than there is grey.
  • Code analysis for the current file takes longer than solutionwide error analysis of your last “good” project.

I’m back to working on legacy code written by hamfisted monkeys with little regard for anything vaguely related to good coding practices – 2500+ line codebehind classes anyone!?!

Feel free to add other “You know you’re working on bad code” signs in the comments – I’m in desperate need of a laugh :s

1 Comment »

  1. …when you see “advanced” ADO.Net code, manipulating strings to insert the “parameters”, perform the ExecuteNonQuery() in some places, all within a try-catch block:
    try {
    var tx = createtx();
    // much ado (.net)
    cmd.CommandText = “ALALLA attribute=” + myTextbox.Text + ” AND bla bla”;
    // some writes to db
    }
    catch(Exception ex) {
    tx.Commit();
    throw ex;
    }

    Saw this when I was to hire a second developer for a project :D

    Comment by Henrik — August 31, 2008 @ 5:21 am


RSS feed for comments on this post. TrackBack URI

Leave a comment

Blog at WordPress.com.