Show Solution Code
This is something I've been meaning to do forever.As a start, I've changed the String-1 and Logic-1 sections so that for about 20% of the problems, it will put up a "Show Solution" button once someone has solved the problem. (To see solutions before solving the problem, see the Warmup sections.)
Inside the solution code I've also added "Solution notes" comments -- a couple sentences pointing out what's useful or interesting about those lines of code.
Very often I see submitted solution code that works, but which could be better, sometimes quite a lot better. Hopefully seeing clean solution code will help people see how to write better code. It does seem like a great moment to learn from the better code, since the person working on the problem has all the right context at that moment, thinking about that problem and its code. Sebastian Thrun of Udacity makes a good argument that putting good solutions in front of people at the right moment can be a big win. Heh, of course having some "perfect" solution put in one's face could be a little annoying! Here they've just made this little victory, and now they have to look at the better solution. Well the benefits seem well worth a little annoyance and humiliation!
The Show Solution button will appear for problems with hints, as they always have. I've added hints for several problems, so those will now show solutions too. I've also added the Show Solution button to a bunch of random problems, doing it for roughly every other problem running down the middle of the three columns in the String-1 and Logic-1 sections. The phrase "Post-solution available" down at the bottom of a problem page means the bit is set so it will show the solution once it's solved. All told, about 20% of the problems in those sections have solutions available, so I figure most people will run in to them here and there.
Custom problem authors: you can do this yourself by adding the showpost:true tag to your problem, or by adding a hint.