Just-in-time C++
Vince Huston

An associate professor at Georgia Tech, told the AP that the [school's Robotics course] is an attempt to combat "prime number" syndrome. That disease, he said, afflicts computer science departments that typically ask newcomers to write dull programs performing mathematical algorithms."



  • a workbook (emphasis on hands-on learning)
  • C++ presented "as needed" and "just in time"
  • C++ presented with lots of little "dye marker" demos
  • introduce algorithms, data structures, and design as an everyday aspiration
  • a repository of projects
  • games as projects (instead of tired math sequences or contrived sales applications)
  • "start small, start stupid, and evolve" [Kent Beck]


Programming is about creating,
about making "magic".
Gears make magic.
They take rotational energy,
and change its speed,
or direction,
or plane of motion.

This book uses problem-solving puzzles and games to combat the perception that learning to program is boring and hard . Each puzzle/game is presented as a graduated series of programming labs. A GUI version of the puzzles and games appears on the front cover. The labs limit themselves to console output and keyboard input.

Beyond introducing the language of C++ and the craft of programming; this book aggressively integrates algorithms and data structures. Years ago, a Niklaus Wirth book asserted "Algorithms + Data Structures = Programs". Life-on-the-job is a daily pilgrimage to craft algorithms and data structures.

In the Mastermind project, suggesting that the computation of the "totally correct" response is an algorithm, may seem trivial; but for the beginner - it is an act of algorithm. Computing the "partially correct" response may seem too advanced for the beginner; but I propose that it is an invaluable challenge.

In the Cracker Barrel peg puzzle: how should jump requests be validated and implemented? Is it algorithm or data structure?

Set is a card puzzle whose goal is to find sets of three cards that are all the same, or all different, across three independent "facets" or "dimensions". What algorithm will produce a decision on whether three selected cards constitute a set? What algorithm is necessary and sufficient to compute all the sets present in an array of twelve cards?