Ever wondered how to leave a message to next generations? It’s dead simple. You simply put a nice “todo” comment in the code. I can guarantee you’ll never return to this place again. You’ll never have to. It will be left to next generations. That’s at least what’s happening in the corpo world.
Here’s a short list of messages I found recently in code.
- Remove this… later
- To be removed when the causing xyz bug will be removed (no one really knows what this three-letter shorcut bug was… or is)
- I’m sorry - I was in hurry
- Given enough time one should extract common logic to separate function, complex calculation logic makes it impossible to do it just hours before a release (originally a six-line comment)
When I’m reading these I feel like like a youngster finding a bottle with a message from the past. It’s hard to tell what to do with the message but it feels like Something. You are amazed for a moment. Then the confusion comes, then you try to apply Boy Scout rule and with a but of a luck - you simply remove the message together with some nasty production code attached. All the mystery passes away.
That would be mean to say - “never do that to anyone, never put so useless comments creating more confusion than help”. I can’t really imagine a world without a hope that somewhere there’s an undiscovered secret knowledge from the past. Maybe next found comment will reveal it…
Do you send similar messages to next generations? Did you receive any?