Prev | Current Page 334 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


The minimum of code required by the compiler to work is added in the class definitions. The
code does not have to work in this phase. It is enough that the compiler can just produce an
output.
The test is run and will most likely fail because the model methods have not really been
implemented.
The code is changed to provide the minimum required code to make the test pass.
The test is run and will pass.
The code is refactored; if the change is introducing a bug, one of the tests will report the failure.
The process is then repeated until all the functionalities required by the application are implemented.
Coding only the minimum required to pass the tests ensures that the application is not pretending to do
??‘
??‘
??‘
??‘
??‘
??‘
173
Chapter 6: Organizing Your Code
more than strictly necessary. This concept is resumed in the two acronyms KISS (Keep It Simple, Stupid)
and YAGNI (You Ain ??™ t Gonna Need It).
Although the size of each of the described steps is very small, it must be realistically dimensioned on the
capacity and the personal attitudes of the programmer.


Pages:
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346