1. 35
  1.  

  2. 5

    In this case, the solution is to leave the user in charge of their file associations; if they decide that they want your competitor’s program to be used for .XYZ files, then that’s their decision and you should respect it.

    Funny to see how times have changed. Now Windows itself doesn’t even respect this particular user decision.

    1. 2

      I’m not sure if Raymond Chen reads this stuff, or whether there’s someone else from Microsoft who could handle this, but the link “When people ask for security holes as features” is broken. I ran https://devblogs.microsoft.com/oldnewthing/?s=When+people+ask+for+security+holes+as+features&submit=%EE%9C%A1 but that’s not necessarily what he intended to link to.

      1. 4

        Try the “fix” suggested here:

        https://devblogs.microsoft.com/oldnewthing/?p=92872

      2. 1

        What a disgusting system Windows is. None of these wants are necessarily unreasonable.

        “How do I create a window that is never covered by any other windows, not even other topmost windows?”

        I also thought the Window Manager could enforce this trivially, by preventing overlap with such windows.

        “How do I mark my process so that it always the first/last to receive the system shutdown notification? I want to do something before/after all other programs have shut down.”

        Clearly, you have an interface that attempts such, but can fail and programs should properly handle failure.

        “How do I make sure that my program is always the one that runs when the user double-clicks an .XYZ file?”

        This is something an operating system is expected to provide; a program should be able to ask, but not enforce this, and it shouldn’t be told if it succeeds or fails.

        Now, you people bringing up the hypothetical example of a program that modifies a Window Manager configuration are wrong. Clearly, a program shouldn’t do this without good reason. You may then think ’‘It will do it anyway.’’; the solution is to modify the program so it doesn’t do this. You may then wonder ’‘What if the program isn’t Free Software?’’; the solution is to acknowledge that proprietary software is malware and to avoid using it; what do you expect?

        There’s little, if any, wisdom to be gained from learning how Windows does something, at this level. I’m glad to not use the garbage.

        1. 6

          I also thought the Window Manager could enforce this trivially, by preventing overlap with such windows.

          What if the super-topmost window is also the size of the display?

          Clearly, you have an interface that attempts such, but can fail and programs should properly handle failure.

          “Attempts to run everything last”… What does that even mean? This is the point of the article.

          This is something an operating system is expected to provide; a program should be able to ask, but not enforce this, and it shouldn’t be told if it succeeds or fails.

          For a third time you’re missing the point of the customer’s request. They’re not asking for best practice behaviour, they want their program to circumvent the default Windows behaviour (the “garbage” you don’t appear to know anything about).

          I feel like your entire post is you skimming and intentionally misreading the blog post (which is about UI design, it’s not even particularly about Windows, for Christ’s sake), and using it as a springboard to explain how much smarter than the Windows UI team you are.

          1. 1

            I’m sure the members of the Windows UI team are very smart. That’s why it’s such a shame they’ve been locked in the Microsoft Dungeon while the business people make decisions on their behalf.

          2. 3

            Now, you people bringing up the hypothetical example of a program that modifies a Window Manager configuration are wrong. Clearly, a program shouldn’t do this without good reason.

            And a program shouldn’t set the ALWAYS_ON_TOP flag without good reason, either. The point I was trying to make was that moving the flag from the runtime window object into the WM config file in ~/.xmonad doesn’t actually change anything.

            There are actual solutions to this, including political ones (Free Software is a political movement) and technical ones (use sandboxing to move privileged doodads like WM configuration to a spot where regular old apps can’t get to it). Either way, since you’re avoiding shared mutable state by establishing a privileged mutator, the answer to “what if two programs did this” is simply only one program can ever do this.

            You may then think ’‘It will do it anyway.’’; the solution is to modify the program so it doesn’t do this. You may then wonder ’‘What if the program isn’t Free Software?’’; the solution is to acknowledge that proprietary software is malware and to avoid using it; what do you expect?

            “Just make it FOSS” is only half a solution. After all, the entire raison d’être for a system like Windows is to be usable by people who don’t know how to write or modify software themselves. The big FOSS OS’s value-add compared to Windows, for such a user, is vendors like Debian, RedHat, and FreeBSD that do not allow software to enter their curated repositories without going through them, the privileged mutator. Obviously, the iOS App Store proves that Free Software doesn’t have a monopoly on bureaucratic curation. And, equally obviously, the presence of a global choke point like this introduces lots and lots of problems all of its own.

          3. -1

            These are bizarre, even if they’re from 2005.

            His windowing example shows that he had never seen a window manager like XMonad or RatPoison. It’s trivial to make a window manager enforce uncrossable or always-on-top windows, block movement when someone tries to drag across another window. Can Windows really not do that? There’s a ton of them for the Mac.

            Setup and teardown scripts follow a programmed order in Unices, Mac, and Linux. I actually don’t know how to do it on anything but init-based systems: /etc/init.d, rc0.d, and rc6.d execute their contents in ASCII order, but I’m sure there’s an equivalent for launchd and systemd, I just haven’t needed to read a man page yet.

            Named pipes and quota let you solve the multi-user file problem. There’s no such thing as “exclusive mode” in a real OS.

            File association stealing can be annoying, but only the last program launched would win, so they wouldn’t “fight”.

            Is this what Windows is like? I’ve never really used it (had to run VisualAge and Eclipse on it at work for a while), but it sounds like DOS never died.

            The blog links all worked for me, but the MSDN links didn’t.

            1. 9

              I don’t think there was anything bizarre to his article. Windows tasks can be started or stopped in a given order too, but there’s still the issue of badly written services which try anyway to be the last or first to do something, and I’m sure there would be similar examples on Linux.

              For file associations it seems you missed the end of the article where he gave an example of the issue, which again could apply to other operating systems.

              1. 7

                This is a pretty uncharitable reading of the post (which is a pretty classic one from a pretty classic blog).

                His windowing example shows that he had never seen a window manager like XMonad or RatPoison.

                Pretty sure the Windows team, even in 2005, had people who’d seen lots of different window manager approaches. Don’t assume ignorance on their part.

                It’s trivial to make a window manager enforce

                And this is where you misunderstand what the post is about. It’s not about Windows having or lacking some feature. It’s about companies that build Windows applications wanting, and going to great lengths to try to implement, hostile, nonsensical, and literally logically impossible things.

                Your preferred approach seems to be to have the window manager tell the programmer they can’t do what they asked for. Which works up until the moment the programmer decides to hack around the window manager’s prohibition, which is why people are bringing up hypotheticals like an app editing the user’s window manager config in order to specially privilege itself over other windows. And the point of the post is to walk through the thought exercise of “if there were a feature that did this” – where “this” means full-screen, always on top, and no other application’s window can be visible – “what would happen if two applications each tried to use that feature simultaneously”. This is a reductio ad absurdum to show why such a feature could not exist.

                Also, trying to get around it by saying you’d just have your tiling WM split the screen between the two windows wouldn’t actually get around it, because then the app author would come back with “no, that’s not what I meant, I meant really full screen and no other application is allowed to be visible while mine is open”. You can say that’s hostile to the user, and it is, but the app authors (or, rather, their employers) are still going to try any way they can think of to make it happen.

                1. 5

                  His windowing example shows that he had never seen a window manager like XMonad or RatPoison. It’s trivial to make a window manager enforce uncrossable or always-on-top windows, block movement when someone tries to drag across another window. Can Windows really not do that? There’s a ton of them for the Mac.

                  I wouldn’t call this trivial at all: What if I have an always-on-top window in full-screen mode, and another full-screen always-on-top window gets opened? With tiling WMs you might be able to justify them just splitting the fullscreen among them, but for non-tiling WMs there’s no reasonable solution, unless you’re fine with the WM moving and resizing your windows, which I’m not.

                  1. 0

                    That’s what a WM is for, yes. If you’ve set a window to be uncrossable, the WM (which is a singleton) is responsible for moving the new one to a non-conflicting space. In a tiler, the existing windows get split or moved.

                    1. 7

                      If you’ve set a window to be uncrossable

                      Okay, so I’ll have my application edit your xmonad config file to ensure that it’s always on top. In case another application goes in and edits the xmonad config file after me, I’ll have my app run a timer in the background to check and ensure it still has top priority in the WM config.

                      1. 4

                        You puny app will do no such thing on my immutable, password-protected xmonad.hs

                        (app installs keylogger to sniff password and edits xmonad.hs)

                        Oh yeah? Try to get your app to put my finger on the finger print reader to edit xmonad.hs

                        (app does just that by hooking itself into a commonly used fingerprint-protected command)

                        …etc.

                        The end result looks rather like Core War(s) [1]…

                        [1] https://corewars.org/

                      2. 7

                        No user knows what a WM is. No user knows what a tiling WM is. Even if they knew, no user should have to configure a third program to resolve a conflict between two programs.

                        Raymond Chen is talking about end-user experience and you are talking about interfaces that only a small subculture (even within the userbase of Linux on the Desktop) uses.

                        1. 3

                          Enough users do know what window managers are to make a bunch of alternatives available on Mac, UNIX, and Linux (and aside, I find it a little offensive to be called a Linux user; I’m a UNIX user, and now Mac because it’s the last UNIX workstation).

                          But every desktop computer ships with a WM, whether the user has configured it themselves or not. And most of those can manage some kind of always-on-top and blocking behavior, even if it’s not exposed by default; a program can ask for it. Chen’s argument is that you can’t even do this, which is false or indicates severely crippled behavior in Windows.

                          Condescending to users as if they’re stupid is why they avoid learning anything, and why they loathe technical people.

                          1. 1

                            What alternative window managers are available for macOS?

                          2. 2

                            Even if they knew, no user should have to configure a third program to resolve a conflict between two programs.

                            You’re not configuring a ‘third program’, you’re telling the system, in an appropriate place, to act in a certain way. The WM is more these days part of the system. It might be implemented as a separate program but I don’t think anyone actually sees it that way except for some arch linux alumni.

                            1. 0

                              The distinction between system and program does not matter to me. I care about the fact that I need to configure anything at all to work around broken interaction between two parties.

                              1. 1

                                The distinction between system and program does not matter to me.

                                Even if they knew, no user should have to configure a third program to resolve a conflict between two programs.

                                It very clearly does because you explicitly called out configuring ‘a third program’.

                                I care about the fact that I need to configure anything at all to work around broken interaction between two parties.

                                Is it broken interaction? If one program signals an error, an always-on-top messagebox is displayed. If another program then signals an error, do you choose to display that second error? How should those messages interact?

                                The conflict is innate to the nature of having an ‘always on top’ option. The idea that something as fundamental as that should be removed just because it adds a form of conflict that already exists is ludicrous. Let’s not even mention the fact that you, as a user, would not have to configure anything anyway, because there exists a sane default. This is like saying “I should not have to configure my car seat position to match me, it should just work”, and then arguing that the car seat should be removed because it’s configurable.

                          3. 3

                            So how do I make my program run under a wm that supports this behavior? Should I bundle a wm in my program and kill the currently running one at startup?

                        2. 5

                          File association stealing can be annoying, but only the last program launched would win, so they wouldn’t “fight”.

                          I suspect both programs are running at the same time, with both running loops to check+change file associations.

                          It’s trivial to make a window manager enforce uncrossable or always-on-top windows

                          What’s possible and what are good options are not the same thing.

                          suspect he is describing a situation where the application devs don’t like that everyone can access the ‘always on top’ feature, so they want something even higher again to make sure they are the only ones ontop. This brings up both philosophical and practical problems.

                          1. 0

                            Chen describes two programs running timers, apparently pretty fast, reassigning filetypes without user permission. I don’t actually believe anyone would waste main loop time doing that, he may have seen a contrived demo or more likely made it up for the example.

                            The behavior defies the law of programmer laziness.

                            So a realistic scenario is just checking on startup or hitting a button in preferences, and that’s a trivial annoyance. Firefox used to be a prime offender there, and it just whined at me every startup.

                            1. 9

                              The behavior defies the law of programmer laziness.

                              This law does not exist in software developed by companies.

                              more likely made it up for the example.

                              Your perspective is the one of a Linux user, and Linux on the Desktop has both a very small marketshare and its own development culture around GUI programs. Just keep that in mind before you assert that the author is lying because his world seems alien to you.

                              1. 8

                                Raymond has seen a lot of things in real life that you wouldn’t believe, then. Read the blog entries on his Windows backward compatibility work.

                                1. 4

                                  He’s seen things you people wouldn’t believe. COM files in DOS boxes running critical code. OS memory management driven by bugs in SimCity. A20 gates on fire off the shoulder… OK, not that, probably, but don’t underestimate the Windows Crazification Factor and the full scope of petty venality in writing closed-source software. BonziBuddy existed, after all.

                                  1. 2

                                    The behavior defies the law of programmer laziness.

                                    Laziness can easily be overcome by offering money in exchange for goods and services.

                                2. 3

                                  He’s answering developers questions. Imagine a music player developer asking for a way to set the flag on their window, without user interaction, or a virus scanner program that wants to set itself as the last program running.

                                  All of these things are not hard if you force the user to configure them, but what happens when the user says no?