Re:Ask HN: How do you familiarize yourself with a new codebase?
by weavie on Friday June 26, 2015 @11:12AM
(#9785016)
You remove the printfs when you have fixed the problem.
[ Parent
| on HN ]
Re:Ask HN: How do you familiarize yourself with a new codebase?
by thaumasiotes on Friday June 26, 2015 @05:57PM
(#9787997)
It's so tempting to do this. Don't. Problems may occur again in the same area. Leave your logging statements around; configure your logging setup to skip them when you don't want them.
You're saying to delete commented-out code once the new code works. Put your code in version control instead. Logging is to once-off printfs as version control is to commented-out code.
Re:Ask HN: How do you familiarize yourself with a new codebase?
by weavie on Saturday June 27, 2015 @03:50PM
(#9791328)
Not so sure. Once I get to the stage where I have to stick printfs in the problem tends to be so localized and specific that once fixed I will never need to look at that area of code in that way again.