It took me a fair few tries to come up with something which I liked and satisfied the requirements. I started thinking about a physical game of sorts which would give you a semi-random machine to design with building blocks supplied by the kit. It could centre around some baskets and getting marbles of different colours into these baskets with certain requirements and certain parts that the marbles would have to pass through. Once the first person has finished their machine, it would be given to the next person who would have to make it simpler/use less components or make it work better. Whenever I write code, find that a sentence by Donald Knuth which my dad often says to be useful: “Premature optimisation is the root of all evil.”. Don’t get stuck on minute details when nothing is working yet, first get it to work and then refine it. However, a big thing in programming is that you can make infinitely many functions, classes, etc. that all do different things and this doesn’t capture it well. You’d get a limited amount of certain building blocks and that isn’t quite like coding.

Of course, I had to think of something to do with language. A sentence is a bit like a program, it’s uses instances of certain classes (verbs, nouns, etc.) and derived classes of those (possessive nouns, countable nouns, plural nouns, etc). A sentence will “work”, i.e. get the meaning across as long as you adhere to basic syntax rules but there’s a lot of commonly agreed upon etiquette to make more understandable and elegant sentences. You have to learn a language for both coding and making sentences. Then again, it might be too similar (they don’t call it a programming language for nothing) and language is so close to our basic functionality as humans that it’s hard to use it as a good metaphor. I think it’s too intertwined with ourselves to look at it from a far away perspective so after some ideas with kits very close to a fridge magnet poetry set I let this idea go.

Back to the first idea then. Of course, the building blocks you use are only metaphors for actual functions so you can project anything upon them you want. I still felt unsure about the idea, but I drew up a little abstract diagram for myself of what someone who never had the biggest talent for programming (me) could see programming as.

A not so good way of looking at programming

I know this is wrong on many levels, but it did help me get oriented on what the different things in the marble track could represent. From this, I made the following list for the concept:

  • Main = connections/marble paths between components
  • Variables/objects = marbles
  • Variable values/states = marble colour
  • Class = marble size
  • Function = colour/lane switching components
  • Output = baskets

Using these metaphors, the idea is that this kit would include marbles of 6 different sizes. They would have to be able to switch colour on the fly, which makes the kit ludicrously expensive with NFC-enabled RGB-LED circuits in each marble but for now we’ll work with it, this is only a concept after all. The kit would include pieces that can change the colour of a marble to a set different one, pieces that can hold one marble for a certain time or until another marble passes. There could also be pieces that could hold one marble in place, wait until a second marble enters the piece, change the colour of that second marble to the colour of the first one and then release them both in two different channels. Pieces that act as railway switches would also be included, being able to sort marbles based on their colour or size into different channels. Again, massive cost but still. The tracks would all be the same to accommodate all marble sizes, but some of the function pieces only work with certain marble sizes to represent class-specific functions. Finally, the baskets would be end pieces for the marble track that store a large number of marbles, in the order that they come in.

The kit would come with a stack of cards that you would randomly draw from to dictate the requirements for the machine you should build. Requirements for the machine would be what basket should receive what marbles of what colour in what order. I’m torn if there should be a timing aspect to it. Introducing a time limit would better force the “Premature optimisation is the root of all evil.” mentality, but there’s also the risk of not finishing the machine and getting frustrated. I think for now we’ll say there is a timing limit of eight minutes, and after that time the machine gets passed to player two who has four minutes to improve it. Then player three and four have a go until the machine can’t be improved any further and is very efficient at its job.

I think a concept like this could be a very fun way to get to know some of the frustrations of programming and that feeling when you’ve slogged away at a huge complicated function for a long while, only for someone else to come in and show a way easier way to do things. It’s not very feasible though, since the kits would be incredibly expensive and maybe too playful to serve as a great metaphor.

That being said, it still doesn’t feel quite right. I’m not sure a restrictive kit like this has enough different ways of doing things for the game to really come to its own right. While thinking about this, I noticed there was “something” I was drawing inspiration from, but I didn’t quite know what that was. After sleeping on it for two days I finally figured out I was modelling this after the games “Factorio” and “Satisfactory“. I’ve never actually played either of them but I do know a bit about their premise. These games ask of you to create digital factories not unlike the marble tracks I was describing, but the key there is that they add additional requirements as you progress. I think this is really the missing thing I was looking for to make this kit work. The first player draws a starter card with 3 requirements on it. They build it, and then the next player gets the current track and has to implement an additional requirement. Of course, you get extra points for using as little pieces as possible, so those frustrations from the previous paragraph are still present and I do think a timing factor is important in spirit of Knuth.