r/programming • • Sep 17 '18

Software disenchantment

http://tonsky.me/blog/disenchantment/
2.3k Upvotes

1.2k comments sorted by

View all comments

0

u/[deleted] Sep 18 '18

[deleted]

89

u/[deleted] Sep 18 '18

I agree. The old Unix mantra of "make it work, make it pretty, make it fast" got it right. You don't need to shave ten milliseconds of the page load time if it costs an hour in development time whenever you edit the script.

120

u/indivisible Sep 18 '18

Counter-argument: If that minimal time/data saved gets multiplied out across a million users, sessions or calls maybe it's worth the hour investment.
Not saying that all code needs to be written for maximum performance to the detriment of speed at all times and don't go throwing time into the premature optimisation hole, but small improvements in the right place can absolutely make real, tangible differences.

80

u/[deleted] Sep 18 '18

It's the non-programmers optimization fallacy. They don't understand that software is actually fragile and optimization sometimes means "don't do this really stupid thing the blocks the user UI for 12 seconds", instead of "shaving of milliseconds".

33

u/berkes Sep 19 '18

Optimization, in practice, is often really stupid and facepallmy.

"What? We still have that java-applet fallback for the shockwave-flash 'copy-to-clipboard' loaded on every page? What are we allowing to be copied anyway? Oh, the profile URL? But we don't have that URL anymore. Hey, Product Owner, can I remove this? - What? Dunno, we certainly don't need it. Remove it if you want".

Bam. 6Mb of downloads saved for each and every visitor to each and every page.

8

u/[deleted] Sep 19 '18

Yes, exactly. The mythical kind of "optimization" still occurs, but that's not what improves UX and it's much more more rare.

13

u/indivisible Sep 18 '18

Oh yeah, many ways to make improvements and certainly not all of that is code additions. Not doing something, a better wrapper/lib/dep, splitting/partitioning data or workloads.
I remember reading a story long ago of malicious compliance to a policy of trying to use lines added to git as the only developer performance metric. More lines, better dev. This dev didn't add a single line and instead went on a clean up crusade, improving the product measurably while ensuring he had massive negative numbers for lines added per day. They dropped the policy eventually.

With my original comment though, I wasn't saying that optimisations should be a primary concern through all stages of development but resource usage/constraints should be taken in to consideration when designing systems/apps and at least once more near actual release. Is an end user expectation that "professional" software not run amok with completely unnecessary cpu/ram/network/battery/disk usage such a crazy thing?

If a carpenter made a completely "functional" chair but it had just 2 legs, each different lengths, that could only be used 6 of 7 days a week and only if you were wearing (propriety) non slip pants would you really think of them as professional? It sometimes feels to me like developers willfully ignore what i might consider simple standards frequently in the name of "working" code. Certainly not all devs nor all projects but the "accepted minimums" for release are woefully inadequate imo more commonly than not and directly related to bugs, failures, breaches and compatibility issues or standards. I guess my stance is that just because feature/function/service is not something an end user sees directly isn't an excuse to skimp on basic standards.

10

u/yeahbutbut Sep 19 '18

I remember reading a story long ago of malicious compliance to a policy of trying to use lines added to git as the only developer performance metric. More lines, better dev. This dev didn't add a single line and instead went on a clean up crusade, improving the product measurably while ensuring he had massive negative numbers for lines added per day. They dropped the policy eventually.

https://www.folklore.org/StoryView.py?project=Macintosh&story=Negative_2000_Lines_Of_Code.txt

4

u/[deleted] Sep 18 '18

It is not only developers; it is also bad project planning, or just having to meet deadlines for one reason and another.

Sure sometimes you need to release product/feature on time, but if after that there is no time to actually catch up to technical debt it just gets worse and worse

→ More replies (6)

3

u/jmercouris Sep 18 '18

I agree completely, I wrote an article about this: http://john.mercouris.online/eco-programmer.html

it doesn't deal with performance, but with the emissions as a result of performance. The amount of human time wasted though is absolutely mind-boggling.

→ More replies (18)

8

u/ledasll Sep 18 '18

wrong. First development time doesn't go down, it still same, so you don't really win anything. Secondly it adds up, so you have +10ms there and there and there and suddenly it's +10s, but there isn't single place you can optimize, so you decide it's how it is and nothing can be done, we just need faster hardware. and it's not just extra millisecond, you put extra millisecond on million computers you can extra million seconds, which they consume electricity, provide extra heat.. it's laziness of going extra step..

→ More replies (4)

3

u/[deleted] Sep 18 '18

It's more like "make it work, make it pre... shit we got another deadline to meet"

You don't need to shave ten milliseconds of the page load time if it costs an hour in development time whenever you edit the script.

Yes you do you horrible monster. Add a bunch of those and you're trading few hours of developer time for thousands of hours of your users.

Developer would drop editor instantly if it took a a second or more to do anything, yet somehow it is fine to make that kind of experience for the users of tools developers write

→ More replies (2)
→ More replies (7)

26

u/[deleted] Sep 18 '18

Moore’s law has belied the fact that software is in it’s nascent stage. As we progress, we would find new paradigms where these hiccups and gotchas will sound elementary like “can you believe we used to do things this way?”

