Lucas Dino Nolte
Dec 6, 2024

It’s Time to Let Your Code Loose

Cover

Programming is hard, especially when it comes to writing production-grade code. There are abstractions, encapsulations, software architecture decisions, performance considerations, and platform or process constraints that you’ll constantly need to evaluate your decisions against. Adding to that mental load, production-grade code usually leaves little room for error, leaving you to juggle complex problems in a non-fault tolerant environment.

All of these things are crucially important and form the foundation of my work when it comes to writing functional, maintainable, and performant software that will be delightful for users. It’s just that sometimes they make me feel a bit disconnected from why I fell in love with programming in the first place. It’s missing the magic feeling of just creating something, the excitement to tell a machine what to do and then watch it do it. It’s missing the messiness of approaching programming with an early-stage design process mindset. The serendipitous mindset, where errors are really just “happy little accidents.”

Rediscovering the Magic of Creating with Code

To rekindle that spark, I’ve recently started doing small animated loops in code. The idea is simple: When inspiration hits I braindump it into my notes. I don’t have a hard definition of what counts as inspiration. Anything that makes my brain start running with visual ideas will work. This has ranged from posters where I wonder what their core idea would look like animated, to color combinations, an algorithm I learned and want to explore more deeply or even funky Christmas lights I can see from my office window.

To avoid going down the rabbit-hole of overthinking, I set clear boundaries. Everything is timeboxed to 30 minutes and the main principle is that there are no principles: No linting, no unit tests, not thinking of best practices, no typescript, not even caring about if my variables are let or const. Just an HTML Canvas element, Javascript and the desire to create.

Write Code like you’re a Dilettante

This helps me to reconnect to the initial excitement I felt when I first discovered Processing while still in University for a visual design and media sciences degree. I feel like a “dilettante” again – in the best (and also original meaning) of the word: I’m dabbling with an impartial and open mind, freed from best practices and not expecting anything in return other than the pure bliss of experimentation. And in doing so I’m not alone, designers and developers like Zach Lieberman, Tim Rodenbröker or Just van Rossum have documented their regular practice of play and working with constraints as an antidote that keeps the creative engine running.

And while I’m just doing it for the pure joy of creation and feeling like a beginner again, I’ve noticed a benefit that goes beyond just having a unique pool of visual references and inspiration: Deliberately cutting corners has greatly improved my perception of programming pitfalls, how to avoid them, and when it’s ok to allow them and worry about them later. In a way “dilettante coding” quite beautifully represents the intersection of design and engineering, as at their core both are about gauging and creatively figuring out appropriate solutions.