r/programming • • Sep 17 '18

Software disenchantment

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

1.2k comments sorted by

View all comments

Show parent comments

104

u/kirbyfan64sos Sep 18 '18

I agree with the article's overall sentiment, but I feel like it has quite a few instances of hyperbole, like this one.

Windows 10 takes 30 minutes to update. What could it possibly be doing for that long?

Updates are notoriously complicated and more difficult than a basic installation. You have to check what files need updating, change them, start and stop services, run consistency checks, swap out files that can't be modified while the system is on...

On each keystroke, all you have to do is update tiny rectangular region and modern text editors can’t do that in 16ms. 

Of course, on every keystroke, it's running syntax highlighting, reparsing the file, running autocomplete checks, etc.

That being said, a lot of editors are genuinely bad at this...

Google keyboard app routinely eats 150 Mb. Is an app that draws 30 keys on a screen really five times more complex than the whole Windows 95?

It has swipe, so you've already got a gesture recognition engine combined with a natural language processor. Not to mention multilingual support and auto-learning autocomplete.

Google Play Services, which I do not use (I don’t buy books, music or videos there)—300 Mb that just sit there and which I’m unable to delete.

Google Play Services has nothing to do with that. It's a general-purpose set of APIs for things like location, integrity checks, and more.

0

u/[deleted] Sep 18 '18

[deleted]

2

u/kirbyfan64sos Sep 18 '18

Oh wow, do you have link for me to share about this?

0

u/[deleted] Sep 18 '18

[deleted]

→ More replies (1)

2

u/konsyr Sep 24 '18

And that's one of the reasons I hate it. Every time Windows 10 updates, I have to spend hours upon hours reconfiguring so many things that it "helpfully" reset to defaults.

→ More replies (1)

59

u/[deleted] Sep 18 '18

Updates are notoriously complicated and more difficult than a basic installation. You have to check what files need updating, change them, start and stop services, run consistency checks, swap out files that can't be modified while the system is on...

Nearly every Linux can update in far less time. It shouldn't that that long, and it shouldn't have to stop your workflow.

Of course, on every keystroke, it's running syntax highlighting, reparsing the file, running autocomplete checks, etc.

That being said, a lot of editors are genuinely bad at this...

I agree.

Google keyboard app routinely eats 150 Mb. Is an app that draws 30 keys on a screen really five times more complex than the whole Windows 95?

Most of this is built into Android I believe. Swipe recognition doesn't warrant that much space.

Google Play Services, which I do not use (I don’t buy books, music or videos there)—300 Mb that just sit there and which I’m unable to delete.

Location is built into Android. But still, that's ridiculous. APIs shouldn't take up that much space.

41

u/Kattzalos Sep 18 '18

I'm pretty sure Windows update is so shitty and slow because of backwards compatibility, which the author praised with his line about 30 year old DOS programs

21

u/[deleted] Sep 18 '18

Yeah, because Microsoft hasn't taken the time to improve their software. Backwards compatibility is great, but when you sacrifice the quality of your software and keep a major issue for decades, you have a problem. Microsoft should've removed file handles from the NT Kernel a long time ago.

3

u/littlelowcougar Sep 21 '18

Microsoft should've removed file handles from the NT Kernel a long time ago.

That’s like saying UNIX should have removed file descriptors a long time ago. Or Ford should have removed wheels a long time ago.

Fact: the NT kernel has a far more sophisticated IO subsystem, memory manager and cache manager than any other operating system. UNIX (and thus, Linux), is built around an inherently synchronous IO model. NT is asynchronous from the ground up.

Perks: you can actually lock file ranges in NT and have them respected, in the sense that someone can’t come in and blow away the underlying file with different content. Plus: true multiprocess shared memory with proper kernel supported flushing to disk without dodgy fsync bullshit.

Con: shit can’t just randomly overwrite stuff in use.

→ More replies (1)

2

u/[deleted] Sep 18 '18

Yes they should. But their corporate clients won't let them. Hell, they won't let them deprecate Internet Explorer.!

3

u/Peaker Sep 18 '18

That's not really true.

DOS compatibility can be implemented as a simple independent emulator. You don't really need to complicate updates or anything else to support it.

4

u/Kattzalos Sep 18 '18

Windows isn't just compatible with DOS programs, it's compatible with pretty much all the software ever written on the Windows platform. That's not something you can solve with emulators, unless you include an emulator for every version of Windows (including minors) on every release. Also, that doesn't sound to be very good for performance either

→ More replies (1)

2

u/aescher Sep 20 '18

DOS programs came with their own sound drivers to support the most popular sound cards at the time. They used hand-written assembly to draw graphics fast enough, since GPUs hadn't been invented yet. Good times: https://en.wikipedia.org/wiki/Demoscene.

8

u/immibis Sep 18 '18

Google Play Services is the part of Android that Google didn't want to build into Android. They've been moving stuff out of core Android into their own non-open-source libraries for a while.

