Why do we need tests?
What is a unit test? If you're already familiar with unit testing and test-driven development, you can safely skip to the next section. If not, let's just say that unit tests are part of an engineering philosophy that takes a stand for efficient and agile development processes. They add a layer of automated testing to the application code before it is developed. The core concept is that a piece of code is accompanied by its test, and both of them are built by the developer who works on that code. First, we design the test against the feature we want to deliver, checking the accuracy of its output and behavior. Since the feature is still not implemented, the test is going to fail, and so the developer's job is to build the feature in such a way that it passes the test.
Unit testing is quite controversial. While test-driven development is beneficial for ensuring code quality and maintenance over time, not everybody undertakes unit testing in the...