Ronie
Stochastic thoughts

Programming Pebbles

Recently I saw a talk about Pico-8, a really restricted game maker platform, it makes me think about what can be learned by being restrictive.

Some time ago I made some experiments, CRC cards from Kent Beck and Ward Cunningham made me try to program without public getters and setters. I learned a lot from it, especially about “double dispatching”, and how it is useful but we usually forget about it (shame, shame…).

It shifts your mind from “what should I use” to “how do I use” …

Functional programming made me experiment to program only with immutable objects. That’s a very interesting restriction I advocate anyone to try. Essentially, it teaches me when I can safely use mutability, and I can say it has its place.

Also, learning Racket made me try to program without loops at all. After a while I learned to use recursion and loops very effectively.

The main point here is that constraints make you keep your focus where it matters, stripping useless details and superfluous choices. It shifts your mind from “what should I use” to “how do I use”, a far better question to learn.

There is a legend about Demosthenes, the famous greek orator, about being a better speaker using pebbles in the mouth.

Here is my list of “pebbles” :)

Go practice!