DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: You ain't gonna need it

Collapse
eelstork profile image
Tea

In a team environment, recommending retros vs what-iffs, let alone bread-crumbs or adding comments. I do inline a comment here and there, and I think the edge case is when writing code that's obviously fragile, because time is lacking to write it well.
Here's why.
The tomorrow you is smarter than the today you.
The tomorrow you understands the problem better.
What-iffs are you talking to yourself; they're a likely waste of your time, and more importantly (team environment) hardly anybody will take the time to figure what you possibly intended; they likely will solve the problem a different way and leave your stubs/breadcrumbs sitting here, feeling unsure what the stubs/comments intended; then what? Bloat.
A variant of what-iffs consists in endorsing as many best practices as possible, without an understanding of the context.
Finally, a thing I often see is developers getting reluctant to delete code produced by misunderstood (or mis-stated) requirements.
Travel light!

Collapse
linajelincic profile image
Lina JelinčiΔ‡ Author

You made a few excellent points. You are right, just as all code comments, leaving breadcrumbs can result in mess.
And yes, deleting code is hard, especially if you've done something you're proud of. We should all remind ourselves that it's just a code and has one and only purpose: to solve problems, not to boost our egos.