Memory is not cheap
The thing is, these mantras are always taken out of context.
“Memory is cheap” is in comparison to other options. For example, if you have a the choice between optimizing for CPU or memory, you should optimize for CPU almost every time because it’s a lot cheaper to add more RAM than add more CPU.
But for some reason, we’ve taken this to mean, “I don’t need to optimize memory or CPU because I can just upgrade them.” That’s only true until it isn’t, and it’s generally easier to optimize things as you go than optimize once everything is broken.
Good post. I really don’t understand how apps have gotten so terrible.
The app I work on is slow, but that’s because we’re doing pretty heavy things (3D canvas stuff), but even then we do a really bad job of lazy loading stuff (e.g. images used for that 3D stuff are loaded way before you get to the 3D part, and many users don’t use the 3D feature at all in a session).
But at least we have an excuse. Why does the bank app take forever to load when it just needs to query around balances and submit tasks to their backend to process? That should be incredibly lightweight.
I booked a flight recently, the translation engine was obviously having issues so instead of giving helpful labels for form fields it was stuff like: “{{ name.first }}”, which I could figure out for the most part, but then on submission I got an error with no description at all. I opened the dev tools and resubmitted the form to find the API response which gave me the actual error. 2 pages previously a form field hadn’t been set correctly by the web page (it was a drop-down, I selected an option, the error said it was null). I managed to force the field to populate properly and hey presto, submission works. Ridiculous.
Author did kinda reference this with the ✨Development Velocity✨ part, but the truth is managers and businesspeople* are the ones that just don’t care. Well, not about users at least. Managers just care about promotions and maintaining the upper hand in office politics, and businesspeople just care about money.
If devs were given the proper amount of time to implement things, they wouldn’t be adding GBs of NPM packages from which only one function is used.
If devs were given any power in the decision-making process, the “17 tracking scripts you put on your websites which added 0.004 pence to your bottom line” would never be added
I’m a dev and I hate releasing buggy code but I’m not in charge of testing or the amount of testing we do before release.
I’m also a developer and I’m really big on optimizing database queries and having the right data indexed. When I review others’ code I’m being “nitpicky” when I point out that an index is missing. When it comes to query optimization I’m often told “well there’s plenty of memory.”
Aren’t you though? I’m a dev too, and at the end of the day, I’m responsible for the correctness of my code, even though we have a QA team that also helps with testing.
The number of bugs we encountered the last overseas flight we took were astounding. Anything from printing errors to baggage checkin not working to the inflight entertainment system needing rebooting.
There are so many layers of dependencies on everything it’s amazing it works at all.
The problem isn’t the dependencies, the problem is dependencies written by people who only put the minimum effort into writing the dependency for their own use case because their manager was breathing down their neck.
I can sympathize. And what they don’t know is that JavaScript heavy apps actually decrease development satisfaction and speed, while also making the end result crappier.
Tried to pay a credit card through the app last week.
“An error has occurred.”
So I just, you know, called the number on the back of the card and paid it through their IVR.
😮💨
AI assistant tools probably won’t push us on the right direction for this one. (Or maybe they will by encouraging people not to import a different library for any 6-lines function they need?)