1. 3

    I completely disagree with the conclusion regarding VSCode extensibility.

    Everything about it can be changed, using scripting languages that have a bigger community and are more familiar to most.

    Just look at the virtually unlimited amount of VSCode extensions! They’re so good that people has made vim plugins to use VSCode extensions!

    1. 10

      Everything about it can be changed,

      This is not true. Emacs plugin model is open – there are no plugins per-se, user code runs in the same environment as Emacs’ own code, and has access to all of the functionality. In contrast, VS Code plugin model is closed: there’s a finite API exposed specifically for the plugins, and this is a different, more restricted, API than the one used by editor’s core. Plugins are isolated even physically – they run in a separate process from the editor. So, for example, it is not possible to implement custom GUI to replace VS Code command pallet.

      That being said, “everything can be changed” is different from “everything I need can be changed”. For me personally, after having discovered edamagit, the only thing that Emacs has and VS Code lacks is wdired and golden-ratio mode.

      1. 2

        This is wrong. You can change anything in VSCode.

        Some extensions that I would consider as proving my point:

        EDIT: Reading your comment more carefully, I now get what you mean, and yes, technically you can’t change everything, but still: this is in no way limiting the creative power of extensions or their capabilities and I would still consider VSCode as incredibly extensible.

        1. 7

          First, sorry for starting with a “this is not true” – if this needed a re-read, I was too direct :) In this comment, I would like to disagree with one specific point, while agreeing with the overall conclusion.

          Specifically, I can’t agree with this one:

          this is in no way limiting the creative power of extensions or their capabilities

          Here are a couple of things I can not do, although I’d very much like to.

          One, there’s no way to show a convenient input box with code completion. I need this to implement “run cargo command” feature in rust-analyzer, which would complete cargo flags based on project info. This is Run Anything from IntelliJ. I can use InputBox, but that doesn’t have completion. I can do anything in a webview, but that won’t be a pop-up.

          It’s interesting that, before Run Anything API existed in IntelliJ, I implemented this feature in IntelliJ for Cargo manually. Like Emacs, IntelliJ is open-API, so that was possible.

          Two, there’s no way to add checkboxes/tabs to workspace symbol search input. I want a convenient way to look only for classes, or only for functions, or only in library code, like I can do in IntelliJ. I would build a custom pop UI for this if I could, but I can’t.

          So no, VS Code is not as extensible as open-API platforms, and this is limiting in practice.

          How does this square with the number of awesome extensions on the marketplace? I think Code doesn’t optimize for extensions power, it optimizes for a vibrant extension ecosystem. This is velocity and maintainability from @mpereira values, and not extensibility.

          VS Code has extensions marketplace, which provide automatic updates, versioning & rollbacks, discoverability and a nudge for writing your own extension. The traditional model in Emacs is that you just dump stuff into your personal .emacs.d and maybe paste some snippets from it to Emacs wiki. These two approaches create different incentives, and the resulting ecosystems are systematically different. I wonder why VS Code doesn’t have init.ts for local scripting? Is it just “only power users need this” low priority item, or is this omission a deliberate design decision to encourage publication of plugins?

          What’s more, limiting extension power by providing a closed API (as opposed to an open API) also serves to systematically improve the ecosystem. This is a feature, it is not a limitation. vscode.d.ts contains the entirety of extension’s API surface, and to me this single file reads like a gem of a great application and systems architecture.

          By not exposing the internal API directly and introducing an explicit interface layer, VS Code achieves the following things.

          First, extensions can’t block UI thread or slow down startup. They are in a separate process! This is a crucial property for extensions ecosystem, as there would be poorly written or buggy extensions which would compromise the overall experience. The parent blog post started with a story of 30 seconds freeze of Emacs. This is impossible by design in VS Code.

          Second, it is easy to provide backwards compatibility. You can freely evolve internal editor impl, concentrating all the backwards compatibility cruft in a single place, the translatation of internal mess to the extensions API.

          Third, it becomes trivially easy for extension authors to learn the API, as the entirety of an API is a single file.

          All three are crucial for a rich ecosystem, and all three require a closed API. I think this architecture is the reason why VS Code was able to replicate and mostly surpass the 40 years of Emacs in such a short term. I bet there are many more VS Code TypeScript code than Emacs elisp code by now.

          1. 2

            Thanks for your lengthy reply, and I apologize if I too sounded too direct in mine (I was hoping the edit made it better, but I didn’t want to “remove proof” of my original reply), sometimes on the internet it’s too easy to sound harsher then intended.

            With that aside, you make a very good point, and yeah, this inevitably this means VSCode is not unlimitably extensible, however: do we need such a thing?

            I’ve seen the VSCode team as very responsive, and given that you have such specific limitations, I wonder if you ever thought about opening an issue (or a PR directly) proposing the required API extensions to make those use-cases work, I’m sure many more extensions would benefit from it.

            1. 2

              Yeah, I do raise issues against vscode and (moreso) lsp protocol. Here’s completion and filtering. Implementation wise, I am afraid all my editor support capacity is sucked by rust-analyzer :)

              1. 1

                Thanks for all your great work on rust-analyzer by the way! :)

            2. 2

              Thanks for your analysis of the collateral effects of the VSCode closed API, you raise interesting points that weren’t very concrete in my head.

              I’m not sure about there being more TS than Emacs Lisp by now, but maybe I’m just uninformed! :)

              1. 1

                Yeah, I don’t know about the amounts, that is my guess. Sadly, this info is hard to collect.

                By the number of extensions, melpa contains 4800 extensions (https://melpa.org/#/), vscode has 10000 in the other category alone (https://marketplace.visualstudio.com/search?target=VSCode&category=Other&sortBy=Installs) (EDIT: 23k total: https://marketplace.visualstudio.com/search?target=VSCode&category=All%20categories&sortBy=Installs). Of course, many of code extensions are left pads. I am also not sure what’s the total volume of corporate elisp code, a-la JaneStreet’s iron workflow.

          2. 1

            Only thing really?

            I suppose: Org-mode + ability to run in a terminal window (+ to run in batch mode?) + the fact that all is text (which we like, or not) + tight integration with a shell (eshell) + on-the-fly configuration and plugins development.

            also important (to me at least): independent from a vendor.

            1. 1

              Well. I did list two things :) I … just don’t understand why people use org mode or any other todo list. For me, maintaining a list means that I am procrastinating. If I am in the flow, I just know what to work on next (i do use paper notebook sometimes). I don’t need integration with the terminal (I do need someone to write a non horrible terminal though ) or the shell.

              All-is-text and general interactions are fine in vscode: there’s magit clone, it works ok! I do miss golden ratio and wdired.

              On the fly configuration is a mixed bag: on the one hand, sure, I wish I can just drop a function in my init.ts from time to time, on the other hand, 80% of configurablity is handled by JSON config with auto completion and immediate reload. For those 80%, vscode is significantly better for me than emacs.

              Now that I think about it, another thing I miss is daemon mode. Immediate startup is a big deal for me personally.

          3. 1

            Hey Alberto. I’m curious to which “conclusion” regarding VSCode extensibility you disagree with?

            The post says that extensibility is not one of VSCode’s core values (which is just my opinion anyway), but that is different than saying that VSCode isn’t extensible. It clearly is…

            1. 2

              I disagree with the fact that extensibility is not a core value of VSCode

              • Microsoft themselves are contributing to the most popular community extensions
              • The extensions API is extremely powerful, and in case what you want to do can’t be done, Microsoft has shown to be very responsive in accepting extensions to the API or contributions that extend the API
              • VSCode is also built with the same technology and language as their extensions: TypeScript, HTML and CSS, which means that you can create a completely customised component for it

              Sure, maybe there isn’t a native API that allows you to inject custom CSS to (for example) move the command prompt from the top of the screen to the centre, but somebody made an extension that allows you to inject custom CSS, meaning that when you can’t extend VSCode with it’s native API, you can always hack it (at the expense of maybe causing issues with future updates, but maybe that’s a tradeoff you want to do).

              Maybe the concept of “extensibility” is not as pure as the Emacs one, but this is software, not a religion: I never once came across something I wanted to do that either wasn’t possible or, more likely, somebody didn’t already built an extension for it.

              1. 5

                All free software is extensible. People have taken Acme and modified it, but that doesn’t mean it is a core value. The difference between Emacs and other models, to me, is not one of religion but of who extends it. If I want to add a new feature, to fix an annoyance, I can probably do it myself. I just have to write a few lines of elisp in my *scratch* buffer, evaluate it and there it is. It is my impression that this is the intended way to work with Emacs. My impression of VSCode is that the intended way is to install an extension, or write one by yourself, which raises the barrier. Sure you can do it, it’s a web browser after all.

          1. 11

            and maintaining proper scaling across my laptop’s screen and my external monitor. The latter one is more of a general issue on pretty much all OSes

            Could you elaborate? I find that external monitors scaling works flawlessly with macOS, if anything, it’s the one thing Apple got right.

            1. 2

              And they got it right a long time ago. There was some attempt to replicate that fundamental success in the Linux world[1] but that work stopped around 2003 and we were stuck with X11 for another 15+ years. And now Wayland is… kinda not doing it right either, I think? But better than X11 still.

              [1] http://berlin.sourceforge.net/

            1. 3

              Really nice article and well written, but I think the title is a bit misleading given that most of the discussed techniques depend on PostgreSQL features.

              I feel that a better title would be:

              Some PostgreSQL Tricks of an Application DBA

              1. 14

                It’s missing a crucial point:

                • Be ready to give up good HiDPI screen support

                I have a 4K monitor because it’s much more enjoyable to use for development, but it becomes a pure nightmare on Linux. I ended up installing an Hackintosh.

                1. 8

                  Not necessarily. You can look at this as purely anecdotal, but my Dell Precision 5510, which I’ve had for about four years, has a HiDPI display on par with what I have on the MBP I use for work. Maybe this is down to the fact that I run Ubuntu on it, but I’m just using stock Intel and Nvidia drivers on it, depending on my use case.

                  1. 3

                    Just curious, what makes it a nightmare?

                    1. 11

                      My most recent encounter with this is fractional scaling:

                      I have a 27’’ 4k monitor. I find that at this resolution, 1.5x scaling works best as 2x is too big and 1x is too small. With MacOS or even Windows, this is not a problem at all, with Linux it’s a can of worms:

                      • Xorg doesn’t natively support fractional scaling, Instead you have to rely on hacks or only scaling the fonts (which quite frankly, looks like shit). I never managed to make any of those hacks work reliably and consistently in all apps, eventually you’ll open that one app that uses Qt and you require yet another hack.

                      • Wayland does support fractional scaling, too bad that not all apps support Wayland, most notably Firefox. I tried running Firefox with the experimental Wayland backend with fractional scaling on, and everything looked blurry, it’s just not there yet.

                      Now, I’m sure for all of those issues there are 10 different workarounds to try and things to tweak to make things better, but I can’t be bothered to do any of that when in macOS (or even Windows) it Just Works™.

                      1. 8

                        Just the fact that the ArchWiki page on HiDPI has a comprehensive list of required hacks is another example of what I’m referring to.

                        1. 3

                          Have you tried with KDE? I’m curious because I’m planning on using HiDPI with 1.25x scaling.

                          1. 2

                            Yes, with KDE it’s slightly better but still not as good or smooth as Windows and macOS in my opinion.

                          2. 2

                            Latest versions of Gnome in Ubuntu 20 have fractional scaling and it’s been set and forget for me.

                            1. 2

                              Ubuntu ’s fractional scaling is using significant more CPU power compare to 2x scaling.

                        2. 3

                          I tried switching to Ubuntu recently (not for the first time) and ended up going the Hackintosh route, too. For me the breaking straw was not being able to adjust mouse wheel scroll settings in a way that would work everywhere and didn’t seem to come with caveats or be labelled as a hack.

                          Setting up a Hackintosh certainly wasn’t without its hassles, but having got there I’m very happy with it. I also have a Macbook and an iPhone, so that is another motivation to stay in the Apple camp (vendor lock-in, I guess?)

                          1. 1

                            I’m surprised you had mouse wheel woes. Do you have a special or fancy mouse or something? Or want very specific wheel behaviour?

                            1. 1

                              I just have a normal mouse, and TBH I’m a little fuzzy on what happened now. It could very well have been that if I has been using Gnome (or KDE, whichever one I wasn’t using) then it wouldn’t have been a problem at all, but what I really wanted was MacOS anyway, so I just did the Hackintosh thing instead. I kind of took “well I can’t get this basic thing to work right” as an omen.

                          2. 3

                            I use Xubuntu 20.04 on my X1 carbon and desktop with a 27” 4K monitor. Both work totally fine with HiDPI. The main issue I’ve had was when I plugged my laptop into non-HiDPI monitors, I had to lower the DPI for the monitors and that made everything on the laptop small.

                            1. 1

                              The distros the article mentions are ElementaryOS, Pop!_OS, and Fedora Workstation. I believe all of those have had great native HiDPI support “out of the box” for a few years now.

                              I totally get not loving the aesthetic of GNOME or whatever, especially bumped up at x2, but I think it’s cool that Linux lets us customize everything end to end to our heart’s desire. If we’re going for a more custom setup, totally agree that it can require doing some custom tweaks to get a good HiDPI experience and it won’t be completely automagic.

                              I don’t think it’s fair to say it’s all a pure nightmare on Linux as a whole. Beginners can have a good experience, experts can have a good experience, crossing that valley can be painful.

                              Also worth noting that most of the ArchWiki page on HiDPI refers to outdated workarounds that are no longer required, though not all.

                              1. 0

                                Honestly, yeah. I purposely bought a normal DPI display just to avoid this pain. It’s never gonna be perfect. Apps aren’t gonna scale right, even with fractional scaling. Other apps might scale right, but be blurry. It’s gonna drive you crazy.

                                Just get over the loss aversion, buy a good normal DPI monitor, and get back to work. I’m 100% satisfied with normal DPI.

                              1. 2

                                Given that China, the country with the highest level of population control, is having difficulties controlling the outbreak, I doubt a little app will do much. That is, other that damaging privacy.

                                1. 1

                                  That is, other that damaging privacy.

                                  Experts (at least some) seem to be positive about such means, if they reach +60% of use (which is probably not going to happen, unless Facebook app does it instead…).

                                  Although, isn’t the main duty of a State to exchange liberties from individuals, against something else (security, equality, etc…)? These apps seems to leak a very small set of personal data (which you probably already leak with your bare phone with Facebook). I feel that the main thing to be careful with, is the next ones as this app sets a precedent.

                                  1. 2

                                    Experts (at least some)

                                    That’s the key, really. During this COVID pandemic we’ve seen all sort of experts express their opinion just to be proven wrong by time, so we can pick and choose which experts to listen to.

                                    I used as an example China as it recently had to bring a partial lock-down again in Beijing after an uncontrolled spread of COVID started. If China can’t control it, I highly doubt we can do anything remotely useful in the western world.

                                    I feel that the main thing to be careful with, is the next ones as this app sets a precedent.

                                    That’s precisely what I was alluding to. I fell this dangerously normalizes the idea of being officially monitored by the government despite having committed no crime. How long before refusing to install such applications becomes a crime itself?

                                    1. 2

                                      That is a bit limiting view, I think. The app won’t stop the virus spreading, that’s clear. Nor will the masks. Or 1.5 meters distance. But the effects of many of these things are at least partially cumulative. And as for monitoring, I’m already monitored anyway. By a lot of companies that aren’t even German. Without my consent or knowledge. At least the German government will try to help majority of people with the info gathered. And e.g. Facebook won’t help anybody but themselves.

                                      There are downsides of government monitoring me. There are also upsides. I would want the downsides limited and monitored. And in Germany, unlike in, say, USA, this is at least partially true.

                                      But I digress, I think monitoring can be useful and isn’t a total waste of effort, and at lest nominally has a decent goal. It can’t stop the virus. But it is useful.

                                      1. 1

                                        Is a lock down not a means of controlling something? What do you mean by “can’t control it”?

                                        1. 1

                                          In my view, the purpose of those apps is to avoid having to lock down a city, as you can target individuals instead.

                                          So the fact that they had to lock down the city means the app failed at that.

                                  1. 11

                                    £9/m for an SEO plug-in is a real eyebrow raiser

                                    1. 4

                                      I can’t help if but feel that everything SEO nowadays is a whole bunch of smoke.

                                      Search engines are incredibly smart in detecting and ignoring specific SEO techniques. Genuine, relevant organic content is still the best SEO you can do.

                                      1. 3

                                        I don’t do any SEO, and there’s no requirement to do it for a personal blog. Still, if the added name recognition gets him an additional .1% in salary or lets him shorten a job search by one day, it will pay for itself.

                                        1. 3

                                          Yeah, it’s not cheap that for sure. But it’s the plugin I get the most use from. Not only for SEO, but writing assessments too.

                                        1. 2

                                          Worth mentioning the WebAuthn protocol (evolution of FIDO) as it supports things like fingerprint readers on the users devices.

                                          For most end users, that would be better and easier than Client side certificates.

                                          Granted, this does not solve the same use-case as Oauth, but given that there is a lot of discussion on authentication methods here, I wanted to mention WebAuthn.

                                          1. 10

                                            Almost all Spanish government web apps work with client-side certificates, which are generated by the government itself for every citizen that request them. You use them for taxes, health insurance, driver licenses, etc. I use them just fine BUT most non-technical people think this workflow is complicated, so they eventually added more traditional login systems that rely on User/Password.

                                            1. 11

                                              [Spanish citizen here]

                                              I think all of the technical issues people has with this approach would be solved easily if browser vendors cared enough to make a decent UI to set the certificates up. The process right now is quite cumbersome.

                                              Also a lot of people looses their certificates and they are annoyed when they need to go in person to obtain a new one, despite this being the absolute safest way to emit certificates.

                                            1. 7

                                              do you reckon you will still be able to buy a non-smart fridge in the near future?

                                              i was quite dismayed last time i tried to find a new non-smart TV.

                                              1. 9

                                                No, I don’t we will be able to. The margins on consumer electronics are so thin that the temptation to add “after market” sales in the form of DRM-protected consumables and ad-tracking is almost overwhelming.

                                                The products without these “features” will be priced at a premium.

                                                As Izabella Kaminski at the Financial Times speculated, in the future privacy will be reserved for the rich…

                                                1. 7

                                                  What made me giggle was this:

                                                  freedom sucking, major appliance disabling, communist, 1984-esque idea

                                                  More like peak capitalism.

                                                  1. 6

                                                    Part of the problem is that people expects things to be as cheap as possible.

                                                    I hear a lot of people complaining that their new washing machine doesn’t last as much as “the old ones” used to.

                                                    But when you tell those same people to buy a washing machine from a reputable brand like Siemens or Miele, they’ll tell you that 400-600 EUR for a washing machine is way too much when they can buy one for 200.

                                                    1. 6

                                                      In a way it’s almost like a rent-to-buy scheme; you pay less up front, but take it in the shorts in the long term. Some of the more obnoxious versions of this wind up with an actual cost hundreds of times the up-front purchase price.

                                                      This seems like a self-correcting issue, though, provided all concerned are transparent about the real cost.

                                                      And that’s the rub: people who buy the “cheap” DRM appliances aren’t being informed of the real costs.

                                                      Perhaps that’s the solution? Make retailers and manufacturers disclose, in advance, whether they employ such practices.

                                                      1. 3

                                                        And that’s the rub: people who buy the “cheap” DRM appliances aren’t being informed of the real costs.

                                                        Perhaps that’s the solution? Make retailers and manufacturers disclose, in advance, whether they employ such practices.

                                                        But that doesn’t solve the other problem of planned obsolescence. To me the solution should just be mandatory minimum lengths of warranties on appliances. Appliances should last 20 years by law.

                                                        1. 4

                                                          I sure as hell wouldn’t want to keep any appliance I own for 20 years. Or pay for one that lasted that long.

                                                          Why not just make manufacturers and retailers disclose MTBF? (That said, you can make a pretty well-educated guess by looking at warranty periods).

                                                          1. 6

                                                            You don’t need to keep them for 20 years. You can sell them to someone else that will use them that doesn’t have the ability to be a frivolous consumer.

                                                            1. 4

                                                              But ultimately, I’m still paying for a gold-plated fridge, because you consider buying appliances at a rate of more than one per twenty years to be frivolous.

                                                              Why not leave the choice in the hands of the person spending their money, and merely require manufacturers and retailers to provide the information necessary to make that choice an informed one?

                                                              1. 5

                                                                Because you choosing to replace your fridge every couple of years (and no, I refuse to accept it’s ‘gold plated’ for something to last the reasonable amount of time they’ve been generally expected to last for decades upon decades upon decades) costs everyone environmentally.

                                                                Why not leave the choice in the hands of the person spending their money, and merely require manufacturers and retailers to provide the information necessary to make that choice an informed one?

                                                                Why would they give us the option if they have a choice, when they can just only offer ones that will break in 5 years like they do today?

                                                                1. 3

                                                                  My current fridge is running very well, and is significantly older than five years. It did cost more than a cheap model, too. These things are as I’d expect.

                                                                  Regarding the environmental cost, there are much better ways to achieve this than dictating how many years a given appliance should last for (and thus giving the shaft to poor people along the way). For instance, requiring the recycling / landfill / whatever costs of the appliance to be paid up-front and factored into the sale price.

                                                                  1. 3

                                                                    Requiring appliances to last 20 years does not shaft the poor. Quite the opposite in fact, because the cheapest appliances wouldn’t only last a couple of years. The current system means the poor buy crap and have to replace it constantly while the rich get to but stuff that lasts and spend much less in the long run.

                                                                    1. 1

                                                                      So how would you determine exactly how long is a reasonable MTBF?

                                                                      (In other words, how would you avoid falling into this hole: https://en.wikipedia.org/wiki/Economic_calculation_problem)

                                                                      1. 1
                                                                        1. 1

                                                                          Sure, but they base their expectations on typical lifetimes. And courts have (correctly) upheld implicit contracts, especially in the case of goods that are advertised as premium. In Australia, doing that will limit your ability to contract out of warranties.

                                                                          But what’s being proposed here is a massive market intervention, to increase the expected lifespans of certain goods (which ones? again, the same problem) by an order of magnitude.

                                                                          1. 3

                                                                            I don’t think that a 20 year lifespan on appliances is actually an order of magnitude increase. When I was a child we had the same washing machine, dishwasher, clothes dryer, microwave etc. that my parents got as wedding presents or bought in their first couple of years together until my late teens or early 20s. That wasn’t unusual either, none of my friends were getting new dishwashers or washing machines every few years.

                                                                            1. 1

                                                                              But what’s being proposed here is a massive market intervention, to increase the expected lifespans of certain goods (which ones? again, the same problem) by an order of magnitude.

                                                                              yes… and what’s the problem with that? you don’t think it’s possible to come up with a common sense amount of time that certain types of appliances should last?

                                                                              1. 1

                                                                                No, I think that’s quite reasonable. In fact the courts do that on a regular basis, when deciding on warranty issues.

                                                                                What I think is unreasonable is for the State to enforce same. Price / quality should be a private matter between manufacturer, buyer, and seller.

                                                                                Right now, that ratio is often obfuscated, which I think is wrong.

                                                                                1. 1

                                                                                  why is it unreasonable?

                                                                                  1. 1

                                                                                    Quick summary: I think the Austrian school is pretty much right about economics, and think that laissez-faire capitalism is the best model for trade. We may be operating from very different premises.

                                                                                    Edited: “Austrians emphasize private property, entrepreneurship, free markets, and sound money as the key drivers of economic performance.” is a good summary, from https://mises.org/austrian-economics.

                                                                                    Thus I think it’s entirely reasonable to pass laws requiring manufacturers to inform consumers of likely lifetimes, DRM costs, etc. But the ultimate choice should remain with manufactuers and their customers.

                                                                      2. 2

                                                                        Regarding the environmental cost, there are much better ways to achieve this than dictating how many years a given appliance should last for (and thus giving the shaft to poor people along the way). For instance, requiring the recycling / landfill / whatever costs of the appliance to be paid up-front and factored into the sale price.

                                                                        I like the idea of forcing companies to pay the disposal costs of the products they sell. However, I don’t see how it would shaft poor people any less than the longevity idea. Supposing a fridge costs £100 to dispose of properly. Instead of offering (for example) fridges at £100, £400 and £800, which are built to last 2, 5 and 10 years respectively, you’re now offering fridges at £200, £500 and £900. If you are poor, you are still going to get the cheapest fridge, you just end up paying twice as much for 10 years of owning a fridge. The result is that while in theory we’ve now paid to dispose of the broken fridges safely, there’s no incentive to design or buy less wasteful fridges in the first place, and the cost has been shouldered by the poor, not the companies producing crap fridges.

                                                                        1. 1

                                                                          Regarding the environmental cost, there are much better ways to achieve this than dictating how many years a given appliance should last for (and thus giving the shaft to poor people along the way). For instance, requiring the recycling / landfill / whatever costs of the appliance to be paid up-front and factored into the sale price.

                                                                          the danger there is that it is more complex, thus increasing the cost of enforcement and the likelihood that companies can find a way to game the system.

                                                                      3. 2

                                                                        Because this civilization won’t be around for much longer if you keep doing this, Karen. :-)

                                                                        1. 1

                                                                          But ultimately, I’m still paying for a gold-plated fridge, because you consider buying appliances at a rate of more than one per twenty years to be frivolous.

                                                                          Why not leave the choice in the hands of the person spending their money, and merely require manufacturers and retailers to provide the information necessary to make that choice an informed one?

                                                                          it’s not /u/mrr’s decision vs. the consumer’s decision, it’s society’s somewhat-democratic decision vs. the decision of the appliance manufacturers.

                                                                  2. 1

                                                                    I’m not sure that strategy would work with the people that don’t already care (which unfortunately, I think it’s the vast majority):

                                                                    See what’s happening with the GDPR banners. Most people will just press “accept” to get the annoying thing out of the way. The kind of people that are concerned in accepting those banners are the same people that were already aware of the malpractices of adware on the web.

                                                                    I think that if appliance manufactures were forced to disclose those practices, most people will still buy that appliance because it’s cheaper than an equivalent one that doesn’t employ those practices.

                                                                    1. 7

                                                                      GDPR is no only a banner (btw. you are talking about cookie consent I think) It gives you rights that did not exist before. I utilised my new powers successfully to force companies to close my accounts, delete my data etc. This could not have been possible before GDPR. You can also check out how many companies got fined for GDPR violations. I think privacy mandating laws work and we need more. We have to force the surveillance capitalist companies to do reasonable things. I could not give two shits if they were using anonym data collection instead of identity based ones. The machine learning models do not care about who you actually are, so there is no point. Yet, this is exactly what Facebook/Google does.

                                                                      1. 3

                                                                        So … shouldn’t that be their choice?

                                                                        1. 4

                                                                          See what’s happening with the GDPR banners. Most people will just press “accept” to get the annoying thing out of the way

                                                                          Pro tip: The banner goes away even faster if you close the tab.

                                                                      2. 2

                                                                        Another problem, i think, is the fact that many people have to make short-term decisions regarding to their money due to stagnating wages and general financial inequality. Sure, buying a washing machine for 400-600 EUR might be more sensible in the long run, but buying an appliance for 200 EUR also means to be able to put food on the table. Something that might be harder if you are buying the expensive stuff.

                                                                      3. 3

                                                                        You are assuming static market situation. A single privacy aware government can change that. Just like the great firewall in China you can have a great privacy firewall of the EU and disable connectivity to privacy invading surveillance capitalist companies. This would force the market back to reasonable directions. I hope that this is coming.

                                                                        1. 1

                                                                          I hope so too. I also believe like you that legislation is needed to make the externalities of privacy visible to the private sector. In the meantime, posts like this can raise awareness. I hope trusted tech review sites also get in on the action and explicitely raise risks associated with these practices.

                                                                          1. 1

                                                                            Just like the great firewall in China you can have a great privacy firewall of the EU and disable connectivity to privacy invading surveillance capitalist companies.

                                                                            I often daydream about this but how could this be implemented in reality? Block Google and you block 90% of the EU’s email accounts. Block that one privacy-violating that is hosted on AWS/Cloudflare and you block 90% of the websites people are used to using. It doesn’t really seem to be feasible in real life.

                                                                            1. 1

                                                                              I often daydream about this

                                                                              Yes me too! :)

                                                                              I was thinking, gradually. First you introduce funding companies in the EU that offer alternatives, set up 1 click migrations. Business models are a big question. Many kind of services are impossible to implement an alternative to, because Google is funding the operation by the ad money. This is the hardest challenge. It is not a problem for the companies but for the individuals who are using @$googledomain emails.

                                                                              After that, 1% packet drop on Google/Facebook IP ranges which increases gradually to 100% over a year. No pain no gain! :)

                                                                              I think China proved that you can roll with your own services if you ban the US adtech companies. The EU should do the same.

                                                                              1. 1

                                                                                I think China proved that you can roll with your own services if you ban the US adtech companies.

                                                                                I believe this is only true if your population doesn’t depend on these services. The EU and US could easily ban WeChat tomorrow without a problem, because WeChat doesn’t have that many users in the EU/US. China couldn’t ban WeChat even if it was an american product as WeChat is so ingrained in every facet of the chinese population’s digital life.

                                                                                1. 1

                                                                                  Right. Isn’t there even more incentive to have an EU equivalent of service in that case?

                                                                        2. 3

                                                                          Most of the profit in TVs is the advertising tie-in, but it’ll be a long time before you can’t plug in a 3rd party set-top-box.

                                                                          1. 5

                                                                            yeah but i’m bugged by the delay in basic input functions as a result of running everything through a slow computer

                                                                            1. 1

                                                                              Smart TV interfaces are horrible, yes. We tried a Virgin Media box (even slower!), a ChromeCast (almost possible to live with) and an XBox One. Those have been left to gather dust / disposed of in favour of an Apple TV box, which is nippy and works well.

                                                                              1. 1

                                                                                so what do you do about the TV itself? it has a slow interface but don’t have to deal with it because you leave it set to the Apple TV?

                                                                                1. 1

                                                                                  Yep. The TV takes about 30 seconds to switch on, but after that it’s just set to the Apple TV and it’s great. It even goes onto standby itself … and I press the Apple TV remote Home button to make it come back - which is pretty much instant. It means I can ignore the TV’s own useless stuff.

                                                                          2. 1

                                                                            We need a new to create a new brand of dump devices. The gist of the TVs are the screens which you can purchase from the vendors producing it directly. Once you have that we need a factory that can assemble + package a customer ready version. An average customer buys TVs every 5 years or so. You can calculate the price based on that. There is no need for any smart feature you can use your favourite platform and have a HDMI or similar port only. This is exactly how I use my dumb TV.

                                                                            https://www.philips.hu/c-p/55PUH4900_88/4900-series-4k-uhd-slim-led-tv-pixel-plus-ultra-hd-vel

                                                                            1. 2

                                                                              are you tellin me that Philips 55PUH4900/88 is non-smart?

                                                                              1. 1

                                                                                As dumb as I could get. There is certainly something running on it that lets you select the HDMI inputs but it has no built in smart features like Cromecast. It is also very low latency which makes me believe it does not have much running.

                                                                                1. 2

                                                                                  oh cool that’s good to know. any animations or semi-transparency in the volume and channel indicators?

                                                                                  1. 1

                                                                                    No animations and I do not think there is semi-transparency for the volume indicator.

                                                                                    1. 1

                                                                                      wow almost too good to be true. maybe i will stock up if i can find one for a good price.

                                                                                      1. 1

                                                                                        Let me know if you need more I can check out the fw details

                                                                          1. 24
                                                                            1. All modern conveniences work in major IDEs: syntax highlighting, code completion, jump-to-symbol and debugger.
                                                                            2. I can run the entire thing I’m working on locally, or in a non-production environment without affecting others.
                                                                            3. I can attach performance tools and debuggers manually (e.g. run with gdb attached) with configurations at least optionally loaded from file or command line.
                                                                            4. Tools (editors, etc.) take a reasonable amount of time to load–no more than 15, definitely no more than 30 seconds.
                                                                            1. 9

                                                                              I would add a CI setup that gives you feedback reasonably fast to that list. Other than that 100% agree.

                                                                              1. 4

                                                                                I’d add a qualification to that: a CI setup should only run integration tests. If unit testing (or worse: compilation) is dependent on a central environment, it lengthens the feedback loop, instead of shortening it.

                                                                                1. 1

                                                                                  Preach it.

                                                                                  Ideally unit tests should just be precommit hooks–letting us make progress by skipping them if need be. If the unit tests fail but the integration/acceptance tests pass, that’s okay in the short run.

                                                                                  1. 2

                                                                                    I’m interested in the sorts of unit tests you’d be okay with skipping. To me unit tests are for more mathematical properties of functions and units of code where if they failed I’d be really concerned about correctness. Perhaps you’re unit testing too much? Or maybe I’ve misunderstood.

                                                                                    1. 2

                                                                                      So, say a big customer comes in and specifically asks for 1000 units for an order. The pricing code is complicated, and because reasons (tight deadline, excited salespeople, whatever) the order is given to circumvent the code for orders of 1000 and just always return a certain value. This change breaks unit tests, but the thing’s on fire right now so it’s worth it to punt it along until the crisis is past.

                                                                                      Another example would be some midway refactor point where the code works and needs to go live to fix some other bug but the unit tests haven’t been fixed yet to reflect the new dependencies that need to be injected or the new APIs or whatever.

                                                                                      Tests are important, but they’re usually not deliverables to the business and it is important to be wise when deciding how much to let them guide us.

                                                                                      I’ve worked on a codebase where somebody diligently made hundreds of unit tests that a) failed to catch major, basic regressions in the money funnel (checkout) and b) only meant we had things to fight against during refactors.

                                                                                      In my own work, especially numerical stuff I’ve done, I still do 100% test coverage before shipping 1.0, and view it as negligent to ship libraries intended for external use with anything less than that. But, for a business application, needs must when the devil drives.

                                                                                      1. 2

                                                                                        Ah that’s interesting, yeah I wasn’t thinking about it in terms of unit testing for business requirements at all. I was thinking entirely in terms of numerical/relational properties.

                                                                                        1. 1

                                                                                          breaks unit tests, but the thing’s on fire right now

                                                                                          So remove/disable the unit test, instead of skipping it? It reflects historical requirements, not current ones.

                                                                                          1. 1

                                                                                            The test isn’t wrong, it’s just in the way. Committing while skipping precommit hooks is less of a sin than removing the test and forgetting to put it back later.

                                                                                            Having lots of disabled flappy tests, or even worse removing tests which coworkers assume are present, is an anti-pattern to me.

                                                                                      2. 1

                                                                                        What? No. This is wild.

                                                                                        1. 1

                                                                                          Sorry, I don’t follow. Say again?

                                                                                          1. 2

                                                                                            If the unit tests fail but the integration/acceptance tests pass, that’s okay in the short run.

                                                                                            This is bonkers. If your system is built in such a way where this is possible, or even (as your later example kind of suggests) even sometimes necessary, your system is built incorrectly.

                                                                                            Or,

                                                                                            The test isn’t wrong, it’s just in the way.

                                                                                            This is a category error: there is no such thing as a failing unit test which isn’t wrong but merely in the way. Unit tests and the code they cover are inextricably interwoven. And there is no such thing as a change so urgent that there isn’t enough time to update failing unit tests. If your code base and processes have you believing either of these things are sometimes or even frequently true, you’ve dug yourself into a really bad hole.

                                                                                            In my own work, especially numerical stuff I’ve done, I still do 100% test coverage before shipping 1.0, and view it as negligent to ship libraries intended for external use with anything less than that.

                                                                                            This is also bonkers.

                                                                                        2. 1

                                                                                          unit tests should just be precommit hooks–letting us make progress by skipping them if need be

                                                                                          I’d go the other direction: unit tests are an integral part of every class (insert unit of choice here) and run on every build without any additional overhead. Failing test means failing build.

                                                                                          Yes, this means tests must be fast.

                                                                                          I just wrote about this a few weeks ago: MPWTest: Reducing Test Friction by Going Beyond the xUnit Model

                                                                                          I’d also add:

                                                                                          Contrary to what you may have read in the Agile literature, the key to agility is the ability to change code quickly and safely. And the key to that is the ability to re-test code quickly and effectively. Fast-running automated tests (“unit tests”) are the key to agility.

                                                                                          Jason Gorman

                                                                                    2. 3

                                                                                      Fully agree with your list.

                                                                                      I’ll just add automatic code formatting to the list of modern IDE conveniences.

                                                                                      After having used Prettier, gofmt and similar there is no going back.

                                                                                      1. 1

                                                                                        That’s interesting to me because autoformatting code is really nothing new, it’s been around for decades. indent is 44 years old and GNU indent is 31 years old.

                                                                                        Is it autoformatting you like or is it more about having a fixed set of rules that applies to all code written in a language?

                                                                                        1. 1

                                                                                          What I love about autoformatting, specifically when integrated in the editor and adopted by the majority of the community of that language, is that it removes the need to have discussions around where to put brackets, spaces, etc.

                                                                                          All you do is type code the way you like, hit save and have the tool ensure your code respects a consistent style. I don’t have to waste time reading a style guide or think about where I need to put spaces inside the brackets or not.

                                                                                          Even better, my code looks just like the code written by somebody else, which makes it easier to read.

                                                                                    1. 7

                                                                                      To avoid using k8s, they had to develop their own deployment UI and their own AWS orchestration tool.

                                                                                      While I agree with the overall article, it seems like they are suffering from the “Not invented here” syndrome. It might be that their tool is easier to maintain than a k8s cluster, but I’m sure they still had to invest a significant amount of manpower to develop their system.

                                                                                      1. 13

                                                                                        Remember they have above-average security needs, and you will have a much better understanding of your own in-house system’s security aspects than any standard solution.

                                                                                      1. 2

                                                                                        There is also the extension I don’t care about cookies, very useful when you already have other cookie blocking strategies in place anyways.

                                                                                        1. 7

                                                                                          I don’t know what to think about this.

                                                                                          I understand where this study is coming from and why this is a possible solution:

                                                                                          On the one hand, the EU has drafted excellent laws to try and safeguard internet privacy. On the other hand, they don’t have any easy way to enforce those rules, and this firewall would help with that.

                                                                                          But what happens when the EU democratic systems falls under the control of extremist governaments? Once the infrastructure is in place, it’s a very small step to close down comunications and limit information and freedom of expression.

                                                                                          1. 3

                                                                                            But what happens when the EU democratic systems falls under the control of extremist governaments? Once the infrastructure is in place, it’s a very small step to close down comunications and limit information and freedom of expression.

                                                                                            I don’t find this a valid argument. In such situation, if this infrastructure would not exists, it could be built anyway.

                                                                                            1. 3

                                                                                              If it has to be built, that allows more time for opposition. So I don’t find “it could be built” a valid argument.

                                                                                              1. 3

                                                                                                Looking at an autocratic regime like Hungary where there is no opposition, the “it could be built” argument does have merit.

                                                                                                You vastly overestimate the fairness in the EU.

                                                                                                The opposition argument works only as long as the political system is not gerrymandered past a certain point. After that, it’s significantly more likely “it can be built” as who can stop them?

                                                                                                1. 0

                                                                                                  Hungary is far from autocracy. There is opposition, only of very low quality, with messages not resonating with the voters, or even if some do, the complete package offered is still not a good deal for most voters. There is free press. Most outlets are pro-government, but largest outlets by volume are opposition, with (current) opposition’s media having greater volume overall ever since the fall of communism. Unaligned outlets have negligible share, but the media is by its nature always a politically aligned entity). There is no censorship in action. (Only against hatespeach, but there are even stricter laws in that regard in Germany for example) The government instead funds its media outlets at loss, but voices are not silenced.

                                                                                                  In Hungary ISPs have the infrastructure to take down any page if ordered so by a court order, since like mid 2000s (government was the current opposition in that age), for example for piracy, hate crimes, etc. It is used very sparingly. The same goes for many western European countries. The bricks of the “great european firewall” are all ready. Only central coordination is needed actually.

                                                                                          1. 7

                                                                                            This means that we finally got an official GitHub VSCode theme!

                                                                                            Am I the only one obsessed with the GitHub theme and color schemes in general?

                                                                                            1. 2

                                                                                              The GitHub theme is superb. I used a variant of it with MacVim for a long time.

                                                                                            1. 2

                                                                                              I agree with the article, however another advantage of the SPA model nowadays, it that it makes it easier to hire a front-end developer.

                                                                                              I don’t think there are as many front-end developers comfortable with working on a server-rendered app, whereas there are swats of (especially junior) front-end developers proficient with React and JavaScript.

                                                                                              1. 5

                                                                                                Speaking at the python pizza remote conference.

                                                                                                I have a talk on pydantic, a python library that adds amongst other things runtime type checking/enforcement to python classes and functions using standard python type annotations.

                                                                                                1. 2

                                                                                                  Good luck for your talk!

                                                                                                1. 2

                                                                                                  Given that at I’ve been reduced to 50% time at work since the lockdown started (I work for a ride-sharing company, not many rides are happing right now as you can imagine), I’ve had a lot of free time to work on my projects.

                                                                                                  This weekend I hope to complete the first version of the CBOR encoder/decoder for Crystal I’ve been working on.

                                                                                                  I’m having troubles reading a half-precision float and converting it to a single-precision float given that Crystal doesn’t have a Float16 type. If somebody wants to help we with that, shoot me a message, I’m really bad ad bit math and I’ve given up supporting half-precision floats for now.

                                                                                                  Once finished, I can then continue on the WebAuthn library for Crystal l aslo started. I then plan to use this in a couple of other projects I want to do.

                                                                                                  1. 5

                                                                                                    I like the idea. You could use ISBN codes for the book IDs.

                                                                                                    1. 2

                                                                                                      ISBNs should certainly be involved somewhere. However, if you did use them as IDs, you’d probably need a way to link or aggregate related ISBNs, as e.g. a hardcover, a paperback and an ebook with the same content will have separate ISBNs, while something like a review is not usually tied to the format (Somebody looking for a review of a book will expect to see all the reviews in one place, not spread across separate entries).

                                                                                                    1. 4

                                                                                                      Super exited about the addition of Exhaustive Case!

                                                                                                      Working with Crystal is pure pleasure: type safety with a familiar syntax, and best of all, the compiles result is quite fast!

                                                                                                      1. 19

                                                                                                        At some point you decide to do something about all those warnings, so you use a product like Sentry to collect all the errors and warnings.

                                                                                                        Few week pass and you have so many different and impossible to debug errors in Sentry that you just give up keeping up with them.

                                                                                                        A year later your Sentry has collected million of errors and it serves the only porpose of making you sad.

                                                                                                        1. 19

                                                                                                          My previous employer developed a chat app; in the first few years it was … not very good, and one of (many) reasons for that was the sheer amount of messages they were sending to Sentry. I tried to convince the team to stop doing that since it impacted our rate limits for other apps as well, but it took a long time before they took action.

                                                                                                          At some point they announced they had sent 1 million chat messages. I checked the Sentry usage counts, and they had 4 million events in Sentry.

                                                                                                          1. 5

                                                                                                            Hah, we just setup LogRocket, I hope this is not our future

                                                                                                            1. 9

                                                                                                              The best errors are those caused by a user’s browser extension and that have nothing to do with your app at all

                                                                                                              1. 4

                                                                                                                Amusingly, I think one of the first errors we tried to debug with LogRocket (which is generally an impressive tool) might have been caused by the Grammarly extension… Hopefully that is not an omen :)