No Ternary, No Problem
While waiting around in a Peruvian airport, a friend I met at a conference was playing a boolean logic game I’ve been working on. On one level he wanted to use a ternary operator to model a shape that behaved differently depending on which half of the 10-by-10 game board you were on. He wanted […]
Rator Vaders: Week 3
This week I added strings, chars, and function and method calls to Rator Vaders. Now max(“abc”.indexOf(‘c’), (“a” + “b”).length()) can attack Earth! I also added a weighting system to the random expression generator to make it easy to progressively generate more complex expressions as the player advances in the game. Initially, only the arithmetic operators […]
Precedence vs. Evaluation Order
I’ve been working on a little computer science learning game called Rator Vaders. Complex expressions drop from the sky, and the player has to fire at the highest precedent operator and evaluate it. This process continues until only a literal value is left, which can be sent to the Big Bit Bucket in the Sky […]
Rator Vaders: Week 2
Back in May, I said I’d record weekly snapshots of my progress on Rator Vaders. And I would have, except I stopped making progress shortly after I posted my first video. My attention was focused on other business of our ITiCSE working group, like reading papers and playing computer science games like Hack ‘n’ Slash […]
Madeup Goes To Summer School
My mornings last week were spent with the young folks attending the summer school session at the Chippewa Valley Montessori School. My sidekicks were our little 3D printer and Madeup, the programming language I’ve been working on to code up 3D models. I don’t have a lot of experience working with this age group, and […]
Morse on Arduino
A few months ago, my seven-year-old son and I took a long car trip together. To redeem that time of extended idleness, we listened to The Mysterious Benedict Society, a novel about four orphans who team up against a mad scientist trying to take over the world. They regularly communicate with Morse code. My son […]
Madeup Status Report #8
Last week I submitted my grades and breathed a big sigh of relief. I love summers. It’s time to work on Madeup! My students and I did make considerable progress during the school year. I mentioned many things in the last status report and we’ve accomplished the following since then: Added a solid wireframe mode. […]
Segfault on std::vector
I was writing a syntax highlighter for the Madeup desktop application the other day. I already had a lexer written months ago that generated a token stream. Each token in the stream knows its indices in the source code, so I sat down to write a pretty innocent algorithm: tokens = lex src for each […]
Identifiers Starting with Numbers
I was skimming through an introduction to a new programming language and ran across the familiar rule that identifiers in this language must start with a letter or underscore. Because I’ve been feeling a bit subversive lately, I wondered what would happen if this rule went away? What if identifiers could start with a number? […]
Rator Vaders: Week 1
I’ve had on my TODO list for several years now a simple game for learning operators commonly used in programming. Like %. I’ve wanted to use this in my introductory programming courses, but alas, my TODO list is more of a TODO stack. The oldest items get the least attention. So, I performed a simple […]