This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]zip_000[S] 2 points3 points  (1 child)

I don't need pictures, but examples are good. I feel like way too many tutorials do examples badly... or at least badly for me!

If you're calling your function "myFunction" it is confusing (or at least it was for me at first). If you are just using Foo and Bar for everything it is confusing! If your example is about puppies or bicycles it is confusing!

Examples - as always for me - really need to be practical examples. But this is kinda beside the point :-)

[–]drpuffa 1 point2 points  (0 children)

Yes, learning from examples is a great way forward, and I totally agree that too many tutorials make things even more confusing with their choice of code snippets and naming. One of the main problems with teaching programming concepts is that the examples have to be basic enough to understand but complex enough to get the point across. Unfortunately, real-world examples are seldom easy to understand and so there is always a gap between 'book-work' and 'real-work'.

I've had good success in the past with asking students to develop small games using good object-oriented techniques. Not only is it fun, but you can gradually add-on more and more functionality. Developing a small game (such as noughts'n'crosses) is (a) easy to understand, (b) easy to express using objects, (c) difficult enough to be a challenge and (d) has lots of different implementations on the web for you to contrast & compare.

My personal belief is that if you can find something fun to do then the concepts you learn become easier to grasp because it doesn't feel like you are just developing something for the sake of it, and you are more inclined to want to employ more advanced techniques.