1. 12

    but Electron is without question a scourge

    Well, how about a big F* you?

    Sorry for the swear words, but while I agree that in general Electron is not great, calling it a scourge is incredibly offensive towards those who chose to develop with Electron, and have good reasons for it. Sometimes writing native apps is cost-prohibitive, and you’re better off with an Electron app that looks a bit out of place, than have no app at all. It’s cool for you to be smug and elitist and complain about stuff not following the HIG on every single platform the app is developed for, but have you ever thought about the cost of doing so? Yeah, big companies may be able to shell out enough money and pay developers to create native apps and follow the platform’s HIG, but not everyone’s a big business. I dare say the vast majority of app developers aren’t. By hating on Electron and anyone who doesn’t polish their app perfectly, you’re alienating a whole lot of developers.

    Learn to see the other side of the coin already.

    (I ranted about this on my blog recently, also explaining why Electron was chosen over developing native apps.)

    1. 31

      complain about stuff not following the HIG on every single platform the app is developed for

      Do you know why human interface guidelines exist? They exist because humanity is imperfect and accessibility is really important.

      Electron apps are not accessible. They’re often completely opaque to a screen reader, they’re often completely opaque to assistive speech recognition software, they often don’t respond properly to keyboard navigation and if they do, they don’t behave as expected. They don’t often respond properly to text scaling, they don’t understand system-wide options like increased contrast or reduce motion.

      To whole classes of users, your Electron app is worthless and unusable. What are we supposed to do? Congratulate you on your accomplishment? You need to shrink your ego and take some time to understand real world users, rather than throwing words around like “smug” and “elitist”.

      Also your blog post doesn’t even mention the word “accessibility” once. How disappointing.

      By hating on Electron and anyone who doesn’t polish their app perfectly, you’re alienating a whole lot of developers.

      At the risk of sounding controversial, what does it matter if we alienate some developers? Developers should do better. They need to do better. I’m fine with alienating developers for good reasons.

      Electron is not the answer. It’s a shortcut at best and a bandaid at worst. This isn’t a secret, so there’s really no point in acting surprised that people don’t agree with your choices.

      1. 9

        I think that we who care about accessibility need to avoid taking a condemning, vitriolic tone, and meet developers where they are. That way, we’ll be more likely to get results, rather than just alienating a large and growing group of people. It’s true that Electron apps often have accessibility problems. But I believe we can improve that situation without calling for people to throw out Electron entirely. Frankly, we need access to these apps more than these developers need us. So we have to work with what we’ve got.

        No, I haven’t always lived up to this ideal when communicating with mainstream developers, and I’m sorry about that.

        1. 12

          I think that we who care about accessibility need to avoid taking a condemning, vitriolic tone, and meet developers where they are.

          The problem is that these developers don’t want to meet anywhere else - that’s how we arrived at Electron apps in the first place. It’s the easy way out.

          1.  

            Most trends in IT are driven by herd mentality, familiarity, leveraging ecosystems, and marketing by companies. All of these seem to contribute to Electron use just like they contributed to Java and .NET getting big. They sucked, too, compared to some prior languages. So, it’s best to identify what they’re using within what ecosystems to find an alternative that’s better while still being familiar.

            Then, see how many move to it or don’t for whatever reasons. Iterate from there.

            1.  

              Developers don’t want to listen because by the time they start publishing something (based on Electron, for a number of reasons), what they meet with is pure, unconditional hate towards the technology (and not just the tech! towards developers using said tech, too!) that enabled them. It is not surprising they don’t want to listen to the haters anymore.

              You’re alienating new developers with this kind of mentality too, who would be willing to listen to your concerns. You’re alienating them, because of the sins of their fathers, so to say. I’m not surprised noone cares about accessibility, to be honest. When we’re told the world would be better off without developers like us, we’re not going to be interested in working towards better accessibility.

          2. 5

            Do you know why human interface guidelines exist? They exist because humanity is imperfect and accessibility is really important.

            I’m aware, thank you. I’m very much aware that Electron is not… great, for many reasons. That’s still not a reason to unconditionally call it a scourge.

            To whole classes of users, your Electron app is worthless and unusable. What are we supposed to do? Congratulate you on your accomplishment? You need to shrink your ego and take some time to understand real world users, rather than throwing words around like “smug” and “elitist”.

            You, like the article author, ignore circumstances, and generalize. Yes, my electron app is going to be useless for anyone using a screen reader. It will be useless for a whole lot of people. However, it will exist, and hundreds of people will be able to use it. Without Electron, it wouldn’t exist. So ask yourself this, which is better: an application that is not usable by some people, but makes the life of the vast majority of its intended audience easier; or an application that does not exist?

            Here’s the situation: there’s a keyboard with open source firmware. Right now, to change the layout, you need to edit the firmware source, compile a new one, and upload it to your keyboard. While we tried to make the process easy, it’s… not very friendly, and never going to be. So I’m building an application that lets you do this from a GUI, with no need for a compiler or anything else but the app itself. I develop on Linux, because that’s what I have most experience with. Our customers are usually on Windows or Mac, though. With Electron, I was able to create a useful application, that helps users. Without it, if I had to go native, I wouldn’t even start, because I lack the time and resources to go that route. For people that can’t use the Electron app, there are other ways to tweak their keyboard. The protocol the GUI talks can be implemented by any other app too (I have an Emacs package that talks to it, too). So people who can’t use the Electron app, have other choices.

            So, thank you, I do understand real world users. That is why I chose Electron. Because I made my due diligence, and concluded that despite all its shortcomings, Electron is still my best bet. Stop smugly throwing around Electron hate when you haven’t considered the circumstances.

            At the risk of sounding controversial, what does it matter if we alienate some developers? Developers should do better. They need to do better. I’m fine with alienating developers for good reasons.

            Well, for one, a lot of our customers would be deeply disappointed if they weren’t able to use the GUI configurator I built on Electron. “Developers should do better”. Well, come here and do my job then. Get the same functionality into the hands of customers without using Electron. I’ll wait (they won’t).

            Electron is not the answer. It’s a shortcut at best and a bandaid at worst. This isn’t a secret, so there’s really no point in acting surprised that people don’t agree with your choices.

            I agree it is not the best, and I’m not surprised people disagree with my use of it. I can even respect that, and have no problems with it. What I have problems with, is people calling Electron a scourge, and asserting that native is always best, and that anyone who doesn’t follow the HIG of a given platform “should do better”. I have a problem with people ignoring any and all circumstances, the reason why Electron was chosen for a particular product, and unconditionally proclaiming that the developers “should do better”. I have a problem with people who assert that alienating developers because they don’t (or can’t) write apps that match their idealistic desires is acceptable.

            Before writing off something completely, consider the circumstances, the whys. You may be surprised. You see, life is full of compromises, and so is software development. Sometimes you have to sacrifice accessibility, or native feel, or what have you, in order to ship something to the majority of your customers. I’d love to be able to support everyone, and write lighter, better apps, but I do not have the resources. People calling the technology that enables what I do a scourge, hurts. People asserting that I should do better, hurts.

            Until people stop ignoring these, I will call them elitist and smug. Because they assume others that chose Electron have the privilege of being able to chose something else, the resources to “do better”. Most often, they do not.

            1.  

              Electron apps are not accessible. They’re often completely opaque to a screen reader, they’re often completely opaque to assistive speech recognition software, they often don’t respond properly to keyboard navigation and if they do, they don’t behave as expected.

              I haven’t written an electron app, but I’ve done a fair share of web UI programming with accessibility in mind. You communicate with platform accessibility APIs through web APIs. It’s not technically complicated, but it does require some domain expertise.

              Does it work the same way on electron?

              1. 8

                Electron embeds chromium, which doesn’t connect to the native a11y APIs (MS are working to fix this on windows).

                As a result electron apps are as inaccessible as chrome (screenreader users tend to use IE, safari or firefox).

                1.  

                  Huh, this is a real surprise if true.. i tested our web UI with screen readers across macOS and windows in chrome, FF, and IE, and the only problems that occurred were due to bad markup or the occasional platform bug. Reaching the accessibility API was not a problem i ran into with chrome

                  1.  

                    Chrome is definitely accessible to screen readers. I’ve spent more time that I’d like getting JAWS to read consistently across IE, FF and Chrome. From memory, Chrome was generally the most well behaved.

              2. 7

                When Apple was first developing the Mac, they did a lot of research into human/computer interaction and one of the results was to apply a consistent interface on the system as a whole. This lead to every app having the same menu structure (for the most part, the system menu (the Apple logo) was first, “File” next, then “Edit”) and under these standard menus, the actions were largly the same and in the same order. This would lower training costs and if a user found themselves in a new app, they could at least expect some consistency in actions.

                I’ve been using Linux as a desktop since the mid-90s (and Unix in general since 1989) and to say there’s a lack of consistency in UI is an understatement. Some apps have a menu bar at the top of the window (Macs menu bars are always at the top of the screen per Fitt’s Law), some you have to hold Ctrl down and press the mouse button, some the right mouse button will cause a pop-up menu. I’ve been able to navigate these inconsistencies, but I’m still annoyed by them.

                Further more, I’m used to the CLI, and yet even there, the general UI (the command set, the options to each command) still surprises me. I wrote about the consistency of GUIs and the inconsistencies I found on the Unix CLI over the years and while I still prefer the CLI over the GUI [1], I can see where the consistency of the Mac GUI makes for a much better experience for many.

                As I’ve stated, I think it’s wonderful that PHP has enabled people to create the dynamic websites they envision, but I wouldn’t want to use the resulting code personally.

                [1] One can program the CLI to do repetitive tasks much easier than one can do the same for any of today’s GUIs. There have been some attempts over the years to script the GUI (Rexx, AppleTalk) but it still takes more deliberate action than just writing a for loop at the command prompt for a one-off type of job.

                1. 4

                  Thanks for sharing the blog post.

                  I think your case is quite different from, say, Slack. I have worked on major cross-platform apps at a company, and it’s not a huge deal, when you have a few people working on it, whose collective knowledge covers those platforms. All apps used the same core libraries for the non-UI parts, and each app added native UI on top. A company with tens, or even hundreds of well-paid developers should be able to do that, if they care at all about accessibility, performance (which is a different kind of accessibility issue,) resource usage, and all those things.

                  1. 2

                    It is still a big deal, even for a larger company, because there’s a huge difference between employing N developers to develop a single cross-platform application (with some of them specializing in one platform or the other), and between employing a set of developers to create native applications, and a set for the core libraries. There may be overlap between them, but chances are that someone who’s good at developing for Windows or OSX would not be happy with developing for Linux. So you end up employing more people, paying more, diverging UIs, for what? Paying customers will use the Electron app just as well, so what’s the point of going native and increasing costs?

                    Yeah, they should be able to do that, yes, it would improve the user experience, yes, it would be better in almost every possible way. Yet, the benefits for the company are miniscule, most of the time. In the case of Slack, for example, or twitter, a uniform experience across devices is much more important than native feel. It’s easier to document, easier to troubleshoot, and easier for people who hop between devices: it’s the same everywhere. That’s quite a big benefit, but goes very much against making the apps feel native. And if you forego native feel, but still develop a native application that looks and behaves like on any other platform (good luck with that, by the way), then the benefits of native boil down to being less resource hungry. In the vast majority of cases, that is simply not worth the cost of the development and maintenance burden.

                    In the age of mobile devices, I do not feel that apps looking “native” is any benefit at all, but that’s a different topic.

                    1. 5

                      I built them in the past myself. I’ve read write-ups about what it takes for others. If designing program right, most of the code is shared between the different platforms. The things that are different are mostly in the front-end that calls the common code. A lot of that can be automated to a degree, too, after design is laid out. For main three platforms, it basically took a max of three people two of whom only worked on UI stuff here and there mostly focused on shared code. That isn’t the minimum either: it can be lower if you have 1-2 developers that are experts in more than one platform. In mobile, many people probably know both iOS and Android.

                      The cross-platform part will be a small part of the app’s overall cost in most cases. It will mostly be in design/UI, too. That’s worth investing in anyway, though. :)

                      1. 5

                        Our experience clearly differ then. I worked for companies that made native apps for the major platforms (mobile included), and each team was 10+ people at a minimum, with little code shared (the common code was behind an API, so there’s that, but the apps itself had virtually no code in common). Not to mention that the UIs differed a lot, because they were made to feel native. Different UIs, different designs, different bugs, different things to document and support. A whole lot of time was wasted on bridging the gaps.

                        If they made the apps feel less native, and have a common look across platforms, then indeed, it could have been done with fewer people. You’d have to fight the native widgets then, though. Or use a cross-platform widget library. Or write your own. And the writer of the article would then complain loudly, and proclaim that multi-platform apps are the worst that could happen to the Mac (paraphrasing), because they don’t follow the HIG, and developers nowadays just don’t care.

                        1.  

                          each team was 10+ people at a minimum, with little code shared (the common code was behind an API, so there’s that, but the apps itself had virtually no code in common).

                          “If they made the apps feel less native, and have a common look across platforms, then indeed, it could have been done with fewer people. “

                          I said native look on multiple platforms minimizing cost. You example sounds like something about the company rather than an inherent property of cross-platform. You usually need at least one person per platform, esp UI and style experts, but most of the code can be reused. The UI’s just call into it. They’ll have some of their own code, too, for functions specific to that platform. Mostly portable. Just sounds like the company didn’t want to do it that way, didn’t know how, or maybe couldn’t due to constraints from legacy decisions.

                          1.  

                            My experience mirrors yours almost exactly.

                    2. 4

                      I think the case where it makes sense to go Electron is not the point of Gruber’s rant. The point was that many, many developers today are easier with writing Electron app and using it on all platforms instead of putting time and effort into polished Cocoa apps.

                      The core of this blog post is how Mac really was different in terms of UI/UX. During the time I started using Mac (10.5) it was really differentiating itself by having “different”, “better looking and feeling” apps. Electron definitely made Mac feel less unique. Critics were pointed towards macOS app developers. Don’t get so offended by simple blogpost. Your reasons are fine, but that simply isn’t the case most of the time. Most people decide to go with electron because of plethora of mediocre JS devs, that can chunk out a lot of code that does something, and then you get slow junk like UX. In minds of 2000s Apple fans that is a big no.

                      Have a nice day, and move on.

                      1. 7

                        I think the case where it makes sense to go Electron is not the point of Gruber’s rant.

                        Correct.

                        The point was that many, many developers today are easier with writing Electron app

                        Incorrect.

                        Please just read the article.

                        His point is what he says: it is bad news for the Mac platform that un-Mac-like apps far worse than those that were roundly rejected 15 years ago are now tolerated by today’s Mac users.

                        It happens to be the case that Electron is the technology of choice for multiple prominent sub-par apps; that’s a simple statement of fact. (It also isn’t purely coincidental, which is why I agree with his characterisation of Electron as a scourge. If someone like @algernon who builds apps for Electron is bent on interpreting those statements as a judgement of their own personal merit, well… be my guest?) But Electron is not singled out: Marzipan gets a mention in the same vein. On top of that, Gruber also points out the new Mac App Store app, which uses neither. The particular technologies or their individual merits are not his point.

                        His point is, again, that a Mac userbase which doesn’t care about consistency spells trouble for the Mac platform.

                        1.  

                          Marzipan gets a mention in the same vein.

                          Electron is the only one that gets called a scourge, and is singled out in the very beginning. It’s even in the title. It’s even the first sentence, which then continues: “because the Mac is the platform that attracts people who care”

                          If that’s not an elitist smug, I haven’t seen any.

                          1.  

                            Once upon a time, Mac users were a ridiculed minority. In those days, Microsoft-powered PCs were better in just about every way. They were much faster, they had a more technically advanced OS (even crappy Win95 was far ahead of MacOS Classic), they had more applications, they had boatloads of games… just about every reason to pick one computer over another pointed in the direction of a Microsoft PC. You had to be special kind of kook to want a Mac regardless. It was inferior to a PC in basically every dimension. The one reason to pick a Mac over the PC was the depth of consistency and care in the UI design of its software. Only users who cared about that enough to accept the mile-long list of tradeoffs went for the Mac.

                        2. 3

                          The point was that many, many developers today are easier with writing Electron app and using it on all platforms instead of putting time and effort into polished Cocoa apps.

                          My beef is not with the author wishing for apps that would look more native - I share the same wish. My beef is with him calling Electron “without a question a scourge”. How about I said MacOS is without a question a scourge, for it jails you in its walled garden? You’d be rightly upset.

                          There’s a big difference between wishing apps would be more polished on a particular platform, and between calling a technology (and by extension, developers who chose to use it) a scourge. It reeks from privileged elitism, and failure to understand why people go with Electron.

                          Most people decide to go with electron because of plethora of mediocre JS devs, that can chunk out a lot of code that does something

                          No. Most people decide to go with Electron because it provides a much better cross-platform environment than anything else. Please don’t call a whole bunch of people “mediocre JS devs”, unless you have solid data to back that up. Just because it is JS and “web stuff” doesn’t mean the people who develop it are any less smarter than native app developers. Can we stop this “only mediocre people write JS/PHP/whatever” bullshit?

                          1. 11

                            There are more bad developers writing webshit because there are more devs writing webshit period.

                            Native apps tend to outperform Electron apps and use less memory, because to do the same things that don’t bring in a browser and language runtime.

                            Elitism is, in this case, warranted. The only really performant app (usually) in Electron I’ve seen is VSCode, because MS really does have sharp people working in a domain they’ve been leaders in for decades.

                            1. 7

                              There seems to be a shift towards less attention paid, and value given, to the experience of the user. This makes me very sad.

                              When people talk about why they use Electron, they always phrase it in terms of “developer productivity”, and that’s where I find the most elitist bullshit to be. Developers talk about using Electron so they didn’t have to learn a new platform, or so they only had to test it in one place, or it was faster. They talk about lower development costs (which they wildly overstate, in my experience).

                              But the questions I’d like use to start asking: what are the costs of the shit user experience? What are the costs of people having to learn new tools that don’t behave quite like the others? When we save money and time on development that money and time is saved once, but when we save time for our users, it’s saved repeatedly.

                              Maybe calling Electron shit is elitist bullshit. But I’ll take that over having contempt for one’s users.

                              1. 3

                                Contempt is a strong word. Would all these people be users in the first place if the app doesn’t exist for their platform? Go ahead and write a native Cocoa app for OSX, but that sure feels like contempt for Windows or Linux users. “Buy a new machine to use my stuff” vs. “deal with menus in the wrong order”?

                                1.  

                                  I never said “buy a new machine to use my stuff.”

                                  From extensive experience: for most small applications, I can develop them natively on Mac, Windows, and Linux* faster than someone can develop the same thing with similar quality using a cross platform thing.

                                  (*) “native” on Linux is less of a sticky thing that on Mac and Windows.

                                  1.  

                                    Here’s a challenge for you: https://github.com/keyboardio/chrysalis-bundle-keyboardio (demo here).

                                    Go do something like that natively for Mac and Windows. It’s a small app, some 3700 lines of JS code with comments. You do that, and I promise I’ll never write an Electron app ever again. You can make the world a better place!

                                    1.  

                                      Thank you for your interest in my consulting services.

                                      1.  

                                        Thought so.

                                        FWIW, the app, like many Electron apps, were originally built in my unpaid free time. Complain about Electron apps once you built the same stuff under the same conditions.

                            2. 9

                              How about I said MacOS is without a question a scourge, for it jails you in its walled garden? You’d be rightly upset.

                              I wouldn’t. I might point out that you absolutely can bypass their walled garden, on MacOS, but those objections for iOS are not only valid, but are honestly concerning.

                              Electron is a scourge. iOS is a scourge. Facebook is a scourge. The feature creep within the browser is absolutely a scourge. There are loads of scourges. This is not an exhaustive list. I pray daily for a solar flare which delivers enough of an EMP that it utterly destroys the entire technology landscape, and gives us an opportunity to rebuild it from the invention of fire onwards, because we’ve fucked up, and our technology is bad.

                              And I say this because I want technology to be better. The Web is an awfully complicated way to render a UI. Our systems are overly dependent on a few corporations who don’t have our best interests at heart. Our computers are slower to do less work than they did two decades ago. Pretty much the only way anybody makes money in tech anymore is by abusing their users (see: Google, Facebook, etc). Or their employees (see: Uber). Or both (see: Amazon).

                              1. 6

                                You’d be rightly upset.

                                No, I wouldn’t be rightly upset. I am not the technologies I use, and neither is that true for you.

                                Electron is the technology used in multiple highly prominent applications that are written with little or no regard to platform conventions. Their success is bad for the native platforms. Those are statements of fact. If you have good reasons to use Electron, then there is no need for you to relate those facts to yourself and take them as a statement of your merits as an individual.

                                1. 7

                                  Agree. The notion that your identity is somehow linked with the tools you use is toxic. It is fine to like your tools, but once you get comfy with them you should be pushing beyond them to expand your taste.

                                  1. 5

                                    your identity is somehow linked with the tools you use

                                    I used QBasic, Visual Basic 6, and later FreeBASIC. If my tools define me, I feel like such a shallow person with no depth or skill. Such a sinking feeling. I think I’m going to re-install SPARK Ada and buy Matlab to feel like a mathematician. Yeah, that will be better… ;)

                            3.  

                              What about sciter? Companies doing stuff like anti-virus have been using it for a long time with way, way, less, resource use. It’s licensing scheme looks like something other vendors should copy. Here’s a comparison claiming a simple editor is 2MB in sciter vs 100+ in Electron just because it brings in less baggage.

                              How many people using Electron could use the free, binary version of sciter? And how many companies using Electron could afford $310 per year? I mean, that’s within reach of startups and micro-businesses, yeah? I’m asking because you said it’s use Electron or not cross-platform at all cuz too costly/difficult. I’m making it easy by using a comparable offering rather than, say, Lazarus w/ Free Pascal or otherwise non-mainstream languages. :)

                              Note: I also have a feeling lots of people just don’t know about this product, too.

                              1.  

                                I actually evaluated sciter when I got frustrated with developing in JS, and wanted to go native. For my use, it wasn’t an option, because the app I write is free software, and therefore so much be its dependencies. For closed-source use, it’s probably fine. Though, you’d still have to write plenty of platform-specific code. AV companies already do that, but companies that start off with a web-based service, and develop an application later do not have that platform-specific code already built. What they have, is plenty of JavaScript and web stuff. Putting that into Electron is considerably easier, and you end up with very similar UX, with little effort, because you’re targeting a browser still.

                                Oh, and:

                                With Sciter, changing the front end of your application involves just altering the styles (CSS), and probably a couple of scripts that do animations.

                                Yeaah… no. That’s not how changing the UX works. It’s a tad more involved than that. Not sure I’d be willing to trust my UI on an offering that basically tells me that changing between, say, Metro and Material UI is a matter of CSS and animations. (Hint: it’s much more involved than that.)

                                Since we’ve already decided we’re not going to follow any platform HIGs (and thus, have the article author proclaim we’re a scurge), what’s the point of going native? Less resource use? Why is that worth it for the company? People use the app as it is, otherwise they wouldn’t be writing an app. Writing native, and making it look and behave the same has non-negligible cost, but little to no benefits. Faster and lighter is in many cases not a goal worth pursuing, because customers buy the thing anyway. (I’d love if that wouldn’t be the case, but in many cases, it is.)

                                1.  

                                  I appreciate the balanced review of sciter. That makes sense.

                            1. 3

                              Welp. I hope this won’t be used in job interviews, or I’m doomed. :)

                              1. 2

                                This is exciting work. Other than enabling “fearless” audio programming, I’d also say it lowers the barrier of entry for anyone curious about audio programming beyond the most basic stuff that’ll work fine without SIMD.

                                1. 2

                                  Thanks, that is an explicit goal of the work, and I think the ability to wire together modules in the GUI lowers it even further, providing an even easier on-ramp. When a sound designer runs against the limits of that paradigm, there’s always the option of writing a custom module.

                                1. 4

                                  plex mono has become one of my favorite monospace fonts for sure!

                                  1. 3

                                    Mine too. And I use Plex Sans as my UI font. It’s nice to have a whole superfamily of free, high-quality fonts, that work perfectly together.

                                    1. 1

                                      Ooh I hadn’t thought to use it as my UI font. I’ll definitely be trying this shortly.

                                  1. 6

                                    One thing I enjoy about Rust is that error handling is very uniform. To get the result, I need to check for the error (or explicitly discard it.) When the program compiles, I can feel pretty confident that I’ve handled everything in one way or another. I’m sure there are cases where this breaks down, but it’s a nice “default.”

                                    1. 2

                                      I agree, option types and mandatory complete pattern matching solves a good portion of the issues raised in the article. It might be interesting to look at Zig, which is built with error handling as a core feature.

                                    1. 2

                                      Bug report: looks like broken markdown around the libdill and POSIX connect() links.

                                      1. 1

                                        Fixed. thanks!

                                      1. 6

                                        It is because of bugs like this that I am not a fan of defensive programming. They can hide. They can fester. They can be a nightmare to debug at 3:00 am on a production system sans a debugger.

                                        You can replace “defensive programming” with “offensive programming” (or whatever the opposite is) and the statement is still true. In fact, you can replace it with just about any kind of programming and it’s still true in my experience. Bugs can always hide, fester, and be a nightmare to debug.

                                        1. 3

                                          I’m not sure that’s the case. My understanding is that the distinction is between validating data at a system boundary vs validating data everywhere.

                                          I’ve been through plenty of coding interviews where I’m asked to implement some trivial JavaScript function, and then I’ve been told that my implementation is poor because I didn’t check for invalid inputs, e.g. “ohhhh but what if the programmer passes in undefined? Derp derp derp derp”.

                                          If you have stronger guarantees that the data you’re passing through functions is valid, then you have fewer places for bugs to occur in your system.

                                          1. 4

                                            My answer to the “what if the programmer passed in undefined?” is “that would be a bug and the programmer needs to fix the code.” Why is the routine getting undefined? Why was it not detected earlier?

                                            1. 3

                                              This is one reason I prefer languages where you simply can’t get a nil unless you explicitly ask for it, through Option<T> or what have you, and then you must explicitly handle it. But even in C, I prefer to place nullability attributes on everything, so that it’s clear where NULL is allowed. Misuse becomes a compile-time error, and failure to check a nullable pointer is flagged by the analyser.

                                              1. 1

                                                How do you add nullability attributes in C? Something to do with __attribute__?

                                                1. 4

                                                  It’s rarely used and possibly cumbersome, but you can use single field structs to bolt more complex types on to functions.

                                                  struct notnull { void *ptr; };
                                                  struct maybenull { void *ptr; };
                                                  

                                                  Now you have two incompatible types that can’t be accidentally mixed.

                                                  1. 1

                                                    Yes. I have a file with macros that contains something like:

                                                    #ifndef __has_attribute
                                                    #define __has_attribute(x) 0
                                                    #endif
                                                    
                                                    #if __has_attribute(nonnull)
                                                    #define NONNULL __attribute__((nonnull))
                                                    #else
                                                    #define NONNULL
                                                    #endif
                                                    
                                                    [a bunch of others]
                                                    
                                          1. 8

                                            The timenow.New accepts a pointer to http.Client, so we can pass nil if we want to let the function itself to instantiate the dependency, or we can specify it.

                                            Ugh. In an API intended for consumption by downstream users, magic parameters intended for consumption only by the framework’s developers to accomplish internal testing of the framework’s implementation are an awful architectural pattern that unfortunately have way too much industry currency as “the right way to solve mocking”, currently.

                                            I’ve seen far too many codebases with constructor parameter lists that are an absolute grab-bag of random dependencies with no clear meaning to end users trying to instantiate anything other than “just go with the defaults that magically appear”. It’s a bad pattern that reduces encapsulation (you’ve now given downstream consumers a lot of visibility and reach into your implementation internals, to the point where you’ve got no guarantee that you’re relying on what you expect you’re relying on at runtime), and it seriously harms the communication of intention to other developers who don’t already have the framework’s internal implementation in their heads (because now you’ve confused the public API with a bunch of information about the API’s implementation)

                                            There are other ways to solve this problem. If you embed httpClient in a wrapper struct, timeNow can depend, directly and internally, on your wrapper, and a good build tool will let you expose an alternate implementation of the wrapper to timeNow when compiling it for testing.

                                            “Injecting” mocked dependencies at test compile time is going to be a lot cleaner in the long-run than watching every constructor in your application explode into a grab-bag of dynamic injection points that are never expected to dynamically vary during a production run anyways.

                                            1. 5

                                              The strictly-better solution would be to define

                                              type Doer interface {
                                                  Do(*http.Request) (*http.Response, error)
                                              }
                                              

                                              which is implicitly satisfied by net/http.Client. The timenow constructor would take an instance of that interface rather than a concrete object, which would permit the real client in production code, and a mock client in tests.

                                              1. 3

                                                I worked at a company where we did this , but in Objective-C. So I simply had two constructors: one with explicit dependencies, and one that conjures them up and then calls the first one, which I think is slightly nicer than the solution presented in the post. The DI version can be in a private header and no one else needs to care about it.

                                                1. 1

                                                  Do you have golang exemples with your solution? I’d be interested to have the same example as presented but as you describe it!

                                                1. 8

                                                  So much negativity. I’m trying it now, and I find it quite nice. Will give it some time and see if it manages to lure me away from fish. Great job!

                                                  1. 3

                                                    Swift for TensorFlow is one attempt to close the prototype/production gap. It’s a modified version of the Swift compiler. IMO, Swift is about as easy to write as Python, but catches shape mismatches and other things at compile-time, so maybe it’ll catch on.

                                                    1. 2

                                                      shape mismatch is caught on first run in most frameworks – that certainly isn’t much of a value add.

                                                    1. 17

                                                      First time I’m in the “thanks” :)

                                                      1. 1

                                                        Cool! What was your contribution?

                                                        1. 5

                                                          It was very small: more helpful diagnostics for deprecated features. But I got my feet wet.

                                                      1. 2

                                                        I love classic FM synthesis, as well as analog synthesis in the west coast tradition of Buchla and Serge.

                                                        One thing they have in common is that they don’t rely on filters to control harmonics, like in classic analog subtractive synthesis. It’s a fun and different way to think about sound sculpting.

                                                        You instrument is really cool, and the demos sound great! They also lean pretty heavily on the analog-style filter (at least that’s what it sounds like), and I’d really like to hear some demos that show off this other style of expression.

                                                        I’m playing around with the demo as I write this, trying to get a feel for it. :)

                                                        1. 3

                                                          Yeah I can see how the filter can seem like it isn’t necessary – to be honest, I’ve been using Cadmium in my own tracks since long before I got the filter in. For me, the filter serves the same purpose that the filter in the Mutable Instruments Shruthi-1, in which the oscillators are 8-bit and come from an Arduino, but there’s anan analog filter board attached, and it helps smooth the sound and make it more versatile.

                                                          Cadmium’s oscillators are unabashedly digital, and VPS is hard to anti-alias. I did a pretty admirable job (IMHO) but things can definitely still get out of control. For me, the filter adds versatility and character, especially in those instances.

                                                          Still, you’re right – I could see about adding some “raw VPS” presets that have the filter turned off.

                                                          1. 1

                                                            For me, the filter serves the same purpose that the filter in the Mutable Instruments Shruthi-1

                                                            Absolutely. I think it’s a great feature; I love the combination of crude, digital oscillators and analog filter, like in the SID chip. I was just interested in hearing other aspects of the instrument, too.

                                                            VPS is hard to anti-alias

                                                            I can imagine! I made a simple FM synthesizer, and I read a lot of papers about it. I’m not a DSP person, so I ended up just oversampling a lot, and constraining the parameter ranges a bit. Sometimes aliasing and quantisation noise can sound nice though, for that gritty, retro sound.

                                                            1. 3

                                                              Actually, it occurred to me that a few of my favourite patches are almost exclusively VPS – it’s the three “WRL hollow/hollower/hollowest lead” ones in the factory bank. The filter is there for a bit of character but you can turn it off to get a better feel for the sources.

                                                        1. 15

                                                          I hope the EU “right to repair” legislation gets passed soon, maybe that would help prevent this kind of nonsense.

                                                          1. 1

                                                            As a genuine question from someone who hasn’t used procedural programming productively before, what would be the benefits of a procedural language to justify its choice?

                                                            1. 3

                                                              I would say less conceptual/cognitive overhead, but I don’t know if that’s something that can be said of this language as a whole, as I have no experience with it.

                                                              By that I mean something like: I have a rough idea of what code I want from the compiler, how much mental gymnastics is required to arrive at the source-level code that I need to write?

                                                              I would imagine that’s an important consideration in a language designed for game development.

                                                              1. 4

                                                                Yeah, it makes perfect sense.

                                                                To dumb down Kit’s value prop, it’s a “Better C, for people who need C (characteristics)”.

                                                              2. 2

                                                                On top of alva’s comment, they compile fast and are easy to optimize, too.

                                                                1. 1

                                                                  I looked this up for some other article on lobste.rs. I found wikipedia to have a nice summary

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

                                                                  Imperative programming

                                                                  Procedural programming languages are also imperative languages, because they make explicit references to the state of the execution environment. This could be anything from variables (which may correspond to processor registers) to something like the position of the “turtle” in the Logo programming language.

                                                                  Often, the terms “procedural programming” and “imperative programming” are used synonymously. However, procedural programming relies heavily on blocks and scope, whereas imperative programming as a whole may or may not have such features. As such, procedural languages generally use reserved words that act on blocks, such as if, while, and for, to implement control flow, whereas non-structured imperative languages use goto statements and branch tables for the same purpose.

                                                                  My understanding is that if you use say C you are basically using procedural language paradigms.

                                                                  1. 2

                                                                    Interesting. So basically what was registering in my mind as imperative programming is actually procedural.

                                                                    Good to know. Thanks for looking it up!

                                                                    1. 2

                                                                      I take “imperative” to mean based on instructions/statements, e.g. “do this, then do that, …”. An “instruction” is something which changes the state of the world, i.e. there is a concept of “before” and “after”. Lots of paradigms can sit under this umbrella, e.g. machine code (which are lists of machine instructions), procedural programming like C (where a “procedure”/subroutine is a high-level instruction, made from other instructions), OOP (where method calls/message sends are the instructions).

                                                                      Examples of non-imperative languages include functional programming (where programs consist of definitions, which (unlike assignments) don’t impose a notion of “before” and “after”) and logic programming (similar to functional programming, but definitions are more flexible and can rely on non-deterministic search to satisfy, rather than explicit substitution)

                                                                      1. 1

                                                                        If functional programs don’t have a noton of before and after, how do you code an algorithm? Explain newton’s method as a definition.

                                                                          1. 1

                                                                            both recursion and iteration say “do this, then do that, then do … “. And “let” appears to be assignment or naming so that AFTER the let operation a symbol has a meaning it did not have before.

                                                                            open some namespaces
                                                                            open System
                                                                            open Drawing    
                                                                            open Windows.Forms
                                                                            open Math
                                                                            open FlyingFrog
                                                                            

                                                                            changes program state so that certain operations become visible AFTER those lines are executed, etc.

                                                                            1. 3

                                                                              It is common for computation to not actually take place until the result is immediately needed. Your code may describe a complicated series of maps and filters and manipulations and only ever execute enough to get one result. Your code looks like it describes a strict order the code executes in, but the execution of it may take a drastically different path.

                                                                              A pure functional programming language wouldn’t be changing program state, but passing new state along probably recursively.

                                                                              1. 1

                                                                                but you don’t really have a contrast with “imperative” languages - you still specify an algorithm. In fact, algorithms are all over traditional pure mathematics too. Generally the “state” being changed is on a piece of paper or in the head of the reader, but …

                                                                              2. 1

                                                                                so that AFTER the let operation

                                                                                If we assume that let is an operation, then there is certainly a before and an after.

                                                                                That’s not the only way to think about let though. We might, for example, treat it as form of linguistic shorthand; for example treating:

                                                                                let x = somethingVeryLongWindedInvolving y in x * x
                                                                                

                                                                                as a shorthand for:

                                                                                (somethingVeryLongWindedInvolving y) * (somethingVeryLongWindedInvolving y)
                                                                                

                                                                                There is no inherent notion of before/after in such an interpretation. Even if our language implements let by literally expanding/elaborating the first form into the second, that can take place at compile time, alongside a whole host of other transformations/optimisations; hence even if we treat the expansion as a change of state, it wouldn’t actually occur at run time, and thus does not affect the execution of any algorithm by our program.

                                                                                Note that we might, naively, think that the parentheses are imposing a notion of time: that the above tells us to calculate somethingVeryLongWindedInvolving y first, and then do the multiplication on the results. Call-by-name evaluation shows that this doesn’t have to be the case! It’s perfectly alright to do the multiplication first, and only evaluate the arguments if/when they’re needed; this is actually preferable in some cases (like the K combinator).

                                                                            2. 2

                                                                              If functional programs don’t have a noton of before and after, how do you code an algorithm?

                                                                              Roughly speaking, we define each “step” of an algorithm as a function, and the algorithm itself is defined as the result of (some appropriate combination of) those functions.

                                                                              As a really simple example, let’s say our algorithm is to reverse a singly-linked-list, represented as nested pairs [x0, [x1, [x2, ...]]] with an empty list [] representing the “end”. Our algorithm will start by creating a new empty list, then unwrap the outer pair of the input list, wrap that element on to its new list, and repeat until the input list is empty. Here’s an implementation in Javascript, where reverseAlgo is the algorithm I just described, and reverse just passes it the new empty list:

                                                                              var reverse = (function() {
                                                                                function reverseAlgo(result, input) {
                                                                                  return (input === [])? result : reverseAlgo([input[0], result], input[1]);
                                                                                };
                                                                                return function(input) { return reverseAlgo([], input); };
                                                                              })();
                                                                              

                                                                              Whilst Javascript is an imperative language, the above is actually pure functional programming (I could have written the same thing in e.g. Haskell, but JS tends to be more familiar). In particular, we’re only ever defining things, in terms of other things. We never update/replace/overwrite/store/retrieve/etc. This style is known as single assignment.

                                                                              For your Newton-Raphson example, I decided to do it in Haskell. Since it uses Float for lots of different things (inputs, outputs, epsilon, etc.) I also defined a bunch of datatypes to avoid getting them mixed up:

                                                                              module Newton where
                                                                              
                                                                              newtype Function   = F (Float -> Float)
                                                                              newtype Derivative = D (Float -> Float)
                                                                              newtype Epsilon    = E Float
                                                                              newtype Initial    = I Float
                                                                              newtype Root       = R (Float, Function, Epsilon)
                                                                              
                                                                              newtonRaphson :: Function -> Derivative -> Epsilon -> Initial -> Root
                                                                              newtonRaphson (F f) (D f') (E e) (I x) = if abs y < e
                                                                                                                          then R (x, F f, E e)
                                                                                                                          else recurse (I x')
                                                                              
                                                                                where y  = f x
                                                                              
                                                                                      x' = x - (y / f' x)
                                                                              
                                                                                      recurse = newtonRaphson (F f) (D f') (E e)
                                                                              

                                                                              Again, this is just defining things in terms of other things. OK, that’s the definition. So how do we explain it as a definition? Here’s my attempt:

                                                                              Newton’s method of a function f + guess g + epsilon e is defined as the “refinement” r of g, such that f(r) < e. The “refinement” of some number x depends on whether x satisfies our epsilon inequality: if so, its refinement is just x itself; otherwise it’s the refinement of x - (f(x) / f'(x)).

                                                                              This definition is “timeless”, since it doesn’t talk about doing one thing followed by another. There are causal relationships between the parts (e.g. we don’t know which way to “refine” a number until we’ve checked the inequality), but those are data dependencies; we don’t need to invoke any notion of time in our semantics or understanding.

                                                                              1. 2

                                                                                Our algorithm will start by creating a new empty list, then unwrap the outer pair of the input list, wrap that element on to its new list, and repeat until the input list is empty.

                                                                                Algorithms are essentially stateful. A strongly declarative programming language like Prolog can avoid or minimize explicit invocation of algorithms because it is based on a kind of universal algorithm that is applied to solve the constraints that are specified in a program. A “functional” language relies on a smaller set of control mechanisms to reduce, in theory, the complexity of algorithm specification, but “recursion” specifies what to do when just as much as a “goto” does. Single assigment may have nice properties, but it’s still assignment.

                                                                                To me, you are making a strenuous effort to obfuscate the obvious.

                                                                                1. 3

                                                                                  Algorithms are essentially stateful.

                                                                                  I generally agree. However, I would say programming languages don’t have to be.

                                                                                  When we implement a stateful algorithm in a stateless programming language, we need to represent that state somehow, and we get to choose how we want to do that. We could use successive “versions” of a datastructure (like accumulating parameter in my ‘reverse’ example), or we could use a call stack (very common if we’re not making tail calls), or we could even represent successive states as elements of a list (lazy lists in Haskell are good for this).

                                                                                  A strongly declarative programming language like Prolog can avoid or minimize explicit invocation of algorithms because it is based on a kind of universal algorithm that is applied to solve the constraints that are specified in a program.

                                                                                  I don’t follow. I think it’s perfectly reasonable to say that Prolog code encodes algorithms. How does Prolog’s use of a “universal algorithm” (depth-first search) imply that Prolog code isn’t algorithmic? Every programming language is based on “a kind of universal algorithm”: Python uses a bytecode interpreter, Haskell uses beta-reduction, even machine code uses the stepping of the CPU. Heck, that’s the whole point of a Universal Turing Machine!

                                                                                  “recursion” specifies what to do when just as much as a “goto” does.

                                                                                  I agree that recursion can be seen as specifying what to do when; this is a different perspective of the same thing. It’s essentially the contrast between operational semantics and denotational semantics.

                                                                                  I would also say that “goto” can be seen as a purely definitional construct. However, I don’t think it’s particularly useful to think of “goto” in this way, since it generally makes our reasoning harder.

                                                                                  To me, you are making a strenuous effort to obfuscate the obvious.

                                                                                  There isn’t “one true way” to view these things. I don’t find it “strenuous” to frame things in this ‘timeless’ way; indeed I personally find it easier to think in this way when I’m programming, since I don’t have to think about ‘time’ at all, just relationships between data.

                                                                                  Different people think differently about these things, and it’s absolutely fine (and encouraged!) to come at things from different (even multiple) perspectives. That’s often the best way to increase understanding, by find connections between seemingly unrelated things.

                                                                                  Single assigment may have nice properties, but it’s still assignment.

                                                                                  In name only; its semantics, linguistic role, formal properties, etc. are very different from those of memory-cell-replacement. Hence why I use the term “definition” instead.

                                                                                  The key property of single assignment is that it’s unobservable by the program. “After” the assignment, everything that looks will always see the same value; but crucially, “before” the assignment nothing is able to look (since looking creates a data dependency, which will cause that code to be run “after”).

                                                                                  Hence the behaviour of a program that uses single assignment is independent of when that assignment takes place. There’s no particular reason to assume that it will take place at one time or another. We might kid ourselves, for the sake of convenience, that such programs have a state that changes over time, maybe going to far as to pretend that these hypothetical state changes depend in some way on the way our definitions are arrangement in a text file. Yet this is just a (sometimes useful) metaphor, which may be utterly disconnected from what’s actually going on when the program (or, perhaps, a logically-equivalent one, spat out of several stages of compilation and optimisation!).

                                                                                  Note that the same is true of the ‘opposite’ behaviour: garbage collection. A program’s behaviour can’t depend on whether or not something has been garbage collected, since any reference held by such code will prevent it from being collected! Garbage collection is an implementation detail that’s up to the interpreter/runtime-system; we can count on it happening “eventually”, and in some languages we may even request it, but adding it to our semantic model (e.g. as specific state transitions) is usually an overcomplication that hinders our understanding.

                                                                                  1. 1

                                                                                    A lot of what you see as distinctive in functional languages is common to many non-functional languages. And look up Prolog - it is a very interesting alternative model.

                                                                                    1. 1

                                                                                      A lot of what you see as distinctive in functional languages is common to many non-functional languages.

                                                                                      You’re assuming “what I see”, and you’re assumption is wrong. I don’t know where you got this idea from, but it’s not from me.

                                                                                      I actually think of “functional programming” as a collection of styles/practices which have certain themes in common (e.g. immutability). I think of “functional programming languages” as simply those which make programming in a functional style easier (e.g. eliminating tail calls, having first-class functions, etc.) and “non-functional programming languages” as those which make those styles harder. Most functional programming practices are possible in most languages.

                                                                                      In other words, I agree that “A lot of [features of] functional languages is common to many non-functional languages”, but I have no idea why you would claim I didn’t.

                                                                                      Note that in this thread I’ve not tried to claim that, e.g. “functional programming languages are better”, or anything of that nature. I was simply stating the criteria I use for whether to call a style/language “imperative” or not; namely, if its semantics are most usefully understood as executing instructions to change the state of the (internal or external) world.

                                                                                      And look up Prolog - it is a very interesting alternative model.

                                                                                      I’m well aware of Prolog. The research group I was in for my PhD did some fascinating work on formalising and improving logic programming in co-inductive settings; although I wasn’t directly involved in that. For what it’s worth I’m currently writing a project in Mercury (a descendent of Prolog, with static types among other things).

                                                                        1. 1

                                                                          So procedural languages are similar to imperative languages, but with somewhat more abstraction?

                                                                      1. 1

                                                                        I did not find this explicitly mentioned, but surely the name resolution in OOP is dynamic rather than lexical?

                                                                        1. 2

                                                                          Depends on the language doesn’t it?

                                                                          1. 1

                                                                            I would argue that message passing, with the objects deciding what to do about a message received at runtime captures the essence of dynamic binding.

                                                                            However, I agree with your point. OO is somewhat amorphous at this point, and one may very well implement a language without late binding and call it OO.

                                                                            Edit: To clarify what I meant; dynamic binding is where the execution path rather than the lexical ordering determines how a method or variable is resolved. When an object receives a message, the message resolution is determined by the execution path that involved that object. That is, one can not predict in advance using lexical knowledge alone what method will be called.

                                                                            1. 8

                                                                              The post talks both about name resolution (lexical and dynamic scope) and method resolution, and sometimes seems to conflate the two.

                                                                              All mainstream OO languages that I’m familiar with use lexical scope, while most of them use dynamic binding.

                                                                              1. 1

                                                                                Yes, agreed. Got muddled :/

                                                                        1. 6

                                                                          Preparing my first patches for rustc.

                                                                          Also working on an Icelandic dictionary web app/service, combining the data sets of ISLEX and BÍN with a nice, fast UI. ISLEX is a dictionary with example sentences in several nordic languages, and BÍN has inflection tables.

                                                                          Neither of them are very good with misspelled/transliterated words, so I’m working on fuzzy matching so that Thjodskra matches Þjóðskrá, and so on. Having it all in one, easier to use tool will be nice, I think.

                                                                          1. 45

                                                                            I use and love linux, and have read many things about Linus being abusive and what not. I am on the spectrum and wasn’t diagnosed til my 40s. Looking back on my earlier adult years, I was described as abrasive, obnoxious, and many others.

                                                                            I tend not to suffer fools lightly, but somehow, on my own have learned better self-editing skills. Hopefully Linus will figure this out, because it truly will benefit everyone in the community.

                                                                            1. 11

                                                                              on my own have learned better self editing skills.

                                                                              Any tips? I’m probably in a similar position but am trying to be less of an asshole.

                                                                              1. 22

                                                                                Wow. I wish I had a great answer for this. Feeling things, ANYTHING, has always been hard for me, but one thing that has always made me feel things is art. Music and cinema are usually where I go. When something in either of those arenas makes me feel something, I reflect on it and think. I think about that feeling and how it might apply to me and others, and I dunno, maybe it’s re-written my brain wiring a little bit.

                                                                                I guess one basic thing I also do is just not respond sometimes. I give it time, and think about it. When I’m on the internet now, I can’t tell you how many times I’ve started a reply, and then just bailed on it, and never sent it. Or I’ve started a reply, and copied it into my clipboard so I could spend a little time thinking if I really wanted to send it. It’s in the clipboard if I need it.

                                                                                Whereas 30+ years ago, if I was on my BBS or another, I would just furiously write a reply or a message and just hit save, without thinking. So maybe some of this has come with age, also. Supposedly we get wiser as we get older.

                                                                                1. 14

                                                                                  I am (was?) also in a similar situation. I never insulted people, like Linus, but I would give very blunt feedback, because that’s how I like to receive feedback. It took me a while (I’m in my thirties now) but I eventually recognised that different people respond differently to different styles of feedback. So I would observe other people’s communication styles, and then mimic a person’s style when giving them feedback. It felt dishonest and almost manipulative at first, but I noticed how much smoother my interactions would be, and after a while I could do it without much effort. It made me more effective in teams, and I think my coworkers feel more positive about working with me these days.

                                                                                  1. 7

                                                                                    Don’t reply on impulse. Play devil’s advocate when reading your replies. When in doubt, clarify that you are criticizing an idea or a behavior and not attacking the person behind it. If necessary, acknowledge and repeat back what the other person wrote to ensure you are understanding each other before responding.

                                                                                  2. 3

                                                                                    I am on the spectrum and wasn’t diagnosed til my 40s.

                                                                                    This is what surprises me about this post - and your comment. I’m not being judgemental - I’m just ignorant about the condition(s) other than exposure in the media - which must be the worst way to learn about anything.

                                                                                    Linus is married and I expect he has a social circle apart from his professional and technical contacts.

                                                                                    I’m surprised he hasn’t come to realise until now. Still good for him to publicly admit and address it - that alone takes a lot of bravery - including your comment.

                                                                                    1. 11

                                                                                      It was actually someone in my social circle who suggested I read Jon Elder Robison’s book, Look Me in the Eye, which began my journey. She said I reminded her a lot of him. When I was in grade school, Aspergers wasn’t really a thing to the point of mass awareness. When it became a thing, I was already in high school. I surely would have benefited from some special education in my more formative years of grade school, but instead I had to learn it the hard way through social failure. This method wasn’t always successful, either.

                                                                                      Relationships of all sorts still baffle me, and I often question peoples’ choices when they make a beeline for the worse possible decision, when the best choice is obvious to me, but hey.

                                                                                      Human behaviour is so broad that I suspect people on the Aspergers side of the spectrum were just dismissed with people saying, “Oh, that’s just John being John.” In my family, the behaviour was probably more accepted because after my diagnosis, and learning what to look for, it’s clear that my dad is on the spectrum, also. So my behaviour was just probably explained by “the apple not falling far from the tree.”

                                                                                      Despite that, my mom definitely didn’t have the patience for a kid on the spectrum. It was bad.

                                                                                      But becoming self aware later in life, from where I sit, is a common thing. With age comes wisdom, hopefully.

                                                                                      1. 2

                                                                                        Thanks for taking the time to reply,

                                                                                        I was sent on a management course once which turned out to be a cleverly disguised self-improvement course but I think the thing that stayed with me more than anything was the instructor saying that “people are messy” - his exact phrase, repeated several times. I think part of what he meant was that there is no logic and no rules that govern everybody and every single relationship is unique and challenging in its own way.

                                                                                        That freed me from a lot of prejudice and stress I think. Although it may sound scary that you can’t rely on a set of instructions or a template for dealing with people, it’s also quite liberating and helped me avoid stereotyping people and treat them more individually rather than thinking there is some cultural, racial, religious (or any other) “norm” for anyone.

                                                                                        1. 3

                                                                                          One thing I learned from working for this particular boss was, “What’s true for me isn’t necessarily true for you (or others). What struck me was a particular example he gave at a staff meeting, one day. This company had an inside sales force. It was phone stuff. They never left the office unless we went to trade shows, but he made them all wear ties because, “Wearing a tie makes you feel better, doesn’t it?” Well speaking for myself, it didn’t. Anything on or near my adam’s apple makes me gag, and wearing a tie all day was torture. The lesson learned was that HE didn’t see that what was true for him, wasn’t always true for everyone else. I applied that lesson to myself from that day forward. I think in management there are some universal truths about respect and behaviour that must apply to everyone, and then there’s all that individual relationship stuff you talked about.

                                                                                          I also know that being on the spectrum, and being awesome like we are, doesn’t always allow us to see these things so clearly in the moment. After all it’s literally a brain wiring thing.

                                                                                          For example. I see a person in this thread replying to everyone about how Linus doing what he is doing is BAD and this and that. I’m beginning to wonder if this person might not be on the spectrum, also, and might be unaware of what they’re putting out into the universe.

                                                                                          Thanks to everyone who’s having a reasonable and rational discussion about this.

                                                                                          BTW, I occasionally host panels at Sci Fi cons about Aspergers and Neuro-diversity with the title, “Sheldon, Asperger, and You,” and they have all been wildly successful. My hope is always to give someone else the gift of self awareness I got when my friend suggested Jon Elder Robison’s book to me.

                                                                                  1. 3
                                                                                    1. It can’t do anything technologically useful.
                                                                                    2. It should be fast at doing what it does, so that it is safe to call LOLWUT on production instances.
                                                                                    3. The output should be entertaining in some way.

                                                                                    This is irritating to all of us with open PRs for real improvements, bugfixes, and enhancements that are starved for attention.

                                                                                    Because of the master-slave fiasco and intense work involved with scrubbing everything, he now needs a diversion to like working on his own project again? That’s great, it’s over – now let’s get back to brass tacks and fix defects, finally finish replication enhancements now being worked on for 2 years, finally wrap up streams (Salvatore’s pet project nobody asked for), and improve performance to play catch-up with other datastores.

                                                                                    1. 30

                                                                                      Or, antirez can spend his time as he sees fit, just like any other FOSS maintainer.

                                                                                      1. 9

                                                                                        I’m sorry your PRs weren’t getting attention, but it was very important to change a word and the negative discourse associated with that (and this resulting cry for help) were much more critical to spend cycles on.

                                                                                        You can’t prioritize software quality over Twitter grumping, that’d be silly.

                                                                                        1. 6

                                                                                          I haven’t followed the details of the master-slave kerfuffle, but it seems to be simply a failure of community management. As a lazy maintainer, it seems like the proper route is just to say “I acknowledge that people feel so strongly about this sort of terminology and will happily accept PR’s to fix the problem; this seems like a good candidate for new contributors to get their feet wet with” and link to a connected issue tracker.

                                                                                          Then after a year or two of no nobody submitting fixes you close the issue as WONTFIX and get on with life.

                                                                                          Edit: That said, taking a break from the stuff you have to do and making something functioning, silly and completely irrelevant in the grand scheme of things can be deeply satisfying. Sometimes you need that sort of thing to remind us why we love doing what we do.

                                                                                          1. 3

                                                                                            Yeah, I still don’t understand how Twitter discussions can have this impact on people’s lives.

                                                                                            Together with just some wording used since the beginning of IT. So why can’t words acquire new meanings? Isn’t that the definition of a living language?

                                                                                            1. 3

                                                                                              Because the people are suffering from some kind of delusion.

                                                                                              I would like to see the budding young DBA-to-be who veered off IT/CS/STEM because he or she got triggered by the word “slave”.

                                                                                              Or even honest testimonies along the lines of “I was always interested in code, but I’d suffer immense panic attacks when I saw the word ‘blacklist’. I’m a Person of Color so this touches me deeply. The maintainer was kind enough to rename it (we settled on disallowlist) and now I commit a few times a year to the project. I have never felt this included and welcome in my life. Best of all? No one even complained about the broken APIs after the rename!”

                                                                                              1. 1

                                                                                                What I find weird is the “matter of fact” tone plus many contributors (not necessarily the maintainer) caving in right away, as if they also felt dirty while typing “git push - u origin master” or felt all the weight of worldwide injustices when the main DB switched to the “slave” one. I was relieved reading sane supporters though.

                                                                                              2. 2

                                                                                                Yes words do this constantly. But only in a negative way. Negative connotations tend to hang around. That’s why using these words is problematic. Also impractical, since you’d have to add a disclaimer that you mean the word in the new sense not the broadly known old one. If someone knows an example of some words changing from negative to positive connotations I’d be happy to hear about this.

                                                                                                For the current example I honestly don’t understand the quarrels people have. Why is dropping language that’s strongly tied to a history of colonisation and oppression a bad thing? Especially when other words can describe the same architectural pattern as accurately as the original words?

                                                                                                And every programmer knows that choice of words is important, we shouldn’t use them too lightly.

                                                                                                To turn the question around: So why can’t concepts get new names if the old ones are problematic?

                                                                                                1. 7

                                                                                                  If someone knows an example of some words changing from negative to positive connotations I’d be happy to hear about this.

                                                                                                  • Fun - to cheat or hoax
                                                                                                  • Smart - a sharp stinging pain
                                                                                                  • Fond - a fool
                                                                                                  1. 4

                                                                                                    “Nice” is one of such words. It meant foolish and silly.

                                                                                                    The problem isn’t much about naming by itself: you want to use “disallowedList” and “allowedList”? Want to use “primary” and “replica”? Want to use “kaka” and “popo”, do as you wish. But going ahead and picking a project at seemingly random and force them to change words that have been picked as they are (or used to be) the standard name of those elements in a somewhat aggressive way then that’s where I’m drawing the line.

                                                                                                    Or creating chaos on the issues section or on social media, extending the use of such standard words to the morals of the maintainers, that’s totally disgusting and absolutely useless.

                                                                                                    What I find even more shocking isn’t the vocal part that enjoys stirring up drama for whatever reason (there is clearly a reason why these groups are doing this and it cannot be to make the tech world a friendlier place, that’s for sure) but it is people who just shrugs them off or who, just like you, now supports their point because they are somewhat technically correct.

                                                                                                    Let’s start harassing all Spanish speaker developers who use the word “negro” for their black elements, how about the word “sheet” that reads as poo in Swedish, how about the word “pitch” that is extremely similar to a bad word in some Slavic languages, and “git”?

                                                                                                    That is and would be dumb to do. Also, why is the “American” morality be pushed down the throats of the rest of the world? Just because they still cannot cope with their past, is that a good reason to force everyone to change their behaviour?

                                                                                                    1. 3

                                                                                                      I share the idea that this debate is totally dumb. There were intellectuals in the 90s that brought this up with Intel and IDE controllers. PATA went away and that debate didn’t matter, but now we see the same bullshit arising again.

                                                                                                      The most vocal people in this fight are extremely childish and troll/harass developers. That’s not right. If you take a reasonable stance, you’re a racist.

                                                                                                      I’m tired of outrage culture.

                                                                                                      I highly recommend Brendan O’Neil’s speech on offence: https://www.youtube.com/watch?v=BtWrljX9HRA

                                                                                                      and I also recommend the original post about this debate with ver well reasoned arguments:

                                                                                                      http://antirez.com/news/122

                                                                                                      1. 2

                                                                                                        “In fact, pretty much every leap forward in history… pretty much every freedom we enjoy is a product of individuals having given offense. Having offended against the orthodoxies of their age. Offensiveness is not something we have to begrudgingly accept. Offensiveness is the motor of human progress.”

                                                                                                        I’ll add the people against offending folks are defending beliefs created by offending folks ranging from speech to progress. Just like he said. They wouldn’t exist if their rules were enforced by the orthodoxy of the day when people were trying to get those reforms started. So, they glorify the reformers who offended piles of people creating their current belief systems but say nobody is allowed to offend their orthodoxies suggesting alternative systems. Double standards are a common sign of bullshit.

                                                                                                        Edit: Oh, wait, he just said that, too, later in the speech. I’m still watching it.

                                                                                                      2. 2

                                                                                                        how about the word “sheet” that reads as poo in Swedish

                                                                                                        I don’t want to get into the broader discussion again, but I speak fluent Swedish; sheet /ʃiːt/ does not look or sound like skit /ˈɧiːt/.

                                                                                                        1. 1

                                                                                                          Can’t argue with you, I just looked up English words which sounded/looked like bad words in other languages. Maybe they had something specific in mind, don’t know :)

                                                                                                        2. 2

                                                                                                          IMNSHO the use of the word “slave” isn’t as simple as being “American”. The African slaves were often sold off by their own chieftains, and different types of slavery have existed and (may be argued to) exist around the world.

                                                                                                          The point about stirring up shit is more relevant. These are homonyms; a word that sounds the same or is spelled the same as another can have different meanings, as rhe examples above.

                                                                                                          The slave in an IT or mechanical context simply isn’t the same type of slave that picked cotton in the southern states.

                                                                                                          I’m sure there are plenty of Slavic lobsters here, but I haven’t read a single comment, here or elsewhere, of one of them being triggered by the etymology of that word.

                                                                                                          1. 2

                                                                                                            Exactly and that’s because on a global platform, filled with people from all around the world, with absolutely different cultures and languages, people (including myself) are not going to ruin someone else’s day just because they used a word which was/sound/looks/is derogatory in my own language on something totally unrelated.

                                                                                                            If there was something totally unacceptable, one could look into why such a word was chosen or if it was intended at all, inform them privately of the thing (if, say, they are interested in being known in those countries) and move on. Not starting a debate about something pretty much every single culture in the world has had.

                                                                                                            This seems to come from the wave of social justice which is plaguing certain countries, where one is offended for someone else and wants to be their saviour, while making everyone more miserable in the process, probably to achieve a “victory” for humanity or just themselves.

                                                                                                            1. 1

                                                                                                              It’s not specifically American at all. Human trafficking rings (a polite euphemism for ‘selling people into slavery’) are still being fought by law enforcement around the world today.

                                                                                                              I’m sure there are plenty of Slavic lobsters here, but I haven’t read a single comment, here or elsewhere, of one of them being triggered by the etymology of that word.

                                                                                                              Reasonable people aren’t triggered by thousand-year-old etymology.

                                                                                                              https://en.wikipedia.org/wiki/Human_trafficking#Revenue indicates $150 billion/year in revenue derived from forced labor, globally. Consider that your users might actually include someone who has been enslaved and would rather not be reminded of it at work.

                                                                                                              1. 2

                                                                                                                Yet your example is hypothetical. There might actually be someone. People shouldn’t be triggered by homonyms at all.

                                                                                                                Maybe the next hill to die on is killing or terminating child processes. Many women need to have late abortions and be reminded at work of infanticide.

                                                                                                                This will never stop unless maintainers put their foot down and say that messing around with APIs because a vocal minority bullies them is not ok.

                                                                                                                The case would be stronger if the proponents of this had personal experience to share, or other evidence to back it up. Even then, we’re talking about software, not people. Better would be to donate to Amnesty or do something else than change every word and rewrite all the dictionaries.

                                                                                                                1. 1

                                                                                                                  People shouldn’t be triggered by homonyms at all.

                                                                                                                  If only we got a choice about what trauma the world inflicted on us.

                                                                                                                  Maybe the next hill to die on is killing or terminating child processes

                                                                                                                  Maybe. But since nobody has, to my knowledge, brought it up - you are raising a ridiculous straw-man (straw-person, ha).

                                                                                                                  This will never stop unless maintainers put their foot down and say that messing around with APIs because a vocal minority bullies them is not ok.

                                                                                                                  Of the things that might stop it, that seems like one of the least likely to work.

                                                                                                                  As noted elsewhere in the thread, “Feel free to submit a complete PR, including all documentation updates” is more than enough to get them to leave you alone. In the unlikely event that someone cares enough to actually do the work, I’d suggest you’ve just gained a hardworking co-contributor.

                                                                                                            2. 1

                                                                                                              Please do not conflate my questions or position with abusive behaviour towards others. My post was not about that. I haven’t asked you to do anything, nor have I endorsed abusive behaviour by others. If my questions or position causes so much grief and anger maybe it’s worth exploring why that is the case?

                                                                                                              Please relax, there’s no need for this aggravating tone here.

                                                                                                              1. 1

                                                                                                                Mmm what?

                                                                                                  1. 9

                                                                                                    Familiarising myself with rustc, so that I can contribute to it.

                                                                                                    1. 21

                                                                                                      “Moreover I don’t believe in the right to be offended, because it’s a subjective thing. Different groups may feel offended by different things. To save the right of not being offended it becomes basically impossible to say or do anything in the long run. Is this the evolution of our society? A few days ago on Hacker News I discovered I can no longer say “fake news” for instance.”

                                                                                                      Everyone should have a right to be offended, because that’s a continuous empathy machanism.

                                                                                                      In society, as we interact with each other, there may be situations where someone may feel offended, and that’s okay. We could even offend someone accidentally, and that’s okay too. The adult life is complex. Life is complex. We get feedback, learn, and iterate. It’s been like that since ever.

                                                                                                      What isn’t okay is to think that other people shouldn’t be offended with something, because “It isn’t a big deal”. They may be offended, and that’s something you’ll have to deal with. We should be ready, and conscious, that our acts, even when we think are harmless, could be affecting other people’s emotions, they have the right to do so.

                                                                                                      That’s, basically, empathy. And without empathy, we won’t go anywhere.

                                                                                                      Overall, I would agree with the author, but I deeply disagree in that statement. It’s not “everyone is offended” or “no one should be offended”, it’s way more complex than that.

                                                                                                      ¿Is it okay to have “Master-Slave” in Redis, as it may offend (or just feel unwelcome) to some people? Just measure the possibilities, and based on this, on feedback, and on empathy, decide what’s the best decission to make here. But don’t take away the right to be offended to the people.

                                                                                                      1. 2

                                                                                                        I fully agree that we should be sensitive to others perspectives and situations and try to always have an open mind.

                                                                                                        But I strongly disagree that there exists any right to not be offended.

                                                                                                        The problem with such a premise is that anyone can choose to be offended by literally anything. Or they can say they are offended by something when really they just want a soapbox to stand on. Or you might offend someone and not even know it. The bottom line is that if you try to go out of your way to offend no one, you will quickly find that you have nothing left that you can safely say.

                                                                                                        1. 8

                                                                                                          Note that they are talking about the right to be offended, not a right to not be offended. That is quite different.

                                                                                                          1. 2

                                                                                                            It’s the same thing once they take action. They’re offended. They want the thing changed so theyre not offended. Equivalent in practice.

                                                                                                          2. 3

                                                                                                            Having a right to be offended doesn’t mean to be, automatically, offended for everything.

                                                                                                            There’s a sweet spot, a sane spot, which is: Be offended whenever you feel like that, and just use that card when you feel that offense.

                                                                                                            But, already having the right, you still need some social skills to interact with each other. Someone that gets offended for too many things will interact with a society that will reply with feedback. That ends up shaping you.

                                                                                                            The point is: No 100% offense. No 0% offense. There’s a sweet spot. And the sweet spot requires the right to be offended.

                                                                                                          3. 2

                                                                                                            You are taking what antirez said literally, but I don’t think that is charitable. Most people agree that emotions/feelings usually precede notions of right and wrong. I doubt antirez wants to deny people their feelings.

                                                                                                            What I think he means by having “a right to be offended” is “being entitled to having your way based on the fact that you feel offended”. Using master-slave terminology offends some people and their basic argument is that that alone is sufficient reason that it should be changed.

                                                                                                            Antirez sees that as a bad argument and feels that people do not have a right to have their way based on the fact that they feel offended. And honestly, they probably wouldn’t want that right either, because those making these arguments are usually people with opinions that deeply offend their more conservative countrymen. Who would then also be entitled to getting their way, based on their feelings of being offended.

                                                                                                            If we’re using empathy as a measuring stick, we should apply it equally and also require empathy of those that feel offended. When you feel offended, understand that someone does not intend to offend you. Understand that they may simply not understand why something is offensive to you. Recognize that feelings are regularly used coercively and your feelings thus have very little weight. Recognize patience and persistence are needed to achieve change.

                                                                                                            1. 5

                                                                                                              What I think he means by having “a right to be offended” is “being entitled to having your way based on the fact that you feel offended”

                                                                                                              If that’s what he meant, I agree (And would sugest to write that, instead). You have the right to be offended, and your feelings should be taken in count, but being offended doesn’t empower you with the absolute truth.

                                                                                                              If we’re using empathy as a measuring stick, we should apply it equally and also require empathy of those that feel offended.

                                                                                                              Totally agree. Empathy is a two-way road.

                                                                                                              1. 1

                                                                                                                (And would sugest to write that, instead).

                                                                                                                Some of the modes of failing to communicate I regularly see in issue reports written by colleagues:

                                                                                                                • not realizing that what they wrote doesn’t mean what they intend it to mean (especially non-native English speakers)
                                                                                                                • not realizing they are leaving out knowledge or intermediate reasoning steps that make the report confusing and easy to misunderstand
                                                                                                                • misunderstanding the issue and writing things that don’t make much sense given a correct understanding of the issue (but are completely sensible assuming their understanding of the issue)
                                                                                                                • misunderstanding or failing to make explicit their own arguments/reasoning (related to the second, but concerning non-factual or very indirect matters, such as reasons for having a hunch about a cause)
                                                                                                                • probably various other failure modes that I haven’t clearly distinguished yet.

                                                                                                                Whenever I find someone seems to be saying something weird or ridiculous, I start by assuming there is a communication problem. After fleshing out the issues I may still disagree, but at least the thing I’m disagreeing with is an actual opinion held by the other. So in this case, I’m much inclined to not take what antirez wrote very literally.

                                                                                                                (And I would even go as far as to say that even if antirez would chime in to say he did mean it literally, then I would have some serious questions before I would actually believe that to be the case. Thinking you believe something while not actually believing something is a very real thing)

                                                                                                                1. 2

                                                                                                                  It totally happens, but trying to guess what the author was trying to say while failing on communication seems like too much guessing for me, not optimal.

                                                                                                                  I prefer to understand exactly what the author says, and, if there’re misunderstandings, a quick discussion will clear everything. (And maybe the next time, the author is able to communicate better).