Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.misc Subject: Re: Why Johnny can?t code Date: Tue, 02 Sep 2014 20:50:44 +0100 Organization: A noiseless patient Spider Lines: 42 Message-ID: <87d2bd3ip7.fsf@bsb.me.uk> References: <020920141223320871%timstreater@greenbee.net> <87d2be3zow.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="22316"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1rTABuiRsN/Pdg2z4RqwqVdSbV27uWvo=" Cancel-Lock: sha1:yaR1c5m8AKl2Yz4Pcz3btcBBpsE= sha1:9eIvZMlwHvgcOWcrW3uQCM6xMDk= X-BSB-Auth: 1.2114c2dc5a8802644f7b.20140902205044BST.87d2bd3ip7.fsf@bsb.me.uk Xref: csiph.com comp.misc:4661 Rich writes: > And in any sense, "learning to program" and "learning to think like a > programmer" is much more important at that age than the actual language > in use. They can pick up a second language easily enough once they've > learned the hard thought processes first. I don't think it's that simple. You can get stuck in thinking in one way based on the language you learned to express your programs in. Obviously (despite some people's exaggerated claims) this is not for life, but it can take a while to undo. It's important that the most important things be simple to do. I think that functional abstraction is the most important concept in programming so it should be easy (trivial?) to work with functions. Loops and so on are easy to understand in comparison and can, in any case, be subsumed into functions if you have a mind to (I would not do that with beginners). In the course I mentioned, drawing a square was the first program. The second drew four squares at the corners of the screen. The third did it properly by calling a square-drawing function four times. The trouble with most of the interactive languages that have been mentioned here (Python, Tcl and so on but there's a vast list) is that to define functions and then edit these definitions you pretty much have to get out of the REPL interface and into an editor. Yes, there are way to make that relatively simple, but the process is not seamless as I would like it to be for a child's programming system. Smalltalk was pretty damn good at this, but I doubt it would look right these days -- to many little floating windows! If I were designing this for real, I think I'd go for a browser-based interface. "Programs" would be on stored on the server with all the components previous written immediately available in some way (i.e. no "program in files" concept). Part of the screen would be an edit window with real-time syntax checking, with the output displayed in another part as soon as the "program" generates any. ("Program" in quotes because I don't know exactly what I mean by that in the context.) -- Ben.