A little challenge now and then
As some of us like to engage in a little problem-solving or challenge so to speak, I thought this blog post might highlight some of the programming exercise sites that are out there in the field. Please observe, that for many of you this might not convey information at all because you may happen to know some or all of these sites already. In case you do know a different site, please mention it, so that I might add it here.
This is the classic programming challenge site. It features a collection of 299 problems varying in difficulty and assumed background knowledge. A somewhat large community has established itself around Project Euler, bringing together people from different countries, disciplines and programming language backgrounds. While most people use main stream programming languages to solve the present problems, it is not strictly necessary. In fact, if one solves a certain problem, it is the most interesting aspect to read what other scholars have done. This often led to me realizing a new solution method to a known problem, including maybe resorting to pen and paper once in while.
To more extensively highlight the challenge part of problem-solving a score and ranking system has been created rewarding fastest solvers or the creative individual having solved the most problems. Whatever your motivation might be, I recommend giving Project Euler a closer look, since it might teach you a lot about problem solving and your approach to it.
While (1) did not impose any particular programming language. This site assumes you solve a presented problem using the Prolog programming language. In case you need a refresher, it also hosts a course to help you bit here and there. While Prolog may seem to many programmers odd at first (after all it has very few and uncommon concepts like functors and atoms), it is a very powerful, strikingly simple and after a while relatively simple language.
Presented problems are arranged according to somewhat obvious CS concepts like lists and trees. The site itself has been given a refresher and looks somewhat more modern (not that you would care while solving a problem). Problems vary in complexity and usually build up in difficulty from one another. Problems (1) make use of basic concepts like counting the occurrences of some element of a list and saving number and occurrence into a new list and (2) show the application of some of these concepts, for example run length encoding. Unlike Project Euler, solutions are present and do not need to be unlocked. On the down side, the site does not attempt to build a community of problem solvers around it. For that, there is no forum, ranking or score list giving you reward for your attempts.
A relatively new site, promoting the use of powerful tools for (white-box) software testing, is Pex for Fun. Pex is a framework for performing automatic (parameterized) unit testing. It uses intimate (symbolic) knowledge about your unit (method/function) to come up with tests that not only execute but all of the (reachable) paths your code contains.
Consequently, Pex for Fun is trying to put you in the shoes of Pex or a software tester for that matter. Your problem revolves around determining input which would trigger a particular exception or change a method so that it will not throw an unexpected error. Problems are posed in one of the major .NET languages (C#, VB.NET and F#). Pex is integrated with FaceBook and offers to let you create challenges for other users – definitely worthwhile to not only learn about Pex, which is an integral part of the Visual Studio 2010 but also to more intimately think about what your code or the code of others is doing.
Intel Threading Challenge (Thanks to Marc McGary; Update: 2010/10/04)
Two levels of participation are available; the Apprentice level gives those just getting started in multithreading development a chance to try out and improve their threading skills, the Master level will be executed similar to last year's contest providing those with more experience a chance to test their skills and compete against other experienced developers. This year competitors will have the opportunity to develop and validate their code using the Intel® Manycore Testing Lab . This 32-core development environment has the latest hardware and software available and will be used by this year's judges to test the winning entries in Phase 2.
While being more a real-world puzzle of type scavenger hunt, some of these puzzles have some form of virtual element to them (see Puzzle Hunt 11.0)
In case you have more to include here, just mention it or drop me a line.