Slashdot Mirror


Learning to Code with a Boardgame

markmcb writes "While some of us cling tight to our memories of Apple-filled classrooms playing The Oregon Trail and driving our Turtle around in Logo, children today have many other ways to learn about the inner-working of computers and the code that drives them. Wired.com is running an interesting article about a boardgame in which players must use simple logic similar to that used in programming to get their skier down the mountain. From the article: 'Using basic math, players have to figure out which paths are open to them and then decide the fastest way to the finish line. The trick, however, is learning which paths are open to you using only programmer jargon like 'if (X==1)' then you can take the green path or 'while (X4) you can take the orange path,' where X is the roll of the die.'"

1 of 204 comments (clear)

  1. Re:Bad Design by TheRaven64 · · Score: 4, Interesting
    Those who don't get taught GOSUB have to invent it themselves. I wasn't taught about GOSUB when I first learned to program, so I ended up writing my own. Every time you called GOTO, you wrote your line number into an array and then incremented a variable. When you returned, you copied that line number into a variable, wrote a return value over it, decremented the stack counter and jumped back. Due to the limitations of the language (and, perhaps, my understanding of the language aged 7) you could only store one integer (the return value) on the `stack', and it could only be a maximum of 255 calls deep, but it was a stack. Like early computer designs which stored the return values in the base of the function (which I didn't learn about until 11 years later), it was not capable of recursion.

    Some years later, I implemented a pseudo- virtual memory system using a very primitive analogue of mmap on the Psion Series 3. This allowed for arbitrary-length strings - something not possible in the built-in BASIC-like OPL, which used PASCAL-style strings.

    My somewhat rambling point? Sometimes it can be better to learn to program in limited settings. If you don't have the tools you need for writing good code, but do have a Turing-complete language, then you end up inventing the tools yourself - and then you understand them much better than anyone who learned simply by being told that they exist.

    --
    I am TheRaven on Soylent News