Don’t assume; assert.

For the love of Knuth

If you write code that makes assumptions, assert on those assumptions and assert in a manner that the developer stuck with maintaining your code will see them.

Doing so would save much hair loss, and cut down on the number of times the original author of the code gets damned to hell by the maintainer.

Thank you.

About these ads

Join the discussion!

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s