It can be tempting to provide examples of what not to do, but the problem is that then the user is resting their eyes on invalid or bad code. In many such cases, a simple DO and DONT list is more clear and less disruptive to the learning process.

LH: Well, I have a dream about just this very thing. As a non-programmer, I am often stumped by the examples in books. Generally, the section will discuss a topic, and give a short example. If I "get" the example, fine. If not, well......

My dream is a scripting language framework for someone who (like me) is new to programming. It should be able to teach the language and the concepts of programming at the same time. It should be okay material for someone who chooses scripting as a first language.

For example, in a section you discuss the 'list' command, and give two or three examples. Then you have a workbook section where the reader is given a problem, and then a possible solution with a good explanation.

If this were structured, you could combine three to five sections into a chapter, and have the chapter build some useful larger program that demonstrated programming concepts.

My dream requires different skills. It needs some educational theorists who can design the structure and pace the learning. They would also identify different learning styles and advise on how to accomodate them.

It would take the skill of breaking a concept into small parts, and showing how each part works to someone without the writer's level of skill.

It would take people who can clearly communicate programming theory; both the concepts and experienced-based "best practices".

I think that the wiki has a lot of opportunity in this area. If you have some code and an example, and someone doesn't understand, you can easily add another example. You can also review questions on places like c.l.t. (the comp.lang.tcl newsgroup) and integrate the answers here.

[DLB] Alan Gauld's online tutorial "Learning to program" IS aimed at non-programmers. While the principle illustration language is Python, he also gives examples in Tcl (included with Python distributions) and Basic. http://www.freenetpages.co.uk/hp/alan.gauld/

LV Alas, while he previously provided alternative examples in Tcl and QBasic, he now provides them in VisualBasic and JavaScript.