Hacker News new | ask | show | jobs
by woo49 2084 days ago
My CS systems PhD advisor used to say, 'you waste the abundant resource' in systems design. Lots of CPU cycles available, lots of bandwidth available (except when not!) - so waste it and save programmer time.

At least, in theory.

It's not about knowing assembly or not. It's resources, time, cost, money, ROI.

4 comments

In my country, water consumption was not measured prior to 1989. Households just paid a lump sum and the price was kept on 1953 levels.

Yes, once measurements were introduced after the Velvet Revolution, water consumption by households fell to half almost overnight.

Even after knowing assembly, there's probably significant optimizations that can be done if you design chips and ISAs that are specific to a certain problem. There's "waste" at every stage of abstraction.
That's not waste, that's a tradeoff.
It's a choice you need to make when developing.

I had to build a one-time export yesterday. Am I gonna spend a lot of time optimizing the speed of it? Or am I going to make it work and get the export to the client faster?

It would've wasted my time and the clients money if I optimized the queries. Sure, the export itself took longer. But overall, the task was done quicker.

If the client wanted this export to run on their server frequently, I would've spend the time making sure the export itself runs faster.

It's especially relevant when thinking not at the level of computer systems but business systems - since for many tasks you anyway have a combined computer+people process that works for some goal, and there's a tradeoff between computers and people for choosing the level of automation you want.

For exmaple, in your example of a one-time export it might also make sense to write code that does not meet all requirements and explicitly can not handle certain edge cases, if it's more effective to fix these cases manually than try to automate that.

Exactly. Yout goal isn’t to optimise the code, it’s to optimise the overall cost/benefit of whatever you’re doing.
Reminds me of Jevons paradox:

> when technological progress or government policy increases the efficiency with which a resource is used (reducing the amount necessary for any one use), but the rate of consumption of that resource rises due to increasing demand

https://en.wikipedia.org/wiki/Jevons_paradox