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.'"

42 of 204 comments (clear)

  1. Bad Design by jmlsteele · · Score: 3, Funny

    I was told to never use a goto...

    1. Re:Bad Design by TheRealMindChild · · Score: 2, Funny

      grep the linux kernel... you may wet yourself.

      --

      "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    2. Re:Bad Design by PalmerEldritch42 · · Score: 2, Insightful
      The gosub command is a wonderful thing that more BASIC programmers should have used. It allows one to develop a subroutine that any other part of the program can access. It was the foundation for how I learned OOP. Goto statements were seen as hackish attempts at redirection, too often resulting in Spaghetti Code that is all but meaningless to anyone else who ever had to look at the code.

      While there are uses for goto satements (I made a choose your own adventure-like story using only goto), gosub is a far more elegant solution to most of your redirection needs.

      --
      Ceci n'est pas une sig.

      :wq!

    3. Re:Bad Design by GeneralHorel · · Score: 2, Funny

      out of fear or excitment

      --
      Slashdot sigs contain more useful information than the articals
    4. 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
    5. Re:Bad Design by elronxenu · · Score: 3, Interesting
      No they won't. You're proposing that people with no formal training and no reference material will independently redevelop recognised programming techniques.

      The largest number of people will invent nothing new; they'll just program within the limitations of what they were taught.

      A smaller number of people will invent something new, but it will be some kind of kludge. They'll use it everywhere they can. It will be inefficient or inelegant, but they won't notice that.

      A very small number of people will invent something new which works well, is efficient and elegant.

      My opinion is that if you teach 100 people how to program in BASIC without any mention of GOSUB, then have them solve problems by writing programs, and after a while you check what techniques they use, you will find that 90% of those people are writing spaghetti code with no discernable structure (or maybe only WHILE loops), 8% have implemented the idea of the subroutine by supplying a return address in a fixed location (so recursion is not possible) and the remaining 2% have implemented their own stack and use it to simulate proper recursive subroutines.

      There has been much more bad design in the history of computer science than good design. I don't see why the situation we see in the large should not apply to individuals too. Just look at language design. Some recognised (nay, famous) programming languages are awful. You think the people who designed those languages weren't smart?

      Just look at Niklaus Wirth - and the botch he made of Pascal's string handling, data structures and control structures. This was a guy who studied and taught computer science.

      Take a look at COBOL, if you can stand to. Clearly botched in a number of areas, at least in the 1985 revision which is when I last had to look at it. In areas such as conditional handling, data structures, dynamic memory allocation. COBOL had one good idea, namely statically defining the allowable contents of various data areas, and that's about it.

      I can only argue that students should be taught best practices from day one, on the basis that they will most likely never invent those best practices for themselves (98% chance) and could develop bad habits as a result of their stunted education (90% chance).

      Case in point - a schoolfriend of mine. He liked to program but he didn't study programming. He came to me once so proud of his invention of a sorting function in BASIC. I checked it out and it was a Bubblesort. I don't recall whether I had the heart to inform him that the bubblesort is possibly the slowest recognised sort algorithm.

      Teaching programming to kids is a different kettle of fish. Depending on the age of the kids, introducing subroutines and stacks and recursive data structures may be well beyond their capacity to understand. So for kids, start simple: top to bottom execution, arithmetic, strings, conditionals, while loops. When they're ready for it start to introduce subroutines, data structures, recursion, pre- and post-conditions, invariants, objects, interfaces, inheritance, polymorphism.

  2. Robo Rally by Speare · · Score: 4, Informative

    Also try Robo Rally. Of course, this deals with how to program a computer with a VERY limited instruction set, and with damaged hardware. :)

    --
    [ .sig file not found ]
    1. Re:Robo Rally by ArsonSmith · · Score: 2, Insightful

      It also teachs you about the aggressive tendancies of other programmers as well as the simple fact that other programmers just sometimes get in your way.

      --
      Paying taxes to buy civilization is like paying a hooker to buy love.
    2. Re:Robo Rally by Yazeran · · Score: 2, Interesting

      Yep.. :-)

      Personally i think that Robo Rally is best with a group ov nerds and a crate of beer, but seriously, I can see that it could actually be used for educational purpose for kids, as there is a degree of exitement in the game (will i get to xxx without getting more shot up so i can repair?).
          At the same time educate something about the strict logical rules of programming (that a computer will do *precicely* what you programmed it to do without any consideration about the surroundings or change in the conditions the programmer did not anticipate) in a fun way (as learning it the hard way in front of a real computer can be quite fustrating as we all know...).

      Yours Yazeran

      Plan: to go to Mars one day with a hammer

    3. Re:Robo Rally by jscharla · · Score: 3, Informative

      With the Armed and Dangerous expansion there are a couple of upgrades that let you do limited run-time branching.

      My vote goes with Robo-Rally too. A great game. Total mayhem.

      --
      Save the whales... Collect the whole set.
  3. engineering application by millahtime · · Score: 4, Insightful

    This could have good implications on future engineers. Where I read that the US is falling behind, this could help teach the logic engineers, especially electrical and computer engineers, need to use regularly.

  4. Actual squares from the game by Radres · · Score: 5, Funny

    "Job outsourced to India! Go directly to trade school, do not buy a house, do not get laid."

    "High school reunion time! The same guy who kicked your ass every day in high school and barely passed wood shop laughs at you because he makes more than you as a plumber while you wasted 4 years at college. Go back 3 spaces."

    1. Re:Actual squares from the game by sgt+scrub · · Score: 2, Funny

      well, at least the "not getting laid" part didn't change.

      --
      Having to work for a living is the root of all evil.
    2. Re:Actual squares from the game by korbin_dallas · · Score: 2, Funny

      Stop and read Slashdot. Skip a turn and write a reply to a topic.

      Boss needs estimates NOW! Skip a turn and write the boss some time estimates.

      Sidetrack! Your company moves your office so a VP could get a bonus this quarter. Skip a turn.

      Design Review! Skip a turn.

      Code Review! Skip a turn.

      Weekly Meeting! Skip a turn.

      Damn, no wonder I don't get any code written...

      --
      They Live, We Sleep
  5. Why not build a robot?? by technoextreme · · Score: 4, Informative

    There are fifty differnt robot kits floating about. They are much more entertaining and probably can help people program just as much as a boring board game.

    --
    Ooo man the floppy drive is broken. No wait. The computer is just upside down.
    1. Re:Why not build a robot?? by Surt · · Score: 2, Funny

      Board games don't have to be boring. I made a boardgame of the new show 'Prison Break'. It comes with a metal shiv for each player, and only the winner walks away. Tell me that's boring!

      --
      "Who is the Journal of Quantum Physics going to believe?" --Stephen Hawking
    2. Re:Why not build a robot?? by lawpoop · · Score: 2, Insightful
      Board games (and probably games in general) appeal to people who are interested in competing with others. Robotics kits appeal to loners, and certainly don't lend themselves to a group effort or competition. Sure, you can have robot battles *after* you or a team has built a robot, but at that point you are making a game out of the robot-building.

      We need both types of projects to teach all kinds of kids logic.

      --
      Computers are useless. They can only give you answers.
      -- Pablo Picasso
  6. From c-jump.com by Stanistani · · Score: 2, Informative

    *Of course this omits thre pretty pictures*

    c-jump: Ski & Snowboard Race

    Discover fundamentals of computer programming by playing a board game!
    c-jump helps children to learn basics of programming languages, such as C, C++ and Java.

    Players:
    2 to 4 players
    Ages:
    11+
    Object Of The Game:
    First player to move all skiers past the FINISH line is the winner!
    Equipment:
    One game board, one die, and sets of colored pawns representing skiers and snowboarders for each player.

    Great and unique learning game for kids! It teaches the child basic commands of a programming language, such as "if", "else", "switch", and introduces variable "x" concept.

    The child calculates number of steps in the move, including addition, subtraction, division, and multiplication of small numbers. The game helps to develop understanding of a complete computer program, formed by logical sequences of commands.

    This game eliminates intimidation of many kids and their parents, bored by the mention of "computer programming", often associated with visions of geeky guys glued to their computers. c-jump reveals simple programming terms in a cool way!

    By moving around the board , entering loops, branching under conditional and switch statements, the players gain physical experience of a complete program. Understanding of the internal action of a computer is essential to understanding what software is. Static program causes dynamic process in the computer. By playing the game, players see this process as physical and spacial motion.

    c-jump facts:
    This game is not only about teaching and learning: it's fun and entertainment for the whole family!
    Skiing and snowboarding is a perfect programming analogy.
    c-jump game is ideal for home school education.
    The game is based on the code of a real computer program!

    Proceedings of our business support Common Text Transformation Library, an open source programming project on the internet. Please feel free to visit and download!

    US Patent 6,135,451
    © 1997-2005 Igor Kholodov

  7. Rules. by coolGuyZak · · Score: 3, Informative

    Here are the rules, in case people want to check the game out further.

  8. SkiFree! by sonixtwo · · Score: 5, Funny

    Maybe some kid will figure out how to finally get past that damn monster!!

  9. This really is only dimly connected with programs by UserGoogol · · Score: 3, Insightful

    This is really more of a math game than a programming game per se. Yes, it teaches the concept of conditional branching, but that's not especially new to the world of board games. Also, "x" isn't really a variable, but instead represents the number you rolled, which is different from how programming actually works. (Which is potentially confusing, because c-jump otherwise uses a fairly C-like syntax, with == instead of = and everything.)

    Not to say that this isn't a potentially educational game, but this is really more a way to practice doing simple arithematic and logic instead of anything specific to programming itself. (Although arithematic and logic is certainly worth learning.) It would probably lose absolutely nothing in playability or educational value if they removed all C stuff from it and just made it into a silly little math game.

    --
    "Never attribute to malice that which can be adequately explained by stupidity." -- Hanlon's Razor
  10. I liked the concept by leighklotz · · Score: 3, Informative


    One of my favorite early computer toys was the CARDIAC, the Bell Labs "Cardboard Aid to Computation," and I was hoping that this board game might re-create some of that excitement for today's kids. I liked the concept, but was a little dismayed by the attention to syntax. I'm more of the "Syntactic sugar leads to cancer of the semicolon" school of thought.

    I worked on the Logo implementations for the Apple ][ at the MIT Logo lab, and at Terrapin did the Commodore 64 (and other ill-fated Commodore computers), Macintosh. (I also various implementations and translations for Japan, Spain, France, and Germany.)

  11. Learning to Program by mysqlrocks · · Score: 2, Insightful

    Learning how to become a computer programmer has never been easy or fun for most people. Some would even call it boring.

    This first line hints at an important point the article missed. Some of us actually liked learning to program. I remember learning BASIC on my Apple IIC when I was 12 years old. If you don't have the hacker mentality - the feeling that you want to figure things out - then you're going to have a hard time learning to program. I don't know, maybe this hacker mentality can be learned.
  12. Solitaire Encryption Algorithm by Danta · · Score: 2, Interesting

    If you find this interesting you might be interested in Bruce Schneier's Solitaire Encryption Algorithm, a real encryption algorithm using a deck of cards.

  13. Looks boring by LordNimon · · Score: 5, Insightful
    I tried reading the rules, but they're hard to understand just by reading the web page (and yes, I'm a programmer). From what I gather, there are no real decisions that the player makes. That is, you roll the dice and your move is based solely on that dice roll and whatever square you happen to be on.

    What would be cooler is if while playing the game, you had to build a "program" of sorts, and you can't win the game until your program produces a specific output. You could then compete against other players for resources needed to finish your program. This would allow you multiple ways to win based mostly on your ability to understand programming concepts.

    I see this game as a cool idea, but it's really just a first step.

    --
    And the men who hold high places must be the ones who start
    To mold a new reality... closer to the heart
  14. Yeah, they're like exceptions in C... by mekkab · · Score: 2, Insightful

    I just wrote code today that had a bunch of gotos in it.

    pass in a string pointer, and if your return code was -1 log the string.

    If you use Exceptions in Java or Ada under the covers they are just jumps.

    --
    In the future, I would want to not be isolated from my friends in the Space Station.
  15. Robot Odyssey by willy_me · · Score: 3, Interesting

    This was a great little Apple IIe style game that I enjoyed in elementary school. Looking back, I now see that it taught basic electronics and logic. It was lots of fun at the time. More info can be found here.

    1. Re:Robot Odyssey by moofrank · · Score: 2, Interesting

      Actually, this is how I learned logic fundamentals. The game itself teaches the basics of digital design including the core gates, AND, OR, flip-flops, as well as timing and delay issues. The game is pretty hard considering the intended audience, with some of the final puzzles requiring having three robots zipping around a room, sending signals to each other to keep their moves in sync. Best educational game ever.

  16. Bah. Back in my day... by Otto · · Score: 2, Informative

    We used LOGO on an Apple IIe and we liked it!

    That little turtle moving all over the scren to make what were essentially spirograph pictures? Back then that was state of the art shit, boy.

    Made learning programming reasonably simple too, since you learned to think in terms of the algorithim. Also taught trig, since you had to deal with angles all the freakin time. But it worked, by gum! :D

    --
    - Give a man a fire and he's warm for a day, but set him on fire and he's warm for the rest of his life.
  17. It's been done before: PLATO IV by sakusha · · Score: 3, Interesting

    I remember seeing a similar theme a long LONG time ago, back when I was a little kid about 12 years old, when I wheedled access to the local university PLATO IV terminal.

    The scenario was a little oval track with a train that went around and around, the computer randomly generated 3 numbers, and you would type in an algebraic expression to get the number of spaces you would move. You could go for the longest distance, or you could try to hit special squares, like bonus multiplers, or you could try to land on the computer opponent's train which would send him backwards. I was a pretty young kid back then, but I do recall it really made me think hard about algebra, and it was a lot of fun.

    PLATO IV had another educational game I really liked, I think it was MoonWars or something like that. You could play live against online opponents too. You had a screen with a random placement of circles (representing craters, I guess). Then you and your opponent were placed on the playing field. You played in alternating turns, you could either shoot a laser at your opponent, or move. The laser would bounce off the sides of the screen, only stopping when it hit the opponent or a crater. Sometimes if you had a clear field, you could use angles really close to perpendicular or horizontal, yielding crazy shots that went back and forth dozens of times. But mostly you just tried to bank shots off the sides, trying to home in to the opponent until they chickened out and moved. The educational content was pretty good, obviously you learned that angle of incidence = angle of reflection, but it also allowed you to input your shot's angle in algebraic notation, in degrees or radians. I immediately realized it was a lot faster to do algebraic notations in radians.

    PLATO IV really was a groundbreaking platform for educational games, someone ought to revive some of their old classics. I made a couple of feeble attempts to write a MoonWars clone but I never got anywhere.

  18. Re:Why oh why?!! by Wildclaw · · Score: 2, Insightful

    Your argument violates the prinicipal of not doing premature optimization. The choice between ++x and x++ should depend on readability.

    If you are using it as a standalone statement the obvious choice is x++ in most object oriented languages since it follows the convention of writing the object first and the action afterwards.

    If it is not standalone the different variants have different meanings so there is no need to choose because you are forced to use the correct one or the code won't work.

  19. Games that teach computer logic by g_adams27 · · Score: 4, Informative
    For learning the basics of AND, OR, XOR and NOT logic, along with building basic circuits, you just can't do any better than Robot Odyssey. This is probably the greatest educational game I ever played as a young teenager. I trace my interest in studying, and then making a career out of computer science largely back to this game.

    For slightly younger people, there's Rocky's Boots made by the same people (The Learning Company). It teaches a lot of the same things, but in an easier (and cuter) style.

    All you need is an Apple II emulator like AppleWin and you're all set!

    1. Re:Games that teach computer logic by Jim+Hall · · Score: 3, Interesting

      You may also be interested in GNU Robots. I wrote this several years ago, but stopped working on it in 2000 (it was complete, though.) The GNU Savannah site still lists me as project owner, but zeenix now does the development. He last checked in changes 2 weeks ago, so looks like it's still active.

      I wrote GNU Robots because I had fond memories of the old Mac game, Chipwits. In Chipwits, you construct a "program" for a simple robot by setting down "tiles" or "chips" in a grid, where each "chip" contained a single action (check the space ahead of you, pick up an object, turn, move forward, etc.) There were T/F "chips" to make checks. Each "chip" was wired to the chips around it. This was a gentle introduction to the concepts of computer programming. I was already a programmer of sorts, but I found the game fascinating.

      GNU Robots is a much simpler version of that, but (in theory) should be extensible to something like Chipwits. A robot program is written in Scheme, where you have functions available to make the robot turn, move, etc. You might be able to construct a programmer's GUI to set up a "tile" for each action, where each "tile" can be represented by Scheme code. And the wired connections to each "tile" can be represented by tail-recursion. I lacked the GUI programming knowledge to create this at the time, which is why I left it as a simple Scheme program. (If anyone out there is interested in doing this, many people will thank you for it.)

      FYI: the Chipwits home page shows it as "coming soon" since 1999. So there's no hope in a return of the original.

  20. Fun Game - ACTUAL PROGRAMMING by Jack9 · · Score: 3, Informative

    Changed a bit since it was being beta tested in 1996 and even more difficult getting 3 other programmer kids to play...

    http://www.sierramadregames.com/smg/robotanks.html

    --

    Often wrong but never in doubt.
    I am Jack9.
    Everyone knows me.
  21. They're reissuing it [O frabjous day!] by Dr.+Photo · · Score: 3, Informative

    I thought of (and googled for) Robo Rally too when I saw the article, and it appears that they've reissued the game, which had been most lamentably out of print for 4 or 5 years.

    Still costs around 50 bucks, but IMO definitely worth it.

    http://www.wizards.com/roborally/

    1. Re:They're reissuing it [O frabjous day!] by GospelHead821 · · Score: 2, Informative

      I purchased the reissue and I am very satisfied with my purchase. It's a smaller set of boards and it doesn't include many of the more complicated board elements (radioactive goo, etc.) but I think that serves to streamline the game. The rules are better defined than I remember them being in the original (although, being an Avalon Hill game, you still have to interpret sometimes.) I think that there's a good distribution of cards and a very nice selection of boards. The option cards a a trifle dry, but some of the more "exciting" options were terribly hard to understand. I give the game high marks -- probably 8.5/10 overall.

      --
      Virtue finds and chooses the mean.
      Aristotle, Ethica Nichomachea
  22. Mindrover by p_conrad · · Score: 2, Interesting

    This looks really basic, and why skiing?

    If you really want a kid to dive into programming, I'd think Mindrover is a better choice. It's got programming, simulated physics, simulated electronics and competition that doesn't involve a roll of the dice.

    I don't see how the c-Jump game would ever teach the trial and error aspects of coding. In Mindrover, you code better to win, and get to see a lot of hilarious faliures as you learn.

  23. Better Off Dead by ellem · · Score: 2, Funny

    $go (that way eq really_fast) ;

      if $something (%gets_in_way) {
         $turn ;
      } else {
         die print "You have crashed!" ;

    --
    This .sig is fake but accurate.
  24. Paradigm Shift Underway by viewtouch · · Score: 2, Insightful

    What's happening is that we are yet again changing the way we think. When we developed spoken languages it changed the way we think. When we developed written languages it changed the way we think. When we developed mathematical, chemical, financial and engineering languages it changed the way we think. Now we're developing graphical languages and that will again change the way we think, not to mention the way we communicate, work and create. This is really what the article hints at and this is why it's tremendously significant. When a person uses a graphical language instead of a text language it's an entirely different process, approach and result.

  25. This goes back to the PDP-11 or earlier by Urusai · · Score: 2, Interesting

    Stacks were done with something like:
        POP x = *(p++)
        PUSH *(--p) = x
    since stacks grew downward. With this method, p == 0 means empty stack, which is nice.

    The only reason ++x might be faster than x++ is that no "temp" register is needed to store the unincremented original value. The two forms are NOT semantically equivalent, unless you are ignoring the return value. Any half-smart compiler would not allocate a temp register for an unused value.

    And that's all, folks.

  26. Rocky's Boots by jafiwam · · Score: 2, Informative

    There was a game way back when on the Atari2600 called "Rocky's Boots" that presented sorting problems of objects on a conveyor belt in various factory situations.

    The player took mechanizms like "not" and "or" and characteristics "round" or "filled" to make logic that would operate to sort the things.

    It was a great game. I have not seen anything quite like it since.

  27. Don't forget ZZT by eieken · · Score: 2, Interesting

    It is a great little adventure game I played when I was a kid that helped me learn programming concepts. You can design your own levels and program little objects to do whatever you say. It was kinda like programmable Rogue. You could use the ZZT programming language to make the little objects do all kinds of neat stuff, very fun to play too. See it here

    --
    Meet new people, and kill them.