Learning to Code with a Boardgame 204
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.'"
Yeah.... (Score:1, Flamebait)
Bad Design (Score:3, Funny)
Re:Bad Design (Score:3, Funny)
Re:Bad Design (Score:2, Funny)
Re:Bad Design (Score:2)
Are you sure that wasn't a "gosub"? Goto is rather useful in conjunction with conditional statements.
Re:Bad Design (Score:3, Insightful)
While there are uses for goto satements (I made a choose your own adventure-like story using only goto), gosub is a
Why not both? (Score:2)
The main trick is writing the gosubs so that they execute cleanly and return the state of the sub-routine when they return to the main loop.
Re:Bad Design (Score:2)
That's not Object Oriented programming, that's Procedural Programming [wikipedia.org]. Still a step above the sort of stuff BASIC programmers tend to churn out though.
Re:Bad Design (Score:2)
bah humbug!
Re:Bad Design (Score:5, Interesting)
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.
Re:Bad Design (Score:2)
Re:Bad Design (Score:2)
-nB
Re:Bad Design (Score:2)
Re:Bad Design (Score:2)
Re:Bad Design (Score:2)
Which is why the original poster used a stack. The parent to your post merely offered a simpler example.
From the OP:
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.
Re:Bad Design (Score:2)
Re:Bad Design (Score:4, Interesting)
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.
Unix Network Programming (Score:2)
My copy is at home, but I believe Stevens' Unix Network Programming has an example with either listen() or accept() where using a goto is the only way to guarantee proper results.
Looks like you'll lose (Score:2)
GOTO FinishLine
Re:Try not using "goto"... (Score:2)
Robo Rally (Score:5, Informative)
Re:Robo Rally (Score:3, Insightful)
Re:Robo Rally (Score:2)
Now, if Robo Rally only had branches...
Re:Robo Rally (Score:3, Informative)
My vote goes with Robo-Rally too. A great game. Total mayhem.
Re:Robo Rally (Score:3, Interesting)
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 c
They're reissuing it [O frabjous day!] (Score:4, Informative)
Still costs around 50 bucks, but IMO definitely worth it.
http://www.wizards.com/roborally/ [wizards.com]
Re:They're reissuing it [O frabjous day!] (Score:3, Informative)
Re:Robo Rally (Score:2)
engineering application (Score:5, Insightful)
Educatin' Enjuneerz (Score:2)
We grew up with computers, learning assembly, BASIC, and then OOP as they languages were evolving. Now, I see 'programming' books that only show how to code using GUI drag-and-drop components, and scripting languages. While that sort of thing is great for producing applications with low dev time, what does it do to the next generation of coders?
There are people running around that 'Cod
Re:Educatin' Enjuneerz (Score:2)
Re:engineering application (Score:2)
Because the parent is a classic example of the speed-posting malaise that infects Slashdot. It was posted very quickly after the article (I'm guessing by somebody who is intimately familiar with F5), and makes some vague, content-free statement about something that really has little to do with the original artcle, hoping that moderators will mistake imprecision for in
Actual squares from the game (Score:5, Funny)
"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."
Re:Actual squares from the game (Score:2, Funny)
Re:Actual squares from the game (Score:2, Funny)
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...
Re:Actual squares from the game (Score:2)
Re:Actual squares from the game (Score:2)
I wonder why there aren't any IT worker unions.
Perhaps because of the "personal contract" thing?
And maybe since the average benifits and pay are much better than the average non-IT job would offer?
Or perhaps all these were true 5-10 years ago, but the bubble has since exploded... And so we *do* need a union.
Or do we?
Re:Actual squares from the game (Score:2)
Would you really want a unionized IT shop? Consider: your routers are now being worked on by some guy with 20 years seniority (say, on Notes or IBM mainframes) that doesn't know what an event horizon is.
Go sit in on a teacher's union meeting sometime.
Re:Actual squares from the game - Reply (Score:2)
Why not build a robot?? (Score:4, Informative)
Re:Why not build a robot?? (Score:3, Funny)
Re:Why not build a robot?? (Score:2)
ALLEN WRENCH!
Re:Why not build a robot?? (Score:2)
Re:Why not build a robot?? (Score:3, Insightful)
We need both types of projects to teach all kinds of kids logic.
From c-jump.com (Score:3, Informative)
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
Rules. (Score:4, Informative)
Anyone ever play Hacker? (Score:2)
I played it once. Not too bad from what I can remember. The box art actually includes a can of Jolt and real 80's hacker references like "Legion of Doom"
while (X4)?? (Score:2)
Re:while (X4)?? (Score:2)
SkiFree! (Score:5, Funny)
This really is only dimly connected with programs (Score:4, Insightful)
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.
Re:This really is only dimly connected with progra (Score:2)
Yes, but grammar and syntax are certainly worth learning too
Re:This really is only dimly connected with progra (Score:2)
Except, of course, that arithmetic and logic are the foundations of programming. Everything else is bells and whistles, since at their core, computers are a set of binary states.
Understanding of complex logic is not common at all. My days are consistently made more frustrating by the inability of my coworkers to un
Re:This really is only dimly connected with progra (Score:2)
This definitely develops skills which are useful for programming. But the skills are also useful for a lot of other things. Focusing on the programming aspect of things seems like a cheesy way to market this as a "programming game," which it really isn't. Nothing resembling actual computer programming is done in this. It's a math game, and all t
Correction (Score:2)
The quote is
Teach crap syntax, more like (Score:2)
I liked the concept (Score:4, Informative)
One of my favorite early computer toys was the CARDIAC [bellsystemmemorial.com], 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.)
Learning to Program (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.
Solitaire Encryption Algorithm (Score:3, Interesting)
Looks boring (Score:5, Insightful)
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.
Fun Game - ACTUAL PROGRAMMING (Score:4, Informative)
http://www.sierramadregames.com/smg/robotanks.htm
Re:Fun Game - ACTUAL PROGRAMMING (Score:2)
Let's change c-jump! (Score:2)
Have one big program and different courses of action (like if's / while's).
The tiles can have programming sentences or evaluations, and you could add or change sentences in ANY execution line. (yours or your opponent's).
Who knows, you might add some conditional loops or something!
The first one to do N iterations wins
Robot Odyssey (Score:4, Interesting)
Re:Robot Odyssey (Score:2, Interesting)
Bah. Back in my day... (Score:3, Informative)
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!
It's been done before: PLATO IV (Score:4, Interesting)
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.
resurrected PLATO (Score:2)
Re:resurrected PLATO (Score:2)
Games that teach computer logic (Score:5, Informative)
For slightly younger people, there's Rocky's Boots [the-underdogs.org] 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 [blueyonder.co.uk] and you're all set!
Re:Games that teach computer logic (Score:4, Interesting)
You may also be interested in GNU Robots [gnu.org]. 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 [chipwits.com] shows it as "coming soon" since 1999. So there's no hope in a return of the original.
Re:Games that teach computer logic (Score:2)
I loved Robot Odyssey and Rocky's Boots. I had it on the coco2 though and not on the Apple. However I recently found a java "remake" of Robot Odyssey online and it's been fun to replay it again without wrestling with an emulator:
It's called Droid Quest, [droidquest.com] download it today an relive your childhood :p
Re:Games that teach computer logic (Score:2)
I and a good friend used to play that game for hours in school. He later went on to get a scholarship to CMU and is pulling in all kinds of green doing the grown up version of what we did 21 years ago.
LK
Re:Games that teach computer logic (Score:2)
I seemed to be the only one in the world with a PC copy. When I emailed Sarinee at first, she insisted that it did not exist for the PC. I made a copy with my venerable Central Point Option Board [icequake.net] and sent it to Demonlord for cracking. The crack turned out to be simple.
I was glad to provide this apparently-rare program, because it was the primary facilitator of my being able to gras
Mindrover (Score:2, Interesting)
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.
Better Off Dead (Score:3, Funny)
if $something (%gets_in_way) {
$turn
} else {
die print "You have crashed!"
You don't like the grease from bacon. I boiled it. (Score:2)
Re:Better Off Dead (Score:2)
Paradigm Shift Underway (Score:2, Insightful)
enemas... (Score:2)
Ouch (Score:2)
Rocky's Boots (Score:3, Informative)
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.
Don't forget ZZT (Score:2, Interesting)
A good way to learn to code... (Score:2)
Not a Game (Score:2)
The Rules (Score:2)
"OK, everybody on Start and ready to go. OK, let's see here. Now the directions say Keyword int creates integer variable x."
"Hey, kids? KIDS?!?!? Are you coming back?'
Robot Wars on Apple II (Score:2)
You programmed virtual robots in a Basic-like language to go into the arena and do combat with other robots...
I even wrote my own version of the game for the Atari ST and the PC...Neither of which never left my home machine......
correction: (Score:2)
Yeah, they're like exceptions in C... (Score:3, Insightful)
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.
Re:Yeah, they're like exceptions in C... (Score:2)
Re:Yeah, they're like exceptions in C... (Score:2)
That is, unless your target architecture supports weirdo things like zero-overhead-looping or conditional execution. TI DSPs, anyone ?
Re:Yeah, they're like exceptions in C... (Score:2)
I would still question teaching goto in an introductory game. Even though goto is semantically simple, it's and extremely advanced concept and rarely ever
Re:Why oh why?!! (Score:2)
Not on user-defined types where the operators are overloaded. Why? Because it doesn't know what you're doing.
Re:Why oh why?!! (Score:2, Insightful)
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.
This goes back to the PDP-11 or earlier (Score:2, Interesting)
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.
Re:Why oh why?!! (Score:2)
X++; reads: "create a temporary X and return it. Increment the original X. I shall destroy the temporary.
++X; reads: "increment X. Return it".
++X will almost never produce weird ref-counting side effects, etc that I can run into with X++. There's a whole lot less going on and alot less to think about. Any programmer that thinks X++ is MORE readable than ++X cannot be serious. They are so close in representation that it's simply a toss-up in readabil
Re:Why oh why?!! (Score:2)
Of course if the temporary register is not used, an optimizing compiler will eliminate it completely.
I like my non-optimized debug builds to not suck as much possible. While all your users may only care about the highly optimized release build, as a developer I spend most of my time running debug builds and every 1% extra to get to the point of interest affect
Re:Why oh why?!! (Score:2)
It's not BS. It's not a binary suck vs not suck, it's about small improvements like I said. If you are using complex iterators, like my environment does, with lots of debug-only validation and value checking, then creating temporaries is wasteful.
The rule about avoiding premature optimization is because you shouldn't be spending effort when you don'
you forget (Score:2)
And you have to watch out for trees...sneaky sneaky trees.
Re:Biocomputing (Score:2)