DEV Community

loading...

Discussion on: Does your website really need to be larger than Windows 95?

Collapse
simonhaisz profile image
simonhaisz • Edited

They don't have to be large. But optimisation isn't free. I can write a bloated program in one hour that uses 1MB. In one day you can write a program that is functionality equivalent that uses 1KB. 10x the time for 1000x the benefit. Sounds amazing! Except what if you have 1GB available? At this point MB vs KB seems like a rounding error. Why wouldn't someone develop 5-10 apps instead of one?

Unless your position is that being efficient has zero cost?

Thread Thread
citizen428 profile image
Michael Kohl

Unless your position is that being efficient has zero cost?

Generally speaking everything has a cost, the main question is who pays it. In your example the developer choosing to do 5-10 apps instead of one does so by valuing their time higher than other people's computational resources. Sure, those extra costs may be "rounding errors", but those compound.

Thread Thread
alainvanhout profile image
Alain Van Hout

Sure, those extra costs may be "rounding errors", but those compound.

Which is true for both computational resources and developer time.

Thread Thread
citizen428 profile image
Michael Kohl

Of course it is. The question is really: do we value the computational resources of the many, or the time resources of the few?

This is why I always found it problematic to call software development "engineering". I don't think any engineer should be happy with say a 10x increase in performance/features at 1000x required resources, yet in software people seem to think this is totally acceptable.

Cars on the other hand constantly get new features, improved safety AND decrease their resource usage (or in other words increase their mileage).

Thread Thread
alainvanhout profile image
Alain Van Hout

Engineers also always deal with trade-offs in effort vs ROI: material A is 10x as strong and/O durable as material B, but for this use-case the durability of material B already covers the buffer factor, so there is no point in using material A.

Cars get progressively reduce resource usage because

  • The resource is scarce enough for its cost to factor into the equation
  • Using the resource itself has a(n ecologica) cost, so legislation requires optimizations
Thread Thread
citizen428 profile image
Michael Kohl

Fair point, though it seems that for most software performance is not taken into account at all anymore, which is not a trade-off.

And I hope you're not trying to imply that wasted computational resources have no ecological costs?

Thread Thread
alainvanhout profile image
Alain Van Hout

Yeah, I do agree on the general point, that we should also focus on performance, and not do pointless/suboptimal things when it takes little or no extra effort to do things better.

And indeed, wasted computational resources have an ecological cost, particularly when we're dealing with calculation-intensive tasks like simulations on supercomputers and stuff like bitcoin (though there, the inefficiency is supposedly a feature). For the most part though, this kind of discussion tends to resolve around (clever) low-level micro-optimizations, while the need for (more transparent) architectural optimizations are left out of the discussion.

Thread Thread
citizen428 profile image
Michael Kohl • Edited

Believe me, I'm the last person to promote useless micro-optimizations. A while ago I posted an example of a disassembly in a comment here, illustrating that any reasonable C compiler will perform them (and many others that are much harder to do by hand) anyway, so one should always strife for clarity in the code first.

I do however take objection to some recent trends in the industry, especially in regard to technology and framework choices, since I believe that many of them are not at all motivated by needs, but by the availability of cheap and easily replaceable labor.

Overall I think we're on the same page, thanks for a productive discussion and have a nice day. :-)

Thread Thread
alainvanhout profile image
Alain Van Hout

Yes, I think we're in agreement here, on both the topic and the productive discussion, so a nice day to you as well :-).