• RLB (unregistered)

    It would have been done, but the Mayan Apocalypse happened frist.

  • (nodebb)

    And the example is what I call a "naked TODO" == there's nothing that indicates what it is that someone wanted TODO.

    Since TODOs in production code are only supposed to be there a short time, and provided your team actually tries to clean them up in a timely fashion (ha!), it's quite reasonable to leave ticket numbers there. (Less opportunity to change the ticket system and invalidate all the numbers, that sort of thing.)

  • (nodebb)

    I can't even fathom why someone would even hardcode a value in the first place, even when first writing a method they want quick. if you need the current year it's not like it's complicated code.

  • (nodebb)

    Well, the world was going to end in 2012, so this is not a problem.

  • RobyMcAndrew (unregistered)

    This is a joke that has been going since at least 1957. https://www.hexmaster.com/goonscripts/what_time_is_it.html

  • dusoft (unregistered)

    The real TDWTF is that it should be getNow()

  • (nodebb) in reply to ObiWayneKenobi

    if you need the current year it's not like it's complicated code.

    Right. But do you want the year that the transaction was entered, or the year that it was closed, or the year that the report was run, or the year that the reporting period ended...

  • (nodebb)

    Visual Studio can be configured to make C# TODO comments into compiler warnings. Of course, making this useful requires the same developers that don't fix regular TODOs on a timely basis to adopt a "fix compiler warnings before writing new code" approach.

    At the end of the day, developers that let tech debt accumulate can't be fixed any way other than to have an adult in the room with the authority to enforce sanity.

  • (nodebb) in reply to Jaime

    fix compiler warnings before writing new code LOL. LMAO.

  • (nodebb)

    (Previous one messed up)

    fix compiler warnings before writing new code

    LOL. LMAO.

  • Scragar (unregistered)

    I always follow a few basic rules for todos, and this violates all of them.

    1. It should have a clear indication of why it's not done - "Hard coded value until third party updates their API to allow other possible values we capture."
    2. It should have a clear indication of who is responsible for checking it - "Team Foo to review"
    3. It should give a date itis expected to be resolved by - "by 2026-12-01"
    4. It should have a ticket created and tracked so everyone knows there's work associated with it that's pending - "ticket 12345"

    If everyone sticks to the template you can even write an IDE plugin/PR review script to automatically flag ones expired/not matching the format so they can be fixed. There's basically no reason not to do this, it makes everything much easier to maintain.

  • A Human (unregistered) in reply to dusoft

    No, it should be now().

    Writing get in front of it is completely redundant.

  • 516052 (unregistered) in reply to A Human

    But what if in the future you want to set now?

  • fulton (unregistered)

    It's probably never used anyway.

  • Officer Johnny Holzkopf (unregistered)

    touchThe(cow); get(it.now); // TODO

  • (nodebb) in reply to Jaime

    Ref:

    Visual Studio can be configured to make C# TODO comments into compiler warnings. Of course, making this useful requires the same developers that don't fix regular TODOs on a timely basis to adopt a "fix compiler warnings before writing new code" approach.

    At the end of the day, developers that let tech debt accumulate can't be fixed any way other than to have an adult in the room with the authority to enforce sanity.

    Everywhere you wrote "developers" you meant to write "managers". Good developers pay down tech debt. Bd managers insist on creating tech debt. And hire the kinds of developers who will go along with the mandate to create, not resolvle, tech debt. IOW, bad developers.

  • linepro (unregistered)

    At my first job (40+ years ago, embedded military systems) we needed leap years. The lead promptly hard coded the next 5 leap years in an if statement saying the system will be retired before then...

    I occasionally wonder if that is true or it got patched in 2007.

  • Hmmmm 🤨 (unregistered) in reply to d-coder

    ... or the year the code was written ...

  • 516052 (unregistered) in reply to WTFGuy

    It's not always that simple. You need to think of the project you are working on holistically and not just as a producer of code.

    You are not employed to make a perfect spherical floppy in a vacuum. You are employed to create a product that will fill someone's business need. And that someone is who dictates whether the priority is correctness, performance, security, scalability, being on time and budget or something else entirely. As well as how much of those and other factors he is willing to sacrifice to gain at something else.

    A good engineer knows how to adjust his project to match those requirements. And more often than not that means shipping something that is less than perfect because perfection is the enemy of done.

  • Neveranull (unregistered)

    // TODO

    // TODO - Describe what the above TODO is referring to.

Leave a comment on “Get It Now”

Log In or post as a guest

Replying to comment #705854:

« Return to Article