Programming Pearls Col 5 – A Small (but very important)Matter of Programming

Col 5 is all about the Science and Art of Testing (rules and where, when and how to apply the rules).

-Define expected output

-Cover all cases

-C/C++ Compile-time assertions:

Further reading:

-When the algorithm is part of a big program, use scaffolding/automated testing/line-by-line debugger

-When the algorithm is stand-alone, print statements might be faster

-Be wary of bugs in different environments, experiment with them frequently to gain insights for fixing bugs



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s