Code is run more than read (2023) (olano.dev)
103 points by facundo_olano 5 hours ago
jollyllama 4 hours ago
And cars are driven more than worked on, but putting the oil filter inaccessibly in the middle of the engine block is still an unforgiveable sin.
kerblang 3 hours ago
Try replacing the battery. Seems accessible enough at first, but ingenious engineering has made batteries the modern rubik's cube of auto maintenance.
maury91 2 hours ago
I have a 2009 Citroen and the battery is secured with a bolt that is under the battery compartment and to access it you need to go under the car with a very long wrench, who engineered it is a psycho
GettingOld an hour ago
WillAdams an hour ago
bena 3 hours ago
Define "modern". I have a 2017 Civic and I've had to replace the battery a couple of times. There's a holding bar that needs to be removed before the battery can be taken out, but other than that the only real problem is the weight of the thing.
logancbrown 3 hours ago
wiseowise 4 hours ago
But if you happen to own a repair shop, you can make a fortune from drivers who don’t know how to do it. Wink.
Arch-TK 3 hours ago
Repair shop owners also don't enjoy work which is unnecessarily difficult.
Between rebuilding an engine and disassembling a bumper to replace a lightbulb most mechanics would genuinely rather be doing the lengthy but interesting work of rebuilding an engine than the lengthy and fucking boring task of disassembling a bumper to fix a lightbulb.
Moreover, even if a mechanic must charge you stupid amounts of labour cost to do a simple repair because it genuinely takes that much time, the customer might not come away with it thinking: "fuck, I bought a dumb car which is expensive to repair", they might instead come away with it thinking: "all these mechanics, quoting ridiculous prices to fix a light bulb, they must all be scammers".
a4isms 2 hours ago
its_ethan 4 hours ago
What if there's an efficiency in engine design by placing the filter in the middle that leads to a +2mpg improvement for the driver? Or that it fails, on average, 22k miles later into it's life? Not all hard-to-repair-yourself designs are malicious...
csours 4 hours ago
If it is a part with a regular maintenance schedule, it should be designed for maintainability.
Most maintainability conflicts come from packaging and design for assembly.
Efficiency more often comes into conflict with durability, and sometimes safety.
its_ethan 3 hours ago
carefree-bob 3 hours ago
This is like saying you can get a 10% improvement in battery life by changing where you position the RAM on your motherboard.
There is just no universe in which placing an oil filter in one location or another is going to make such a difference. You'd have to mount it completely outside the engine, say sitting as a cylinder on top of the hood, and even there you are not going to get a 2mpg improvement.
its_ethan 3 hours ago
ww520 3 hours ago
If the engine failed due to missing oil change because of the difficulty, the whole car is gone. The waste in cost, material, and environmental impact far outweighs the savings in 2mpg improvement.
its_ethan 3 hours ago
Arch-TK 3 hours ago
We don't have magic oil filters which last even 22k miles. You should be replacing them every 6 months / 6k miles, or 12 months / 12k miles depending on your risk tolerance (some people suggest even half my short interval).
Anyone who actually drives their car regularly will be doing an oil change at least twice a year. If an oil change takes more than 30 minutes of actual labour time of an inexperienced mechanic, it's going to be a serious financial burden which will likely outweigh any 2mpg improvement.
bluGill 2 hours ago
its_ethan 3 hours ago
datsci_est_2015 4 hours ago
I’m no mechanical engineer, but I would assume those extreme tradeoffs occur more often when repairability is not prioritized from early iterations. I.e. “boss we’re 90% into the design cycle why are you bringing up the position of the oil filter now?”
There’s definitely a programming equivalent as well…
PunchyHamster 3 hours ago
1970-01-01 4 hours ago
Except..there is never such reason. They can put the filter anywhere in the pipeline. Some even have it exactly where it should be: https://www.ifixit.com/Guide/2013+Subaru+Legacy+Oil+and+Oil+...
batisteo 3 hours ago
Most cars sold in the US are not aerodynamic so it seems a couple of mpg isn't the focus anyway
carefree-bob 3 hours ago
0x457 3 hours ago
andsoitis 3 hours ago
The real issue is that oil filters and gears are really just legacy design. EVs don’t need them.
So, similar with software design, as in other fields, often a problem goes away when you ask a different question.
carefree-bob 3 hours ago
You may not know this, but EVs also have oil filters and gears. They also having cooling systems. What they don't have is an engine (they have motors). But the motors have their own cooling system, and the gears have their own oil system with filters.
Every moving part - especially gears -- needs to be oiled, and whenever you are oiling metal on metal contact such as in gears, you are going to want an oil filter to catch worn metal debris, to remove it from the oil.
The difference between EVs and ICE vehicles is not that only one of them uses oil to reduce friction, but that the oil service intervals on EVs are so long that regular oil maintenance is not needed, you do it every 60,000 miles or whatever the manufacturer recommends, so it's out of mind. But that doesn't mean it doesn't require service.
Once EVs have been around for a while and there is an established market for used EVs, the people who buy them are going to want to change the oil to add more life to the EV. So it's something that is dealt with in the long-life maintenance, not the monthly maintenance. But when you do the oil service, you will curse Tesla for needing to drop the battery in order to do it, and all of a sudden you will care where things are placed and how accessible they are.
Here is a nice video -- I follow Sam Crac as one of my favorite automotive youtubers - and he picked up an old Tesla and did an oil service for it. It's a nice watch:
ang_cire 3 hours ago
EVs have gears and gear oil in their drive units. There is a reduction gear that needs lubrication, as well as the differential.
They actually will need oil changes starting anywhere from the 50k to 100k mile mark.
Here's the maintenance guide with pictures walking through changing the oil and filter for the Rear Drive Unit (RDU) in a Tesla Model S:
https://service.tesla.com/docs/ModelS/ServiceManual/Palladiu...
Arch-TK 3 hours ago
EVs also have consumable parts which it would be incredibly annoying to place in nonsensical locations.
The obvious one is the battery, and you can argue that modern EVs have batteries so expensive that when they are dead the car becomes scrap, and - sure, whatever.
But EVs still have: cabin air filters, coolant, brake fluid, lubricants in various places (although granted, these lubricants will mostly last the service life).
At the end of the day, as long as you have a car which moves, and not a statue, it will have things which wear out and which should be easy to replace.
Engine oil and oil filters are just an example.
alexpotato 4 hours ago
I've worked at some of the "top tier" finance firms over the years.
It is absolutely astounding how much of them run on code that is:
- very reliable aka it almost never breaks/fails
- written in ways that makes you wonder what series of events led to such awful code
For example:
- A deployment system that used python to read and respond to raw HTTP requests. If you triggered a deployment, you had to leave the webpage open as the deployment code was in the HTTP serving code
- A workflow manager that had <1000 lines of code but commits from 38 different people as the ownership always got passed to whoever the newest, most junior person on the team was
- Python code written in Java OOP style where every function call had to be traced up and down through four levels of abstraction
I mention this only b/c the "LLMs write shitty code" isn't quite the insult/blocker that people think it is. Humans write TONS of awful but working code too.
BobbyJo 2 hours ago
> LLMs write shitty code
LLMs regurgitate shitty code. They learned it entirely from people.
zahlman 2 hours ago
> Python code written in Java OOP style where every function call had to be traced up and down through four levels of abstraction
To be fair, the standard library `unittest` and `logging`, along with the historic `distutils`/Setuptools stack, are hardly any better.
majorbugger 4 hours ago
Which is great until you have to make changes to this kind of code, not to mention a massive refactoring.
arscan 4 hours ago
It is completely possible that the path that got them to this point was the optimal path given their goals and knowledge at the time. And wildly enough, maybe it was even the optimal path with perfect knowledge of the future as well.
esafak 3 hours ago
That's the opposite of 'great'. Good code is that which can be refactored.
JackSlateur 4 hours ago
I would not call "you must leave the webpage open" a "working code" :)
This looks like an example of biobackend: defective IT compensated by humans
Your point is very sane, of course, shitty code was not invented now. But was it ever sold as a revolution ? Probably, too !
datsci_est_2015 3 hours ago
Google “hospital server room”. Guess everywhere should just do the same thing with their server rooms, yeah? Works for hospitals, and look how much money the healthcare system makes! Why even pay an IT engineer, just plug in another wire bro.
nonameiguess 3 hours ago
This is getting to be possibly the most irritating thing I've seen on Hacker News since registering here. Every thread about a limitation of LLMs being immediately rebuked with "humans do that too."
It's a continuous object lesson in missing the point. A similar thing happened a few hours ago when an article was posted about a researcher who posted a fake paper about a fake disease to a pre-print server that LLMs picked up via RAG, telling people with vague symptoms that they had this non-existent disease. Lo and behold, commenters go in immediately saying "I'd be fooled too because I trust pre-print medical research." Except the article itself was intentionally ridiculous, opening by telling you it was fake, using obviously fake names, fictional characters from popular television. The only reason it fooled humans on Hacker News is because they don't bother reading the articles and respond only to headlines.
It's just like your code examples. Humans fail because we're lazy. Just like all animals, we have a strong instinct to preserve energy and expend effort only when provoked by fear, desire, or external coercion. The easiest possible code to write that seems to work on a single happy path using stupid workarounds is deemed good enough and allowed through. If your true purpose on a web discussion board is to bloviate and prove how smart you are rather than learn anything, why bother actually reading anything? The faster you comment, the better chance you have of getting noticed and upvoted anyway.
Humans are not actually stupid. We can write great code. We can read an obviously fake paper and understand that it's fake. We know how hierarchy of evidence and trust works if we bother to try. We're just incredibly lazy. LLMs are not lazy. Unlike animals, they have no idea how much energy they're using and don't care. Their human slaves will move heaven and earth and reallocate entire sectors of their national economies and land use policies to feed them as much as they will ever need. LLMs, however, do have far more concrete cognitive limitations brought about by the way they are trained without any grounding in hierarchy of evidence or the factual accuracy of the text the ingest. We've erected quite a bit of ingenious scaffolding with various forms of augmented context, input pre-processing, post-training model fine tuning, and whatever the heck else these brilliant human engineers are doing to create the latest generation of state of the art agents, but the models underneath still have this limitation.
Do we need more? Can the scaffolding alone compensate sufficiently to produce true genius at the level of a human who is actually motivated and trying? I have no idea. Maybe, maybe not, but it's really irritating that we can't even discuss the topic because it immediately drops into the tarpit of "well, you too." It's the discourse of toddlers. Can't we do better than this?
btown 2 hours ago
> But when you run your code in production, the KISS mantra takes on a new dimension. It’s not just about code anymore; it’s about reducing the moving parts and understanding their failure modes.
This sentence, itself, takes on new meaning in the age of agentic coding. "I'm fine with treating this new feature as greenfield even if it reimplements existing code, because the LLM will handle ensuring the new code meets biz and user expectations" is fine in isolation... but it may mean that the code does not benefit from shared patterns for observability, traffic shaping, debugging, and more.
And if the agent inlines code that itself had a bug, that later proves to be a root cause, the amount of code that needs to be found and fixed in an outage situation is not only larger but more inscrutable.
Using the OOP's terminology, where biz > user > ops > dev is ideal, this is a dev > ops style failure that goes far beyond "runs on my machine" towards a notion of "is only maintainable in isolation."
Luckily, we have 1M context windows now! We can choose to say: "Meticulously explore the full codebase for ways we might be able to refactor this prototype to reuse existing functionality, patterns, and services, with an eye towards maintainability by other teams." But that requires discipline, foresight, and clock-time.
3form 4 hours ago
I like the final conclusion. And sadly I don't feel like anything changed for the better on this topic since 2023.
I am afraid that without a major crash or revolution of some sort, user won't matter next to a sufficiently big biz. But time will tell.
dbalatero 4 hours ago
I've found the users-first mentality degrading over the years at companies. It's a bit jarring too, since a lot of my early training was pretty user-centric.
3form 4 hours ago
I do have a feeling that the example of bigger players is carefully followed by many of the other companies, kind of as a cult of success. And that example for a long time has been rather lacking.
pydry 3 hours ago
This is definitely true. In growth companies there is way more emphasis these days on investor hype over user centricity.
For companies that have a solid competitive moat they have at best gotten lazy about user centricity and at worst actively hostile.
tabs_or_spaces an hour ago
Once I wrote the perfect piece of software. It was so perfect that there was literally no bugs for months.
How could this have happened? Well, the code was shipped but no customer was running it in production.
arealaccount 25 minutes ago
Software dev would be so easy without the customers
choeger 4 hours ago
Clearly, there is a thing missing here: Regulations. If you have strong regulations on how you can make money, you cannot sustainably have biz antagonize user. So in that case biz just becomes a filter for users that actually are willing (and able) to fund your software. That's a good thing.
Obviously, our regulations aren't perfect or even good enough yet. See DRM. See spyware TVs. See "who actually gets to control your device?". But still...
jjk166 3 hours ago
> Regulations. If you have strong regulations on how you can make money, you cannot sustainably have biz antagonize user.
If that's what the regulators are optimizing for.
codemog 3 hours ago
Stupid regulations are why we have an idiotic cookie banner on many websites.
cineticdaffodil 4 hours ago
Oh noe, noe no.. you want to crowdsource debugging.. describe the error and your expectations, then build software by machine learning while screwing up.
evanjrowley 3 hours ago
Does the ">" mean "greater than" or is it meant to symbolize an arrow in a ordered sequence?
moralestapia an hour ago
Good question, to my it was "greater than" but now I read it again with the other interpretation ... and it still makes sense? Weird.
esafak 3 hours ago
More important than:
"We arrived at a little model that expresses the relative importance of various factors in software development..."
psychoslave 3 hours ago
It went on the good track, but failed to generalize that ≹ is what apply among all these terms.
signa11 2 hours ago
yes, run by machines, read by humans. so ?
direwolf20 3 hours ago
biz > user
is capitalism. Removal of that isn't capitalism. Non-removal of that is capitalism.cestith 5 minutes ago
Richard Brand says the most important thing to grow a successful business is to put your employees above all else. Being the place where everyone wants to work and cares about their job is the way to get the most loyal customers. Having the most loyal customers is how you make the most money over the long term.
Survivorship bias exists, but look at all the Virgin brands and at places like Google. So for a moment let’s posit he’s correct.
So, then, the problem would seem not to be capitalism generally. It would be the sort of short-term quarterly goals capitalism we see so often in recent years.