if code tutorials were written like recipe blogs: Monads

Written: 2021-03-04 to 2021-03-04
by Norman Liu

When I was young, I knew that regular design patterns weren’t for me. My parents would always bring home new books on object-oriented programming, design patterns, and other practices that seemed great at first. It was new, exciting, and I loved the idea of having self-modifying data. It felt like my own personal ant farm - thousands of objects, inheriting and interacting with each other, morphing their state by their own will. They danced around on their silicon stage and ran the core logic of my programs. This honeymoon didn’t seem to last. As time wore on, I got tired of the same bugs, same errors, and the same frustrations that seemed to arise from giving actions to data. I started to get nauseous at the thought of having to implement a CompositeAbstractFactoryPrototypeAdapterModule just to link up my database and server.

I started travelling after I graduated from high school, looking around the world for some meaning that would be break me out of daze. I had grown up surrounded by the inexorable march of code complexity, and I was locked in a mutual observer cycle with despair. I was decorated with an urge to seek out the ultimate tool, the end-all design pattern that would bring some light into this darkness.

There’s a small shop in North Carolina that only uses the freshest practices in their code, sourced daily from Hacker News and Stack Overflow. They avoid code smell by being picky about what they include in their product, and changing up their menu when necessary in order to keep their modules from rotting. As I was told by some Russian dude I met a few years ago, real authentic code comes from the heart. It’s one thing to build a project, and it’s another to make that project your own. I reflected on this koan for a while as I continued to drift through the ether of objects.