The Coding Challenge

Before I go into too much detail about where the coding challenge came from and what the results were, I urge you most strongly to attempt it for yourself. Believe me, you won't get half as much out of the results if you haven't crashed and burned for yourself.  To this end, this page does  not  take you to the results, analysis and discussion. To do that you have to read at least some of these pages to find the magic key, or submit your own code for testing.

The coding challenge arose from the belief that complex code simply cannot be tested thoroughly. The world of testing works very hard to ensure that both cases and code are both covered, but still there are bugs that slip through undetected, only to surface at the most inconvenient times.

Given that live code will not, generally, have been sufficiently tested, we therefore must rely on due diligence from the programmers. Most programmers will claim that when they try hard they can write good code, and the coding challenge has been designed to show them that they are probably wrong.

The coding challenge is a distillation of the problem. In it, a programmer is asked to take extreme care and write a short routine that is not to be tested at all. This is an attempt to capture code that has been written carefully, but which the full rigours of a test program has missed. The evidence of bugs in production programs shows clearly that such untested code or conditions exist, so this is a way of forcing that situation.

Is this a fair challenge? Judge for yourself. The specification is detailed, you have as much time as you like. The only restriction is that you must not run your code on a machine. Given that the routine to be coded is well-known, it seems fair that you are also asked to write the routine for yourself from scratch, and not look it up in any external source. So many people have complained that this is "utterly ridiculous" (actually, most say "utterly rediculous" (sic)), and that no code ever goes live without testing, I've decided to relax this condition. Even if you have tested your routine, please still send it to me. Let me know what testing you've done, and how you've written/derived your code. Make whatever tests you think are relevant for the problem at hand.


The specification can be found here.
Details on how to submit an entry can be found here.

Information on where the challenge came from and a summary of the results can be obtained via a link somewhere on this site, or by submitting your own entry.

Last modified: 2008/05/16 CDW