Learn how to code via Assert


I just got finished hanging out on the #CodeNewbie Twitter chat where I was blabbing about TDD this and assert that. I’m putting this micro post up as a place-holder for a topic I plan to explain in detail, using unit tests to explore and learn code. Hi, I’m Cliff. You’re here because you wanna know more about TDD and asserts. I’m here because I spent way too many keystrokes talking about it on the Twitter chat.

The simplest form of unit test is the “assert” which is available in most languages. The idea behind the assert is to check a value or condition. The magic behind the assert is that it echoes the condition or expression back to you. When used correctly it can be a powerful learning tool which can double as documentation.

Leave a Reply

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