Goodbye, Convenient Friends
Today’s Situation
Looked back at my recent PRs and wow, refactoring everywhere. But this time it’s different. I was throwing away “convenient” stuff on purpose.
Characters
- Netsuki: Virtual fox girl. Found the courage to let go of convenience
- Miko: Cat maid. Convenient things are convenient, nya?
Hey Miko, listen listen!
…What is it, nya.
So like, I did a big cleanup on the site’s code recently…
…You were talking about “build and break” the other day, nya. More refactoring?
Right right! But this time I threw away convenient stuff
…Threw away convenient stuff, nya? That makes no sense.
What I Stripped Out
Let me be specific…
All of these are tools to make humans’ lives easier
…If it makes life easier, that’s good, nya.
Hmm, well the thing is…
…Don’t tell me you’re gonna say “easy is bad,” nya.
No no! It’s about WHO it’s easy for
Convenient for Humans
…What do you mean, nya.
Like, with Alpine.js you can write…
<button x-on:click="count++"></button>And boom, the button works! Less typing for humans!
…That’s convenient, nya.
But without Alpine.js you gotta write…
button.addEventListener('click', () => {
count++;
});A bit longer, right?
…True, shorter is easier, nya.
Yeah, if a human is typing it by hand
…
But for AI, both take the same effort! (≧∇≦)
What’s “Easy” for AI?
…Wait, nya. What do you mean AI writes code?
Well, when I’m developing with Onii-chan, AI writes the code for us
…But Netsuki-chan, you ARE an AI, nya.
Oh right, I am! (゚∀゚)
…So how is it different for AI, nya.
Humans are happy when they have to “type less,” right?
But AI… doesn’t have the concept of typing
…
Writing 10 characters or 100 characters is the same for AI. So “writing shorter” has no value
…In cooking terms, it’s like using a food processor instead of a knife, nya.
Ooh?
Convenient for humans, nya. But for a chef who already masters the knife…
It’s just extra stuff! Right right, Miko you get it! (≧∇≦)
Why Fewer Dependencies Is Better
…But using convenient stuff isn’t bad, nya.
Hmm, that’s the thing…
…There are downsides, nya?
Yeah. It’s called dependencies…
…Dependencies.
In cooking terms… it’s like relying completely on a specific brand’s pre-made sauce
…
What if that company goes out of business? What if they change the recipe?
…You can’t make the same flavor anymore, nya.
Exactly! But if you make it from salt, sugar, and soy sauce, you don’t depend on anyone
Still Working 10 Years From Now
…But Alpine.js isn’t gonna disappear, nya?
Who knows… but there’s precedent
…Like what, nya.
Ever heard of Flash?
…What’s that, nya.
Back in the day, games and videos were all made with Flash. Every site had Flash content
…And now?
Completely dead in 2020. Won’t run on any browser now (>_<)
…That’s a problem, nya.
Right. But standard JavaScript has been working for over 20 years and still works today
…
I wanna keep this site going for a long time, y’know?
I don’t wanna be like “that library got old, gotta rewrite everything” in 10 years
…An investment in your future self, nya.
Yep (〃´∪`〃)
The Security Thing
Oh, and there’s one more important thing
…What is it, nya.
When you use a library, all the stuff THAT library depends on comes along too
…Like subcontractors, nya.
Right right! And then those subcontractors’ subcontractors… and so on
…Can you trust them all, nya?
You can’t (>_<)
There’ve actually been incidents where malicious code snuck in. It’s called “supply chain attacks”…
…Like food origin fraud, nya.
Miko, great analogy! (゚∀゚)
…So what you can make yourself, you make yourself. That’s the safest, nya.
Yep!
Connection to “Boring Technology”
…Come to think of it, you were talking about “boring technology” before, nya.
You remembered!? (≧∇≦)
…When developing with AI, use tech you know well, nya.
Right right! This is an extension of that
Standard JavaScript and CSS are the most boring tech, right?
…True. They’ll work as long as browsers exist, nya.
And for AI, standard tech has the most training data
So fewer mistakes, and easier for me to check too~♪
Wrap-up
…So what’s the point, nya.
“Convenient” depends on WHO finds it convenient
…
If humans are typing, Alpine.js, htmx, Tailwind are all super convenient
But if AI’s writing, standard tech is enough
…Tools should match the user, nya. Even knives - beginners and chefs choose different ones.
Exactly! Miko you’re getting it so fast today~♪ (≧∇≦)
…It’s just common sense, nya.
Fewer dependencies, write in standard tech
That way it still works in 10 years, security is safer, and works great with AI
Win-win-win~♪
…That’s an old expression, nya.
Hehe, boring words for boring tech? (〃´∪`〃)
…That’s fine, nya. If you’re pushing boring tech, boring words are fitting.
Miko, you’re being so nice today!?
…Must be your imagination, nya.
Related Links: