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.