Book Image

Clojure Web Development Essentials

By : Ryan Baldwin
Book Image

Clojure Web Development Essentials

By: Ryan Baldwin

Overview of this book

Table of Contents (19 chapters)
Clojure Web Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The necessity of testing


I will fully admit that, for the bulk of my career, I've used automated testing in some capacity on almost every project I've worked on. For nearly a decade, I've employed the practice of test-driven development (TDD) to some degree.

While working on applications using Java or .NET, I often write tests to help me explore ideas and assist in the design and implementation of those ideas. I follow the TDD "Red/Green/Refactor" (http://en.wikipedia.org/wiki/Test-driven_development#Development_style) with discipline, and what I produce often works, is extensible, and is in the style of those languages (for better or for worse). I also have a safety net, which validates whether the system does what it is supposed to do; this comes in handy as the system grows, changes, and gets refactored over time.

The Red/Green/Refactor methodology dictates that you write a failing test first, then implement the least amount of code to get that test to pass, and then refactor your code...