Home     About

The Edge Cases

whenever writing or reviewing code, make sure that you think through the edge cases both in the local (the code that you are looking at now) and the global (among relevant bits of code) scope. for example what if the passed integer is not in the expected range, what if the pointer is null, or what if the pointer being freed is null?

this makes you a better programmer and your programs more durable, if something happens then you would be able to tell what's the issue just by looking at the error messages, or if not that then the error messages would atleast shorten the list of suspects.