Or sharding on a particular column
Comment on The Great Software Quality Collapse: How We Normalized Catastrophe
fluckx@lemmy.world 3 weeks agoThis is very true. You don’t need a bigger database server, you need an index on that table you query all the time that’s doing full table scans.
- PattyMcB@lemmy.world 3 weeks ago
GenosseFlosse@feddit.org 3 weeks ago
You never worked onrold code. It’s never that simple in practice when you have to make changes to existing code without breaking or rewriting everything.
Sometimes the client wants a new feature that cannot easily implement and has to do a lot of different DB lookups that you can not do in a single query. Sometimes your controller loops over 10000 DB records, and you call a function 3 levels down that suddenly must spawn a new DB query each time it’s called, but you cannot change the parent DB query.
PattyMcB@lemmy.world 3 weeks ago
That’s why it needs to be written better in the first place
GenosseFlosse@feddit.org 2 weeks ago
Tell me you never worked on legacy code without telling me…
PattyMcB@lemmy.world 2 weeks ago
Kid. Go away
fluckx@lemmy.world 2 weeks ago
Where is this even coming from? The guy above me is saying not to give devs better hardware and to teach them to code better.
I followed up with an example of how using indices in a database to boost the performance helped more than throwing more hardware at it.
This has nothing to do with having worked on old code. Stop trying to pull my comment out of context.
But yes you’re right. Adding indexes to a database does nothing to solve adding a new feature in the scenario you described. I also never claimed it did.
sugar_in_your_tea@sh.itjust.works 2 weeks ago
Why not?
This sounds like the “don’t touch working code” nonsense I hear from junior devs and contracted teams. They’re so worried about creating bugs that they don’t fix larger issues and more and more code gets enshrined as “untouchable.” IMO, the older and less understood logic is, the more it needs to be touched so we can expose the bugs.
Here’s what should happen, depending on when you find it:
Teams should have a budget for tech debt, and seniors can adjust what tech debt they pick.
ieGod@lemmy.zip 2 weeks ago
That budget is the key. You have to demonstrate/convince the purse holders first. This isn’t always an easy task.
sugar_in_your_tea@sh.itjust.works 2 weeks ago
Fair. If that’s not possible, I’ll start looking for another job, because I don’t want to deal with a time bomb that will suddenly explode and force me to come in on a holiday of something to fix it. My current company allocates 10-20% of dev time to tech debt, because we all know it’ll happen, so we budget for it.
lightnegative@lemmy.world 2 weeks ago
“Don’t touch working code” stems from “last person who touched it, owns it” and there’s some shit that it’s just not worth your pay grade to own.
Particularly if you’re a contractor employed to work on something specific
sugar_in_your_tea@sh.itjust.works 2 weeks ago
I get that for contractors, get in and get out is the best strategy.
If you’re salary, you own it regardless, so you might as well know what it does.