October 23, 2018

λ Enigma

A picture puzzle has a frame. And it has pieces. The pieces are part of a larger picture. The player composes the pieces together into an arrangement that fits within the frame and correctly forms the intended picture.

Software engineering is about abstraction and composition. We abstract by breaking down larger problems into smaller problems, hiding any unnecessary details. We represent each smaller problem as a function and compose them together to build the larger application, which solves the bigger problem.

Building an application is a puzzle. If the puzzle is finding the correct solution to the larger problem, then the functions that we compose to build the application are its pieces.

The puzzle frame is the sum of all of the constraints of the application. Your chosen platform and language, performance and memory goals, coding standards, reusability, business requirements, etc.

The shapes of the pieces correspond to the arities and data types of our functions. Not every piece of a puzzle is composable with any other piece. Only specific pieces fit together.

Some pieces fit together because they have corresponding shapes, but they form the wrong picture. A watering can where a rose bud should be, or a bumble bee flying around in the mud. Likewise, many functions fit together because they have the same arity and data types, but these compositions compute incorrect output.


Over the last few months I've been working very hard on a new idea of mine: A puzzle game for programmers, based on the simple idea of functional composition.

One of my goals of this little experiment is for the game to be playable solo or competitively, whichever you'd prefer. Some of the puzzles are "community" puzzles, which means that the first person to solve them opens up the next puzzle for everyone. Furthermore, the first person to solve a community puzzle gets to enter their name and a hyperlink that is permanently associated with that community puzzle, for all to see.

I'm still testing and putting on the finishing touches, but once I decide on a go-live date the homepage will be updated with a countdown timer. I'll also announce it on Twitter @IDaveSexton.

For bug reports, please use the issue tracker in my GitHub repo: