Can you read code in C#, F# or Visual Basic? Do you like programming puzzles we (well the Pex Team, part of the Research in Software Engineering (RiSE) group at Microsoft Research) has a site for you. Pex for Fun is a web site with programming puzzles in those three languages. The idea is that you are presented with a programming stub and asked to fill it in with code to solve a problem. The catch is that you are not told up front what the program is supposed to do. Pex will run and compare the results of your code with the results of a perfect solution. By examining the differences you try to determine what is desired and write code that matches the test cases that Pex comes up with.
Pex for fun on the web is a radically simplified version of the fully featured Pex Power Tool for Visual Studio. You do not need to install anything; all the work happens in the cloud. You can write code in C#, Visual Basic, or F#. Go to www.pexforfun.com, which comes with a set of code puzzles. Then click on the “Ask Pex!” button to get the answer yourself. Share your puzzles with your friends. Watch the tutorial, and read the documentation to learn more!
I have to tell you that I visited the site yesterday and was occupied for hours solving puzzles. It was great fun. And you can creat your own puzzles as well. There is a section about teaching with Pex for Fun as well.