58 ms·
Underappreciated code comment // Ugly hack. To fix later {inserts reasons and breadcrumbs here} Beats naked magic numbers/logic any day of the week.
by ethbr1 2y ago
Underappreciated code comment
// Ugly hack. To fix later {inserts reasons and breadcrumbs here}
Beats naked magic numbers/logic any day of the week.
- bryanrasmussen 2y agoI consulted at a place where I did that and they said don't put those comments in we don't do that here. So probably it's been "fixed" and caused stuff to break since then.
- ethbr1 2y agoDid you try telling them in consultant voice that it's "a generally acknowledged software development best practice"? ;)
- bryanrasmussen 2y agoI mean I argued with another guy for about an hour but they had a thing against comments, it should be in the git logs. Which I understand but I sort of feel it should be in both places because some people are lazy.
- jtwaleson 2y agoI like to put ugly hacks in a file ugly_hack_xyz.py and then import that. Code comments are easier to ignore afterwards.