There’s an interesting tweet by @levelsio about how he used to set 1 table to its own SQLite database instead of all tables in one db.
I love it. I got it. But a lot of software engineers and computer science graduates are genuinely confused.
Because this isn’t a tweet about what’s a better way to manage your databases. It’s about this:
I’m interested in simple code and making money by making cool products - @levelsio
I mean, I agree, 1 db/table might not work for everyone or every situation. But there’s something there to think about regarding how he’s not afraid to buck convention to use what works for him and his goals. I love how he knows but just doesn’t care.
For me, I’m not looking to emulate his 1 db/table practice just because he seems successful with it. And I don’t use SQLite/PHP anyway. But the deeper question I’m asking myself is:
Where am I beholden to convention when it doesn’t have to, where breaking convention is still safe and helps me get to my goals faster?
Best practices are always best in some particular context/situation.
“Does it scale” is a question and a best practice when you’re an enterprise serving hundreds of millions, but doesn’t matter when you’re a solo dev building a MVP with zero customers.
Using frameworks, having separate files for different parts of the codebase, practising “separation of concerns” is a best practice when you work in large teams, when more than one person is working on the code and you need a common mental model to work together. But when you’re just the only person working on it? Maybe a single index.php
or index.html
is fine if your mental model works well with it.
Being an outsider to the software engineering and computer science field, I find it surprising that so many people are beholden—even held captive—by certain best practices, new shiny Javascript frameworks, even where it’s not always necessary or helpful to their cause.
I’m often surprised that people are surprised when I prefer more boring tech:
Been feeling old as Daniel said, even though I’m new-ish to dev:
- vanilla Javascript, no frameworks
- plain CSS, no Tailwind
- SQL db
- #nobuild
- single file index.html
- static sites as much as poss
- no minify, can view sourceThe more boring, the more I gravitate to it
Or when I ask questions like “I wish there’s a framework where I can leave it for 10 years and it still runs”, or “Anyone come across a SaaS boilerplate made from plain Javascript? No Next, Nuxt, Svelte, or any js framework.”. Worse, sometimes they gatekeep and make you feel like you’re doing something grievously wrong when you’re just doing what works for you. Cue the lame arguments over which framework is dead/better.
There is no best practice, only what works for a particular situation or person. All these are just tools. Tools should defer to us the maker of the tools, and our goals and purposes.
Where are you held hostage to convention when it doesn’t have to?
Now there’s something there to think about…