Testing your code
Testing code is another subject that has grown in the past decades. In the early '70s, testing code was not actually part of the development process but part of the debugging process when there was a problem with the software. Testing assumed significance when American computer scientist Glenford Myers published the classic book The Art of Software Testing in 1979, proposing the separation of debugging from testing.
Since then, much has improved in the development process with testing. Today, it is about preventing errors, and the process to develop code with tests that prevent errors is called test-driven development or TDD.
In the process of developing the code, the developer must identify two parts of the code: testable and non-testable code. Testable code is pieces of code that are easily verified by low-level testing, such as a unit test. Non-testable code is pieces of code (such as the import of a library) that are not easily tested at a lower level...