On the importance of fun.

When I work on Stacks I have boatloads of users to worry about. And when I do consulting work, I have to think about the client. So when a feature needs building, it gets built. No matter what. Even if that means doing difficult or tedious work.

But side projects are different. When I’m building things for myself I can pick and choose. Tedious stuff is avoided and painful stuff is never started. Side projects are meant to be fun.

When I started building my Electron app I wanted to make sure to stay away from the un-fun code. I think that’s why I’ve veered away from React. I know, I know, all the cool kids are doing it. But my experiences with React so far felt a lot like work. It’s hard to put my finger on it exactly, but I think a recent talk by Brandon Hays I attended put it in perspective: React forces you down a path – and that path means a lot of really un-fun choices.

Staying away from React has had another unexpected benefit too: it helped in my Electron education. Rather than leaning on React for UI, and Redux for persistence, and… I was forced to do things from scratch using just Electron or find the right libraries to fit my app.

I went with Photon for the basic UI, CodeMirror to handle syntax highlighting, and some of the new Font Awesome icons. Most of the rest I’m just building from scratch using node.js and ES6.

Screenshot of early Window UI with Photon, CodeMirror, and some Font Awesome Icons

PhotoKit UI

Taking this less-used path has meant some difficulties too: The Photon github page looks largely ignored, building NSDocument-like behavior the basic node.js file library… interesting, and the built in auto-updater that ships with Electron is aenemic compared to Sparkle. But these are difficulties that I feel at home tackling, since they’re fundamentally just re-implimentation of AppKit features I know and love. And, perhaps with the exception of the updater, it was all very light coding. Nothing crazy or difficult.

So tonight, when the kids are in bed and my wife has gone to sleep, I’ll sneak back to the office and instead of playing video games or tweaking my 3D printers I’ll probably keep coding on my Electron side project. Not because I need to, just because it really is fun.

BTW: who wants to beta test a Markdown app?