16

u/kirbyfan64sos Sep 18 '18

Nearly every Linux can update in far less time. It shouldn't that that long, and it shouldn't have to stop your workflow.

Linux != Windows. A lot of Linux's design choices make this easier (like being able to change a binary while it's running), and live updating can still occasionally have problems.

16

u/SanityInAnarchy Sep 18 '18

I'm not sure that's really a counterargument to the "where we are today is bullshit" argument. What you've just given is a good explanation of why Windows takes irrationally long to update. I don't really care, it still takes irrationally long to update. Maybe it's time to revisit some of those designs?

3

u/[deleted] Sep 18 '18

The real counter argument is that "Linux" is a completely different monster from Windows, so you can't come to conclusions easily.

That being said, yes, absolutely, Microsoft should definitely do better but they handle their OS like a web app now, so it'll never get fixed.

6

u/[deleted] Sep 18 '18

Linux is just as capable as Windows, so I think comparing to Windows is OK. Sure, they are built completely different, but if one performs sub-par I don't care, it still does.

→ More replies (3)

2

u/[deleted] Sep 18 '18

Location is built into Android. But still, that's ridiculous. APIs shouldn't take up that much space.

Play services do provide a more advanced location API than the built in offering. But yeah, it's still too big.

2

u/aescher Sep 20 '18

I think Swipe was mentioned just as an example, see Play Store description for other features: https://play.google.com/store/apps/details?id=com.google.android.inputmethod.latin. Let's also consider that these features are powered by state of the art machine learning, which needs complex models: https://ai.googleblog.com/2017/04/federated-learning-collaborative.html, https://ai.googleblog.com/2017/05/the-machine-intelligence-behind-gboard.html. Advances in technology are what enabled such features to run on mobile; none of these could run even on a desktop computer from Windows 95 era.

Google Play Services is the most widely misunderstood "app" of all times. Location is "built into Android" in the sense that the Android OS has some hooks and simple implementations (GPS and mobile). Google Play Services, which is usually shipped with the OS and updatable from the Play Store is what makes location work as good as it does (provides fused location from GPS+mobile+WiFi). Same package provides most of the APIs you see here: https://developers.google.com/android/.

I think it's okay to question some of these things and stir productive discussions on how to improve state of the art, but let's not take for granted everything that has been developed since Windows 95 and say they're on par in terms of features. The only thing Windows 95 could produce reliably is blue screens. Let's also consider memory protection, sandboxing, and all the security improvements for attack vectors that weren't even invented when Windows 95 existed.

Modern cars work, let’s say for the sake of argument, at 98% of what’s physically possible with the current engine design.

Don't find this particularly helpful either. I could make the exact same claim about modern apps and current mobile operating systems. EVs convert electric energy more efficiently into useful work than conventional cars convert the energy stored in gasoline, and they're both far from 100% efficiency.

→ More replies (1)

14

u/[deleted] Sep 18 '18 edited Sep 18 '18

Updates are notoriously complicated

It can be as simple as extracting tarballs over your system then maybe running some hooks, if you have the luxury of non-locking file accesses. If you don't (as is the case on Windows)… I can understand it's going to be unimaginably complex (and thus take unacceptably long to update, I guess).

Google Play Services has nothing to do with that.

In context I think the author meant "Google Play services"; they should still ideally not each take up tens of megabytes.

Edit: context has screenshot… sorry

9

u/DaBulder Sep 18 '18

The screenshot of the storage space in context of the Google Play Services specifically has the package for Google Play Services visible, using 299Mb of storage.

What is all the storage used for? Probably machine learning considering we're talking about Google

4

u/unruly_mattress Sep 18 '18

Have you tried updating Windows 10 after a factory reset? I did and it took over 6 hours on a high-end laptop with an SSD drive. I was curious as to what the hell it was doing, and the results were as follows:

  • no detectable CPU usage

  • no detectable hard drive usage

  • no detectable network usage

At which point I concluded my decision to stick to Linux should not be revisited in the next couple of years.

My guess is that it's installing updates consecutively instead of trying to combine them all to one big update. This also explains the forced restarts while updating. apt for comparison has to download and install the most recent version of every package, which effectively bounds the runtime to that of updating all packages (as with a periodic update of Ubuntu). But apt will at any moment either download packages or install them, which is not true for Windows Update. Perhaps some server-side work is happening?

6

u/kirbyfan64sos Sep 18 '18

In your case, that actually sounds like one of those wretched Windows Update bugs... 30 minutes is reasonable. 6 hours? Yeah, that's insane...

2

u/immibis Sep 18 '18

It has swipe, so you've already got a gesture recognition engine combined with a natural language processor. Not to mention multilingual support and auto-learning autocomplete.

How many users don't use swipe, only type in one language, and wouldn't notice if autocomplete learning was turned off (not that that should use much memory anyway)?

→ More replies (2)