Get them to describe everyday tasks. Examples:
Cross the road? Stop at the kerb, look both ways, then cross. You just got killed. You looked, but your actions did not take account of what you saw.
Make a cup of coffee? Fill the kettle (the kettle's already full of air) with water (from the washing up - it'll make you ill) etc.
Do one with the whole class, then divide them into groups each with a different task and get them to "pair programme" it. 3 minutes on the class task, 3 minutes in groups then 4 minutes presenting solutions. This will give them some feel for what real programmers have to look out for.
Update: I see hominid came up with a very similar idea while I was typing mine.
Update 2: Please let us know what you tried & how it went.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||