Archive for the ‘Development Methodology’ Category


Optimise Selectively, Type-Check Selectively

November 30, 2010

Heard of “write, first, optimise later”?” If you had
an infinite amount of time, you could optimise everything. Since you
don’t, you need to optimise the areas of code that need optimisation.
Likewise, if you apply high-strength static constraints to all your
code, you will spend a lot of time fixing pedantic issues that don’t make
a difference. (A correct programme will work without any checking.
Checking doesn’t make anything work. It tells you what
what isn’t working and why). Therefore, you need to selectively type-check
code regions that seem problematical — as already occurs in the selective use of runtime checks such as assert()s and error logging commands.