Coding Challenges

Recent changes
Table of contents
Links to this page

For some years now I have been running a coding challenge. It was an attempt to get people to think about their code in a different way by highlighting just how hard it is to write code and then test it until it's right. The problem of combinatorial explosion guarantees that even with the most comprehensive tests some potential combinations of parameters won't be tested, and so code must be written in such a way as to allows us to convince ourselves and others that it's right without having to test it.

To this end I set a small challenge: write a routine to perform a binary search, but don't test it.

I thought people might be prompted to think differently about their code and to take it as a real challenge to get it right. However, people seemed to dash off their code, and then when it failed somehow say that the test was unfair. Clearly I was wrong in my belief that people would see that the whole point of the challenge was that inadequate (in this case non-existent) testing should force them to change the way they work.

What really bothered me was that so many simply didn't seem to care that their code was wrong.

I am in the process of starting up a second challenge, with any luck having learned something about programmers from the first. As of 2002/01/17 it is being checked by a few hardy souls before it goes live. If you're interested in helping this process, or if you're interested in trying the challenge when it's ready, let me know at

In the meantime, here is a link to the first challenge:

Have a go. What do you have to lose?


There were no headings
in the main text so there
is no table of contents.

Links on this page

Site hosted by Colin and Rachel Wright:
  • Maths, Design, Juggling, Computing,
  • Embroidery, Proof-reading,
  • and other clever stuff.

Suggest a change ( <-- What does this mean?) / Send me email
Front Page / All pages by date / Site overview / Top of page

Universally Browser Friendly     Quotation from
Tim Berners-Lee
    Valid HTML 3.2!