I have a problem.
At some point, installing a package became my first instinct instead of my last resort. I'm not sure why that is but I reckon it's either a skill issue or the corporate world just corrupting me with its relentless deadlines. I want to prove to myself it's the latter.
Last year I was building a UI for a personal project and needed a double calendar to mark the start and end of an event. The UI library I was using didn't have one, so naturally I slapped together a wrapper that mushed two <Calendar />'s and hoped for the best. Let's just say they were standalone calendars for a reason.
I've had this fight so many times before. Things that don't belong together, jammed together anyway, and I called it engineering. The library was never the problem.
Build from scratch and that particular fight goes away, total control. I forgot how good that feels. What I estimated at two weeks actually took four days and now I have a calendar that could actually talk to another calendar, no hacks. It went so well I looked at the rest of the UI library and felt embarrassed. How many other components was I fighting instead of using? I deleted the library and remade every component from scratch.
Now I ask myself a few questions before installing anything:
- Does the platform already do this?
- Can I write it in under a week?
- Do I really need a framework?
- ¿¿Do I really need a framework??
On top of these, the usual filters still apply: is it secure, maintained, battle-tested?
My latest venture was to build a static site generator from scratch for this blog. Hot reloading, everything-is-markdown, superb DX and speed, under 600 lines. Took less time than I usually spend reading the documentation for the framework I was thinking of using. Two dependencies: the markdown parser and a code highlighter. Already planning to write my own. Since I'm in a parsing mood, might as well.
I plan to keep going. Fewer dependencies, fewer opinions that aren't mine. Especially now, when it's easier than ever to let something else write it for you.
Before you leave though...