From: "Mauricio Fernández" Date: 2002-12-08T07:59:16+09:00 Subject: Re: Newbie tutorial - if statements On Sun, Dec 08, 2002 at 07:30:56AM +0900, Chris Pine wrote: > > > I say leave out the 'then'. The less is on the page, the easier it is to > understand. Taken to the extreme of making it look like english, you could > tell them if statements look like: > > if cond then#do#the#following > ... > else#do#something#else > ... > end > > My vote is for keeping it simple. if statements are already pretty englishy > and intuitive. And I would only show them the multi-line if statement, > because with it they don't need the single-line version to do what they > want. > > Also, I would leave out 'unless'. It's just another thing for them to > remember. A nuby never wants to hear: "Well, you already know how to do X, > but here are two more ways to do X." If you're going to be teaching them > something, have it always be something new. > > After your tutorial, they can go read the pickaxe or something if they want > to know a few more ways to do X. > > That's my general outlook, anyway. Moreover, if children see 'if ... then' as a natural mapping of English to Ruby, they'll probably try other constructions and be disappointed when they don't work: "Why it is like English in one case and so strange in the other?" IMHO it's good to have them realize from the beginning that Ruby is *not* a natural language, that you cannot express things any way you like, and that there's some things that have to be learned first. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Less is more or less more -- Y_Plentyn on #LinuxGER