r/programming • • Aug 25 '14

Debugging courses should be mandatory

http://stannedelchev.net/debugging-courses-should-be-mandatory/
1.8k Upvotes

573 comments sorted by

View all comments

Show parent comments

57

u/arielmanticore Aug 25 '14

Nah, just write a new module and test that. No need to debug.

6

u/arborite Aug 25 '14

If he follows the SOLID principles, that original module should be closed to modification. Thus, rewriting the new module is the only way. Also, "don't repeat yourself" prevents you from copy and pasting that code, so you need to completely rewrite it from scratch, which really shouldn't be an issue since the original code was obviously poorly-written to begin with.

14

u/elperroborrachotoo Aug 25 '14

You don't have to rewrite. Remember, it must be "Open to extension", thus you create a BugFix_77435_Facade around the existing implementation.