Archive for May 2010

Self Documenting Code

How to write self documenting code? Just write all the information signature of the methods AND write extensive behavioral unit tests. The behavioral unit tests should have a name that describes exactly what the test is trying to accomplish and therefore will document the goals and behaviors.

This way you can save yourself time by not having a lot of external documentation. Most importantly, since the code is the only thing that will always truly be kept up to date, your documentation will always be up to date.