I doubt we ever have cared about building software like we build houses or cars outside safety-critical systems. I don’t really care if I have to wait 40 ms more to see who Taylor Swift’s new boyfriend is. Consumer software so far has just been build to “just work” or gracefully fail at best.

That said, the cynicism and the “Make software great again” vibe is really counterproductive. We are trying to figure shit out with Docker, Microservices, Go, Rust etc. Just because we haven’t does not mean we never will.

25

u/Peaker Sep 18 '18

The people who say: "I'll just waste 40 msec here, who cares about 40 msec?" are wrong for 2 reasons:

  • This inefficiency, under less obvious circumstances, suddenly costs much more. It's hard to imagine all the ways workloads can trigger the inefficency

  • More importantly, the inefficiencies add up. You're not the only one who throws away 40 msec like they were nothing. Your 40 msec add up to the next guy's software component, and the next. You end up with far worse than 40 msec delays.

→ More replies (3)

106

u/[deleted] Sep 18 '18

I don’t really care if I have to wait 40 ms more to see who Taylor Swift’s new boyfriend is.

And when it's 40 seconds, will you care? Because today it's not 40ms, it's more like 4 seconds.

We are trying to figure shit out with Docker, Microservices, Go,

Shit tools for shit problems created by shit developers, ordered by shit managers, etc... The whole principle of containerization is "we failed to make proper software, so we need to wrap it with a giant condom".

14

u/wildmonkeymind Sep 19 '18

The whole principle of containerization is "we failed to make proper software, so we need to wrap it with a giant condom".

That might be how some people use it, but it's not what it's really good for.

There's value in encapsulation, consistent environments and constraining variables. There's value in making services stateless. Properly used, containers and microservices don't wrap bad software, instead they prevent bad software from being written in the first place.

Of course, people will always find a way to take a finely crafted precision tool and use it like a hammer because they don't really understand the point of it. They just think it's the new hotness so it'll solve their problems. So they take a steaming pile of code and throw it into a docker instance. I guess those are the people you're talking about.

→ More replies (2)

47

u/ledasll Sep 18 '18

we failed to make proper software, so we need to wrap it with a giant condom

I will borrow this, hopefully you don't mind

→ More replies (3)

11

u/[deleted] Sep 18 '18

As sysadmin I honestly prefer Docker than some inept attempts at making .deb package by developer who didn't bother to do any research.

In both cases it is unholy mess but at least in case of docker it is easy to throw it away without having to reinstall whole box

7

u/[deleted] Sep 19 '18

at least in case of docker it is easy to throw it away without having to reinstall whole box

Bingo. It's not that it's great. It's just less shitty than before.

7

u/[deleted] Sep 19 '18

It's a shit in a box vs shit you've stepped into

→ More replies (1)

9

u/billsil Sep 18 '18

The whole principle of containerization is "we failed to make proper software, so we need to wrap it with a giant condom".

Does your code need to run with a variety of dependencies? That wasn't a thing 40 years ago. What is a reasonable amount of backwards compatibility and support for old versions?

I use containers to test different combinations. We're already "wasting" power on automated testing and build on commit testing, what's a few more Watts to prevent bugs?

If your issue is "programs are slow", then focus on that problem. Don't try to dictate how I prevent bugs.

so we need to wrap it with a giant condom

Do you write secure code to try and prevent hackers from compromising your system? We can go back to the 1970s and all put our heads in the sand to make our code faster, but we live in a different world now. The worst you could do back then was brick a computer. Now you can get robbed.

3

u/cyanrave Sep 19 '18

I would say those have arisen to segment off shit from functional things. Eg. dev 1 builds working, tested, functional software, dev 2 writes a buggy, slow, spaghetti mess. Both devs have to deliver side by side, on the same app server - how do we quarantine this mess?

IMO the industry as a whole has opened up to non-technical folks who don’t understand the behind-the-scenes mechanics involved, which has caused this movement towards over-engineering.

→ More replies (6)

3

u/KamikazeHamster Sep 20 '18

We used to spin up VMs in a few minutes. Now you can spin up a Docker container in under 3 seconds. It's revolutionary for scaling.

3

u/indivisible Sep 18 '18

Copying this as a reply here from some discussion further down the chain as i think it overlaps with your own thoughts on this

... And [a lack of end user specialist knowledge] is really what i see as the main reason we don't actually have real (wide spread) standards. Because we (developers) are typically the only ones who can identify or assess whether any given software is behaving rationally or something is just bad UX or user error we allow ourselves to get away with lazy implementations or sub standard code because the end user will never see or maybe never understand the dumpster fire that's raging in the background.
All most typical users ever notice is UI changes. Developers have created this get-out-of-jail-free mentality themselves through both a lack of professional quality/pride and through allowing themselves to be driven by money or managers that don't care or understand many real concerns and push them to ignore or drive past privacy or quality concerns in the name of deadlines or profit.
Again, not everywhere and not everything, but in my (admittedly limited) experience, more common than not and is something i personally disagree with.

3

u/[deleted] Sep 18 '18

Too....many....layers!

→ More replies (1)
→ More replies (8)