Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Or it could be useful context for the next person to modify the code. Maybe it’s something that is only worth doing under certain conditions?

    // TODO: This is fine for now, but if we start handling `bar`s, we’ll need an extra field for `quxx`.


This is a great way of introducing a bug. The TODO is only visible to somebody looking at the code. If somebody changes a caller to send over bars but doesn't check the comment then you've got a bug. If instead this was linked to the feature request to add support for bars then you've got the relevant context right there on the ticket and whoever is implementing support for bars is much less likely to miss it.


And if the reason bars aren’t implemented yet is because nobody requested it, then there is no tracking ticket.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: