4 ms·
>You’ve probably heard this mantra: “Programmer time is more expensive than computer time.” What it means basically is that we’re wasting computers at an unprec
by coldtea 7y ago
>You’ve probably heard this mantra: “Programmer time is more expensive than computer time.” What it means basically is that we’re wasting computers at an unprecedented scale. Would you buy a car if it eats 100 liters per 100 kilometers? How about 1000 liters? With computers, we do that all the time.
The argument is incomplete.
The correct question (to maintain the analogy) is:
"Would you buy a car if it eats 1000 liters per 100 kilometers, but that doesn't affect you at all (you still get to where you want to be fast enough), and the time to manufacture and cost to buy it is much lower than would be possible with more efficient car that used 10 liters per 100 km?"
The answer to which would be yes. A software that does a task we do once a day or so at 1 second vs 0.2 seconds doesn't cost us money (and even the environmental impact is small).
- jodrellblank 7y agoA single dropped can on the grass is a small impact. Everyone dropping their litter everywhere, because "a piece of litter doesn't matter" is a large impact. I can deal with a 1 second delay to run a script. I can deal with a 20 second delay to launch a large program. I resent dealing with hundreds of 1 second lags every day for tasks which didn't used to have any lags ten years ago.
- juststeve 7y agoThat is a really good analogy. In the same way that recycling was meant to fix the environment (and garbage now sits in warehouses), millions of objects get mass produced and chucked onto the memory heap, in the hope that garbage collection will fix it.
- juststeve 7y agoBut in your example, your only describing one specific task (n=1). The issue is that time accumulates non linearly as the number of tasks increase. i.e the petrol stations must be able to supply enough petrol to all customers that drive the most inefficient car. The culture of "developer time is most important", makes overall system performance someone else's problem, because "my program is fast enough when I measure it off the wall clock". But who's responsible to fix overall system performance, and how can they fix it? I think a lot of people would just upgrade their RAM, CPU or IO to solve the issue (create more petrol stations), rather than asking vendors to change the programming language, or to be more conservative on RAM. And because there's costs to switching language stacks, people will stick to writing in the language they are comfortable in, so critical business systems get written in slow languages.
- coldtea 7y ago>But in your example, your only describing one specific task (n=1). That's to maintain parity with the example TFA gives. I'm not saying it's never worth it... Of course you'll optimize often repeated tasks, loops, etc. Here's what TFA quotes as bad reasoning, because it makes fun of optimization effort in some cases: "@tveastman: I have a Python program I run every day, it takes 1.5 seconds. I spent six hours re-writing it in rust, now it takes 0.06 seconds. That efficiency improvement means I’ll make my time back in 41 years, 24 days :-)" Unlike TFA I agree with the twitting guy above that the efficiency improvement here wasn't worth it.
- juststeve 7y agoYeah agreed. i mean in that example, if tveastman wrote it in a fast language the first time, the rewrite probably wouldn't have been required. (i think that tweet was for a bit of a laugh anyway, because he can now write new code in Rust.) But as many languages support implicit static typing, the folklore that dynamic languages are "more expressive" is not actually correct. such as: let x = "string literal" //compiled as string let y = 42 //compiled as int let z : i32 = 100 //compiled with type declared as 32 bit int.
- TeMPOraL 7y agoIt's all fine until - as it often is - we want to do that task more often. Any task worth doing once is likely worth doing more than once; any task worth doing across many people is likely to be worth outsourcing to a business focused on it. Using a real example: in a certain company that wife worked in, there was a task that - every couple of days - would be repeatedly done by multiple office workers for several hours. I was visiting that place once, and since I had to wait for my wife, I was asked to give them a hand with that task. Growing frustrated, I very quickly located a hidden option for batch processing they didn't know anything about. It solved the entire task in couple of minutes. By finding that option, I freed several man-days a month for that company. Time that can be used for other tasks (or even goofing off). This example sticks with me because these days, a lot of work is done in front of computers, and every inefficiency there removes productivity from the economy. The way I see it, if you're developing software, and there is a possibility that that software will end up being used by someone in their job, you owe it to them to make it efficient; by ignoring efficiency, you'll be robbing such people of their life and mental health, and their employers of potential profit.
- hnuser123456 7y agoI work in a support center. We have a web-based ticketing system. Every ~5 minutes, the ticketing system goes down for ~2.5 minutes. Nobody seems to care. It makes me want to chuck my mouse every time.