3 ms·
'Assert early and often'. Check your assumptions all the time, nine out of ten times that's where your bugs will hide.
by jacquesm 7y ago
'Assert early and often'. Check your assumptions all the time, nine out of ten times that's where your bugs will hide.
- nineteen999 7y agoMy C programs always start as a few skeleton .h files with include guards, and a few .c files that are basically an ever growing list of asserts() on any pointer to a structure or variable, or on any value where it is expected to be within a certain range. Gradually I feed my structs and typedefs into the .h files and replace the asserts with (hopefully) working code.