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.
I think it would be great NOT to have a "Show Solution" button on any problems. I may have to stop using the site with my classes. It is too much of a temptation to click the button, instead of engaging with the problem. I know solutions are available on the web, but this takes more of an effort. Seeing different solutions that their classmates come up with causes great discussions about such things as clear vs short code. I believe the "show Solution" button will take much of this away.
ReplyDeletenice useful video/hands on tutorials for beginners in python
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThank you for a GREAT ;) site Nick! I'm just starting with Java programming, and this is the best training i have found.
ReplyDeletecheap jordan shoes
ReplyDeleteyeezy 350 boost
michael kors outlet store
nfl jersey
hermes outlet online
fitflops sale
polo shirts
north face jacket
converse sneakers
hermes bags
columbia
ray ban 90% off
celine outlet
michael kors factory outlet online
nike air force 1
mont blanc
michael kors outlet stores
fitflop shoes
coach factory outlet
louboutin outlet
cheap michael kors handbags
celine bags
fitflop shoes clearance
kobe bryant shoes
oakley sunglasses
ferragamo sale
hermes belt
coach factory
north face jackets
oakley sunglasses outlet
michaelkors
ralph lauren factory
north face jackets for women
coach factory outlet
ray ban wayfarer sunglasses
coach handbags outlet
fitflop outlet online
vans outlet
coach factory outlet
cheap salomon shoes
kevin durant shoes
cheap jordans shoes
polo ralph lauren outlet
new balance sale
canada goose sale
coach purses
20160612yxj
polo ralph lauren
ReplyDeleteuggs outlet
north face outlet
adidas yeezy
coach factory outlet
ugg boots
longchamp handbags
mont blanc pens
carrera sunglasses
uggs uk
ray ban sunglasses cheap
ReplyDeletelouis vuitton handbags
pandora rings
christian louboutin shoes
nike air max shoes
uggs classic boots
fitflops sandals
cheap jerseys
adidas originals uk
polo ralph lauren outlet
2017.9.25chenlixiang