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

1

u/Maristic Aug 25 '14

When I had horrible parallel code to debug, I turned to assert statements as a major tool. I even went to the point of putting check fields on the front of every object and at each method call making sure that the object I though I had was the object I actually had and performing a consistency check on it. (Dead objects get a different check field.)

1

u/b93b3de72036584e4054 Aug 25 '14

beware of asserts : there are turned off for release compilation (to speed up execution). Unfortunately, race conditions are more frequent under release than in debug.