On useful comments



  • Found this in an app I'm maintaining


    // TODO: This line of code loads data into the 'myDataSet.Location' table. You can move, or remove it, as needed.
    this.locationTableAdapter.Fill(this.myDataSet.Location);
    // TODO: This line of code loads data into the myDataSet.Period' table. You can move, or remove it, as needed.
    this.periodTableAdapter.Fill(this.myDataSet.Period);
    // TODO: This line of code loads data into the 'myDataSet.User' table. You can move, or remove it, as needed.

    There's nothing relevant under the third comment, btw.

    Why are these TODOs? Am I supposed to do something? At least the
    comments are informative, I hadn't realized I could change code as
    needed.  Besides there are only  four lines of commentary in the 350 line file (these three included), so I'll take what I can get.



  • This looks like auto-generated code. I know some of Microsoft's sample .NET code is documented mostly with TODOs (for example, try creating a constructor in VB.NET (I don't know if this applies to any version post-VS2003)).



  • TRWTF is someone apparently "performed" that last TODO and didn't remove the TODO comment. Tsk tsk.



  • If only it had been like this, so that whoever removed the third line of code could know that they were allowed to remove the corresponding comment too!

    // TODO: This comment line explains the line of code that loads data into the 'myDataSet.User' table. You can move, or remove it, as needed.

    // TODO: This line of code loads data into the 'myDataSet.User' table. You can move, or remove it, as needed.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.