Posts Tagged With 'refactoring'
There is one thing that has bothered me about the asymmetry of relation between the production code and the test code. People often say: “Your tests test the production code, and production code ensures the tests are not broken”.
But it did not feel right. Especially after learning the principle …
Continue reading »
When dealing with legacy code (== code without existing tests), the first task before making behavioral changes is to prepare characterization tests. The easiest way to achieve that is to separate the pure computation from communication inside the existing functions.
But it is a daunting task, because you do not have …
Continue reading »
Why bother
Macrodefinitions in C/C++ code are a sharp tool which must be wielded with care.
Modern compilers allow us to write modern C code without resorting to
the majority of preprocessor tricks we’ve had to use if we had been stuck in 1999.
The goal here is …
Continue reading »