Threads for fjolnir

  1. 17

    Another person who can’t tell the difference between their own preferences and universal experiences.

    1. 14

      Please attempt to make an argument rather than a single-sentence hot-take, especially one that isn’t grounded in the article and is instead just lazy character assassination.

      The author introduces the rest of the writeup by saying:

      I want to make a developer-centric argument that the current state of majority remote working is bad, not because it is bad for your company or for your salary but because it is not best for yours and others mental well being.

      If you want to argue with any of the core claims, I’d expect something addressing the parts about:

      • Knowing our colleagues making our work more meaningful (and the implied assertion that this is not doable for remote colleagues)
      • Working remote causing less of a feeling of “belonging” in an org
      • Working remote has blurred the boundaries of what is work and what is leisure time
      • Working remote allows for too much distraction

      It is totally reasonable to refute or disagree with any of those claims from the article-but on the other hand, a lazy dismissal is corrosive to the discussion culture of this site.

      1. 6

        This isn’t lazy character assassination, my analysis of this article is that the author cannot distinguish between their preferences and universal experiences. It may be the case that your experiences match the author, and I hope both of you can enjoy the office without those of us who never wanted to be in the office.

        Are you sure your comment to me isn’t a reflection of personal dislike?

        1. 0

          my analysis of this article is that the author cannot distinguish between their preferences and universal experiences.

          Please show me this analysis. What statements in the article lead you to that belief? What reasoning are you using?

          I mean this quite honestly and without attempt at meanness: do you not see why I made my objection?

          1. 2

            Neither you nor anyone else is owed the chain of reasoning by which someone arrived at their opinion on an article. And as I pointed out in a different reply to you, this topic is one that gets extremely repetitive extremely quickly. So if you truly and genuinely are interested in learning more about the arguments, you will have little difficulty finding previous iterations of discussion on similar articles across a wide variety of sites, courtesy of your preferred search engine.

            For the moment, your behavior comes across as, at best, back-seat moderating. If you believed the comment violated site rules, you should have simply flagged it and moved on.

        2. 6

          At this point the “working remote is bad for you!” argument is just incredibly repetitive. It basically boils down to: yes, we understand that the author is the sort of person who relied on the traditional office environment to make them happy and effective, but not everybody thrived in that environment and not everybody suffers now as a result of it no longer being the automatic default.

          What more is there to say after that, really? The author seems to be yet another in a long line of authors of these articles, not saying anything particularly new or different and not really breaking out of the mold of extrapolating from I liked and thrived on these aspects of office culture to therefore everyone must have thrived on them and suffers now that they’re gone, when the latter is not at all true.

          At this stage it’s clear that forcing everyone back to the office full-time is a non-starter. I suggest that the author learn to accept this, make the most of available “hybrid” environments, and perhaps along the way develop some empathy for those of us who did not thrive in traditional office environments but were forced into them for years on end anyway, and who wouldn’t have been taken seriously if we wrote “why working in an office is bad for you!” articles.

        3. 6

          Yet I think there are some good points in there. Especially the risk of burnout/overworking is elevated when working remotely in my own experience.

          It is good to bring out the possible negatives of this arrangement, even if most of the people WFH are happy about the change.

          I think it will take up to 5-10 years for people to realize what they have lost with WFH.

          1. 4

            Where’s the evidence that people overwork when working remotely? It’s certainly not my experience, but again my personal experience is also not universal nor necessarily representative.

            1. 3

              Risk is elevated as you associate the same environment you live in to your work. It can become harder to ”get away from work mode”.

              1. 4

                I wonder how much of that is based on the novelty of remote work for a lot of people. I’ve been working remotely for most of a decade and over time, as remote work has become a totally routine, unremarkable part of my lifestyle, I’ve found it’s gotten much easier to switch out of work mode at the end of the day without having to physically move to a different part of the house. (Muting Slack notifications at the end of the day helps!)

                1. 1

                  This is why I made a point of having a room in my flat that’s the designated office that I never spend time in unless I’m working. Out of the home office, brain off for the day.

                  1. 5

                    The problem with WFH is that not everyone can afford to pay the high rent of an extra room (and another for your spouse) which is a cost saving for your employer but a big cost for you unless you are prepared to move to a rural or suburban area for the benefit of your employer.

                    1. 4

                      This is my situation in a nutshell. I hate working in open-plan offices – but I hate it less than having work take over my tiny little apartment.

                    2. 3

                      I could say “Another person who can’t tell the difference between their own preferences and universal experiences.” to you :)

                      1. 3

                        You could, and you’d be incorrect. The article makes claims about “tech workers” in general, and therefore your comment would make sense there. I’m talking about my experiences, and at no point in time did I generalise to anyone else. This is what works for me, which refutes “what tech workers are missing”. If going to the office works for someone else, good for them.

                        1. 3

                          If you did, what would your point be?

                          1. 2

                            As discussed in other branch, not everybody has access to a extra office room at their home, nor have peaceful enough environment for concentrated work.

                            For me the office is much more quiet place to focus on work and I have much better computer setup there. I don’t really even use computers at home that often.

              1. 4

                Seeing as this was written over 10 years ago, has the format gotten better since? I wouldn’t know, I don’t use Windows that much. It sounds like the format is not set in stone according to the author:

                The format changes from release to release of Windows.

                1. 5

                  Last time I tried to edit it to remove references to a program that was incompletely uninstalled I ended up completely breaking windows resulting in a non-bootable machine. So I’d say at least on a user facing level, it’s still garbage.

                  1. 2

                    This repo lists some changes between the formats in different versions https://github.com/msuhanov/regf/blob/master/Windows%20registry%20file%20format%20specification.md There’s been a few improvements.

                    Now I wonder how does reactos implement it since it doesn’t need to be compatible at file level. I may dive into it and update later.

                  1. 4

                    I reject the intro already. There is nothing scientific about preferences. I like my MX Black and Brown and I can’t say why - and that’s not important. I tried Red and I prefer Black. I tried Blue and I’d rather use most non-mechanical ones over Blues. It’s like the fabric of your couch or your brand of soft drink…

                    1. 22

                      Yes, but an important part of a review is to try and convey objectively what the product is like so that you can decide if it fits your subjective preferences without actually having tried it.

                      1. 4

                        The problem is, you might not be able to say why - neither can most people. But lots of them do like to say why, so unaware of the fact they bundle all of their experiences and biases into these potentially misleading reviews, which are generally meaningless outside of the experiences, preferences, biology etc., of some given person.

                        1. 2

                          And it is not about the sound, but maybe it is about the sound ;)
                          Try all, change when bored! https://github.com/deejayy/cliqsound

                          1. 1

                            Yeah, preference is subjective. They need to provide a group of reviewers, who each give their subjective take.

                            1. 1

                              There is nothing scientific about preferences.

                              Except when there is.

                              Some examples: your favourite brand of soft drink is likely to be your favourite in part because of intense research on the part of Coca Cola Amatil or one of their competitors. Likewise your couch fabric is from a carefully researched, selected, and marketed subset of profitable fabrics available to that manufacturer.

                              Some disclaimers: sometimes they aren’t. I prefer the smell of two stroke engines because that’s how fast exciting bikes smelled when I was a teenager and getting up to much naughtiness on them. And don’t assume that manufacturers research your preferences because they want to satisfy them; it’s as often done to understand them as a precursor to manipulating them.

                              But please don’t take this as anti-capitalist polemic :) I’d actually prefer (heh) laissez-faire capitalism to our current mixed market. But I’d prefer it warts and all, and if you don’t think scientific treatment of preferences is one of those warts (or sometimes beauty spots), you’re probably being played more easily than those who do.

                              Edited to add: and sometimes it works the other way around, when aggregate preferences reveal truth. I recall - but annoyingly can’t now find - a study that demonstrated cross cultural preferences for certain types of landscape beauty that implied their suitability for habitation by primitive humans. That is, our preferences for beautiful landscapes may be a consequence of our recent evolution.

                              1. 1

                                OK, please point me to any source why I would prefer Coke over Pepsi? Apparently both companies did an excessive amount of research how to win me over?

                                Tongue in cheek aside, maybe I was overly terse and other have said it better. But sometimes I’d just prefer my new car to be blue and not red, even if there was a measurable advantage - I just don’t like the color.

                                Same with MX Blues. You might be able to persuade me that I could type 20% faster. Unless I was entering in a speed-typing contest I’d still stick to the other ones for work and leisure.

                                I think the main problem is that people who want to scientifically quantify things sometimes just overlook people’s priorities. For decades I simply chose my CPU vendor for 2 criteria: speed vs price and “are there known problems with the platform/chipset” - nothing else mattered. Coming to mainboards it was already some sort of “does it have the correct features?” and just like that all scientific things went off the board.

                                Good point about the market only providing a certain subset of things to have preferences for. But I am not sure this is the correct discussion, it just limits certain criteria to the most mainstream methods. I.e. the “perfect” version of something is either too expensive or has some other drawback that it won’t even be on the normal market, so we consumers have to adjust our preferences to what is available. But I think that brings it out of scope. I honestly do not care about a scientifically better keyboard switch if I can’t buy it. And then I’d still need to like it ;)

                                1. 1

                                  OK, please point me to any source why I would prefer Coke over Pepsi?

                                  Sure:

                                  https://www.psychologytoday.com/au/blog/subliminal/201205/why-people-choose-coke-over-pepsi

                                  As expected, both the normal and the brain-damaged volunteers preferred Pepsi to Coke when they did not know what they were drinking. And, as expected, those with healthy brains switched their preference when they knew what they were drinking. But those who had damage to their VMPC – their brain’s “brand appreciation” module – did not change preferences. They liked Pepsi better whether or not they knew what they were drinking. Without the ability to unconsciously experience a warm and fuzzy feeling toward a brand name, there is no Pepsi paradox.

                                  I think the main problem is that people who want to scientifically quantify things sometimes just overlook people’s priorities.

                                  Yes, agreed. There are a couple of drivers for this; it’s easier to deal with people in the aggregate when looking at stats, and also, people buy into the idea of intrinsic value (which is itself a philosophical error). It’s never valid to ask “is X valuable” only “for whom is X valuable, and for what purpose?”

                            1. 1

                              Is the coolest thing about it that it’s written in rust?

                              1. 2

                                Definitely not, and to be honest it’s become a little bit annoying to see “written in rust” used as a selling point nowadays.But, If you look at the demos, and try it yourself you will see it’s quite impressive regarding of the language it was implemented in.

                              1. 2

                                With clang in objective-c mode you can write a macro to do this using the cleanup attribute and a block

                                1. 2

                                  You don’t need Objective-C mode, -fblocks is enough. Using blocks in this way is fine because the lifetime is coupled to the stack frame and it’s easy to reason about capture. Lambdas are difficult in C in the general case. They’re easy in a language with GC because capturing the block implicitly extends the lifetime of the captures. In Objective-C, reference counting normally works well here (though you can create cycles if you store a block in an object that is captured). It would have been a mess in C++, except that it was added at the same time as C++11 introduced unique_ptr and shared_ptr.

                                1. 5

                                  The technical underpinnings are so terrible that it is clear they exist only to hype the underlying cryptocurrencies.

                                  Is this the author’s first trip down the hype cycle? How is “reinvent everything with distributed consensus” any different from “reinvent everything over http” or “rewrite everything in Java” or any other hype cycle? People use tech they are excited about to do things the tech is only marginally good at and then claim it is a revolution. Welcome to SPAs

                                  1. 14

                                    Hype cycles don’t usually do as much damage as crypto is doing to our world.

                                    1. 10

                                      One specific difference between those other tulipmanias and AI summers is that this time, a subset of the hype are driven by those who are long in coin and will benefit from the hype being bought into.

                                      1. 4

                                        You also don’t have to reinvent literally every technology that existed in 1991 in HTTP for HTTP to be a useful and widespread protocol today; or rewrite every piece of software that existed in 1995 for Java to be useful. I’m not actually a particular fan of Java as a language and I’m willing to believe that it was overhyped at the time, but that doesn’t imply that it was bad for people to work on the JVM or that there are zero problems that it solved successfully.

                                        1. 3

                                          How is “reinvent everything with distributed consensus” any different from “reinvent everything over http” or “rewrite everything in Java” or any other hype cycle?

                                          Most of these hype cycles are targeting CTOs and sometimes ground-level programmers. A company might go bankrupt as a result of jumping on the latest hype bandwagon, some folks might develop useless skills, and some credulous VCs might lose a load of money, but by and large they’re fairly self contained in their damage. Cryptocurrency hype is targeting non-technical people by pretending that it is serious technology. That has much wider impact.

                                          Bitcoin is also consuming more electricity than a small country, to handle a transaction throughput rate that a single Raspberry Pi with PostgreSQL could manage with a 99% idle CPU, which causes a lot of environmental damage (both from the power consumption and the specialised semiconductor manufacturing).

                                          1. 2

                                            Bitcoin is also consuming more electricity than a small country, to handle a transaction throughput rate that a single Raspberry Pi with PostgreSQL could manage with a 99% idle CPU,

                                            I assume you know this, but for posterity: Bitcoind can also handle the same transaction volume if only a single raspi is running it. The transaction volume doesn’t meaningfully affect the power consumption.

                                            1. 3

                                              That is not my understanding of how Bitcoin works. As I understand it, each transaction in the system completes by being signed on the end of the block chain, which requires completing a proof of work. The difficulty of the proof of work becomes harder over time (or, rather, as the length of the blockchain increases, so as more transactions take place). The whole thing is probabilistic and so to achieve a transaction rate of N/s you must have sufficient hashes being computed that the probability of N being found per second in the entire network approaches 1.

                                              1. 3

                                                Difficulty goes up (and down!) as more computers doing hashes are added (or removed)

                                                1. 1

                                                  ..so only a select few should be allowed to mine?

                                        1. 2

                                          The awful “jittering” of everything in PS1 has nothing to do with “subpixel rendering” it’s because textures aren’t perspective corrected, and it’s awful. Does anybody actually think it’s a desirable target to recreate?

                                          1. 9

                                            Well… there’s “technically desirable” and “artistically desirable”.

                                            When the PS1 came out this was more or less state of the art in terms of real time 3D rendering for consumer devices and everyone with stakes in the game could agree that it was awful and that the next generation of real time 3D renderers should not suffer from this problem. It’s definitely not technically desirable, as in, if what you’re looking for is to render the most life-like images you can, it’s a really bad idea.

                                            However, if what you’re after is to capture that feeling of playing PS1 at a friend’s house after school, or to paint contemporary themes with 1994 brushes, or anything of the sort, then it absolutely is a desirable target to recreate. Nostalgia is the most obvious reason but it’s not just nostalgia – we enjoy, say, medieval art, and modern drawings in medieval style, (hopefully) without being nostalgic for the pre-antibiotic times of warring petty barons and serfdom.

                                            (Full disclosure: some of the retro stuff I write is commercial so there’s always the riskt that I’m deliberately bending facts so as not to be out of a job ;-) ).

                                            1. 2

                                              It gives some of us a nice nostalgic feeling

                                              (He addresses texture mapping a bit further down)

                                              1. 1

                                                the game Ultrakill replicates it and it looks alright. I’ve also seen many horror games replicate it because of the weird, praecox feeling you get when textures start moving and wobbling on you.

                                              1. 14

                                                The 5th level of achievement as a programmer is architecting your code in such a way that errors are impossible to compile. In other words, use a language with a sophisticated type system (and other forms of static checking).

                                                This article was written in 2005, meaning it was somewhat before the current era of actually using the good ideas from academic programming language research, and enough time has passed since then that it shows. Few people talk about Hungarian notation anymore, because ML-style types allow programmers to accomplish a much more general and robust version of the same thing without needing a special variable-naming convention - and languages with these type systems are pretty easy to use in production these days.

                                                1. 15

                                                  While having a more sophisticated type system is definitely useful, you can use older type systems to enforce this type safety as well. E.g.

                                                   typedef struct {char* s} unsafe_string_t;
                                                   typedef struct {char* s} safe_string_t;
                                                   unsafe_string_t read_input(socket_t s);
                                                   void write_output(safe_string_t s);
                                                   safe_string_t encode(unsafe_string_t s);
                                                  
                                                   ...
                                                   unsafe_string_t in = read_input(sock);
                                                   write_output(in); // whoops! won't compile
                                                   write_output(encode(in)); // will compile and is correct
                                                   ...
                                                  
                                                  1. 7

                                                    You don’t need ‘ML-style types’ for this. You need opaque typedefs, a simple enough feature that I think it could be proposed for and added to C itself without kicking up a fuss.

                                                    1. 4

                                                      I’m pretty sure opaque typedefs is literally what was meant by ML style types. I’m not sure how it would work in C since you still need to be able to add to indices even when they have a non basic integer type.

                                                      1. 4

                                                        There’s also tagged unions and generics.

                                                        1. 1

                                                          ML-style types would normally refer to algebraic data types with (at least) first order parametric polymorphism. That means you need tagged unions, first class functions and closures.

                                                          I’m not sure how it would work in C since you still need to be able to add to indices even when they have a non basic integer type.

                                                          I’d like to just be able to define a typedef where you have to explicitly cast to and from it in order to use it as its underlying type. It would be super extra double nice if you could somehow apply it to enums too.

                                                        2. 2

                                                          Opaque non pointer typedefs?

                                                          1. 2

                                                            As in being able to say opaque_typedef int foo; and then being unable to do

                                                            int x = 1;
                                                            foo f = x;
                                                            

                                                            You would need to explicitly cast to and from the typedef and the underlying type. Would be useful for enums too, although how exactly it would be worded is a little complicated as I think you’d want to allow the values of the enum to be used without casting them, even though they’re integers.

                                                            enum option {
                                                                OPTION_0,
                                                                OPTION_1,
                                                                OPTION_2,
                                                                OPTION_3,
                                                            };
                                                            opaque_typedef enum option option_t;
                                                            
                                                            option_t opt_1 = OPTION_1; /* ought to be legal */
                                                            option_t opt_2 = 2;        /* ought not to be legal */
                                                            /* however OPTION_1 is just an integer constant in C I'm pretty sure */
                                                            

                                                            Perhaps in this wild fantasy world I’m suggesting the C standard could allow explicit underlying type annotation for enums and then allow you to use opaque_typedef there:

                                                            opaque_typedef int option_t;
                                                            enum option : option_t {
                                                                OPTION_0,
                                                                OPTION_1,
                                                                OPTION_2,
                                                                OPTION_3,
                                                            };
                                                            
                                                            option_t opt_1 = OPTION_1; /* legal, OPTION_1 is of type option_t */
                                                            option_t opt_2 = 2;        /* not legal, 2 is not of type option_t */
                                                            

                                                            but then what about flags where you want to be able to bitwise-or them without casting and set the values of the options explicitly, would you need to do enum : flags_t { ... FLAG_3 = (flags_t)4, FLAG_4 = (flags_t)8, ...}, etc.?

                                                            Anyway I think the idea has merit and really just needs someone to write it up and submit it to the committee probably…

                                                        3. 4

                                                          As far as I know type systems can’t ensure that a program conforms to a specification and can’t check the soundness of that specification. In my experience, type systems are the way to go but in order to make all errors impossible to compile, formal methods are likely required.

                                                          1. 2

                                                            Or on the other side you can write Clojure where you name your variables with english words like list-of-names and capitalized-list-of-names that make them clear.

                                                          1. 4

                                                            We can all agree that it should. But they advertise that they don’t

                                                              1. 3

                                                                Works fine now.

                                                                1. 1

                                                                  Maybe it’s blocked by geolocation? Your profile says you’re from Russia :/

                                                                  1. 0

                                                                    And so? Why Microsoft should block Russians?

                                                                    1. 1

                                                                      Not saying they should, just that they may have decided to.

                                                                      1. 1

                                                                        Still a weird first assumption. Also the post prior to yours was from a russian saying it works now.

                                                                    1. 1

                                                                      That’s weird. Works for me, both that website and the linked PDF.

                                                                      1. 1

                                                                        Works here too.

                                                                      1. 2

                                                                        The “this will give you more elements than you asked for” thing seems like a pretty big footgun

                                                                        1. 2

                                                                          I updated the article to clarify that it only realizes the lazy structure in chunks, and it returns a sequence with the correct number of items :)

                                                                          1. 1

                                                                            Does it know if the closure used to map is pure or not?

                                                                            1. 2

                                                                              Nope, it has no idea. It will run the mapping function regardless. Clojure has no type system that blocks you from accidentally calling the network when you add two numbers :)

                                                                        1. 10

                                                                          Linus’s point that nobody checks errors for close is strong. For example, ignoring errors for close is an explicitly documented behavior of Rust standard library: https://doc.rust-lang.org/std/fs/struct.File.html

                                                                          Files are automatically closed when they go out of scope. Errors detected on closing are ignored.

                                                                          1. 2

                                                                            I never handle errors on close() because usually I’m in the destructor of an object (in C++ with RAII) and there is just no way to handle it properly since you aren’t supposed to throw exceptions in destructors and the destructor cannot return a value. Also, how should I handle a close() error? Should I retry opening the file and redo all the operations? My program might have had this handle open for hours if not days, it cannot cache all the things it has done to the file. It is extremely unclear what could cause close() to return an error and how to handle it. If nobody knows how to handle an error, it is likely that everyone will ignore it. It is also unclear what breakage a close error can cause. Unless the file is of critical importance, I usually just log it and hope that someone reads the logs.

                                                                            1. 2

                                                                              A decent pattern could be, in my opinion, using a temporary file as a bridge.

                                                                              Create a new file, fill it up with content. Try to close it: if everything worked, fsync worked, close worked, replace the old file with the new file by a rename.

                                                                              Upon failure you tell the user and don’t discard the old file. No data loss, just a lost update.

                                                                              Then I admit this approach does not scale well, if the file is huge. But again, every case is different.

                                                                              1. 1

                                                                                Also, how should I handle a close() error? Should I retry opening the file and redo all the operations?

                                                                                No, you report it to the user with the file path. At the bare minimum.

                                                                                Everything else depends on the error code returned and the semantics of your program.

                                                                                1. 1

                                                                                  What would the user do about it?

                                                                                  1. 1

                                                                                    In the more general case of why should I tell my user about anything they cannot do anything about:

                                                                                    • so they can be aware of it.
                                                                                    • so they can take steps to verify the results
                                                                                    • so they can file a bug

                                                                                    This doesn’t mean you have to pop an alert on the screen of the end user but somehow (log file, event log etc) letting someone know (user, admin) is often a good idea.

                                                                                  2. 1

                                                                                    No, you report it to the user with the file path.

                                                                                    The vast majority of software cannot directly interact with the user, and even if it could, it would be useless. Imagine you own an Epson printer and somehow the printer told you /var/epson/printer_conf.ini: error EIO on close().

                                                                                    To the user, that is completely useless. Maybe you understand it because you are familiar with Linux systems, but imagine the average user seeing this message, they would be completely puzzled.

                                                                                    Everything else depends on the error code returned and the semantics of your program.

                                                                                    Okay, so the POSIX standard says close() can return EIO, EBADF and EINTR. How would you handle these errors in your software, other than logging it or reporting it to the user? Do you know any resources or existing code bases where developers can learn how to treat close() errors?

                                                                              1. 7

                                                                                Down under the level of assembly language is the level of hardware design diagrams. And under those are transistors. And down under that is the level of magnetic currents and fluctuations. And if you go down much further we don’t have language for the levels and the problems any more — my understanding bottoms out even before “quantum physics” — but even lower levels still exist.

                                                                                I like the article but this bugged me. It’s largely irrelevant what’s below that which can be achieved with assembly language, because that isn’t programming. You can’t change the hardware design with code (FPGAs aside…) so it’s not relevant to the discussion.

                                                                                1. 8

                                                                                  It really depends on the context. If you’re a programmer for an embedded system, selecting an appropriate MCU for the task is arguably a fundamental responsibility of the job depending on how your company is organized.

                                                                                  If you’re locked into the x86 world, you can report issues to AMD and Intel and it’s frequently possible for a fix to be delivered in a microcode patch.

                                                                                  Edit: Also, to the fundamental argument of “hardware isn’t programming so it’s not important,” you should understand, at a minimum, one layer below the lowest layer that you work on. Otherwise, how will you know if your layer or the layer below it is misbehaving when you’re debugging a problem?

                                                                                  1. 4

                                                                                    I concur that understanding layer N-1 is a good idea. That, and having a deep understanding of what can go the application code. It’s very helpful to understand what sorts of “magic” can happen, and how to de-mystify them.

                                                                                  2. 4

                                                                                    I like the article but this bugged me. It’s largely irrelevant what’s below that which can be achieved with assembly language, because that isn’t programming. You can’t change the hardware design with code (FPGAs aside…) so it’s not relevant to the discussion.

                                                                                    That can still be relevant: how CPU caches behave is super relevant for performance, but you can’t change how they behave. And even beyond that, Rowhammer showed us that even very low-level details like how closely chips are packed can be influenced all the way up from high level languages, even JavaScript. Even something as super-low-level like cosmic rays striking your RAM causing bits to flip might even be something that could crop up from time to time (and you could error-detect/correct it in software), especially if you’re writing code to run on spacecraft.

                                                                                    1. 2

                                                                                      Sure, but they’re not really relevant to the points that are “You should learn C”, “You should learn asm”, “You should write an OS” etc. There’s no “You should build an x86 machine from scratch”, because it’s not about programming, that’s electronic engineering. I thought about cache optimisation as part of that which can be achieved with assembly, which is relevant; hardware design diagrams are, for 99.99% of cases, not.

                                                                                      1. 4

                                                                                        Our main technical university teaches all those things. In my country you can’t become a (formally educated) web dev without learning about electronic engineering (it’s in the name even).

                                                                                        1. 1

                                                                                          It sounds like your country is doing it wrong.

                                                                                          1. 1

                                                                                            Sounds right to me

                                                                                            1. 1

                                                                                              Well the school isn’t for web developers, it’s for engineers and computer scientists. However it just so happens that a lot of them become web developers because that’s relatively lucrative and a popular avenue at the moment.

                                                                                              The school does some things wrong but overall it’s a great, intensive program.

                                                                                            2. 1

                                                                                              What university is that?

                                                                                              1. 2

                                                                                                https://www.fer.unizg.hr/en

                                                                                                I should mention I was wrong, there are some more vocational schools here where you indeed don’t learn about most of that stuff, they just teach you to code in something practical.

                                                                                        2. 3

                                                                                          Realistically, you can’t change the kernel or the web browser either.

                                                                                          In a sense, it is useful to define software as something you can change, reclassifying the kernel and the web browser as part of hardware. Depending on your situation, Django or Rails also can be the hardware. While it is sometimes useful to know about the hardware, I agree it is mostly irrelevant for people working on software.

                                                                                          1. 7

                                                                                            You can realistically change the kernel and/or the browser, or more realistically write patches and improvements for the existing code. That’s not a realistic option with your processor.

                                                                                            1. 0

                                                                                              No, you can’t. Maybe you are submitting your application to App Store, maybe your web app needs to run on iOS Safari. I guess you could apply to Apple, but then, you could also apply to Intel.

                                                                                              1. 7

                                                                                                Have you never compiled your own kernel or run Greasemonkey?

                                                                                                You very much can change both the browser and kernel. A locked-down platform means the platform is wrong, not the person attempting to modify it.

                                                                                                1. 1

                                                                                                  If you feel like it, read iOS instead of the kernel and Safari instead of the web browser. My point still stands.

                                                                                                  iOS and Safari are as unmodifiable as Intel CPU for me. That one is hardware and the other is software matters little.

                                                                                                  1. 3

                                                                                                    Using a CPU you can’t modify is unavoidable for anyone using a computer. Avoiding using iOS or Safari is very easy in comparison.

                                                                                                    1. 10

                                                                                                      You two are talking past each other: one of you is speaking corporate engineer at work and the other is speaking FOSS zealot. Both perspectives are valid, but neither is complete.

                                                                                                2. 3

                                                                                                  All kinds of apps and updates get into the App Store. It’s a multi-billion dollar business generated by 3rd parties. Whereas, Intel’s silicon is totally made by them with no 3rd-party patches. Your comparison might work for microcode. They seem to make those changes on their own. Sparingly, too.

                                                                                                  One can definitely get a valuable update into a web browser or onto Apple phone before making a change to pre-deployment or post-deployment silicon. Software shouldn’t be thought of like hardware unless it’s software nobody can change or understand. Closest comparisons are mission-critical, legacy systems in enterprises and governments.

                                                                                            2. 2

                                                                                              But there are machines, like the PERQ where you can change the machine code.

                                                                                            1. 1

                                                                                              Looks very similar to LabVIEW, which I am not a fan of. Modern method chaining is much easier to both write and read.

                                                                                              The interactive development does sound nice, though. Similar levels of interactivity are available in Jupiter notebook or React hot reloading, though. And as demonstrated by Casey Muratory in Handmade Hero, you can even get the immediate feedback of sub-second compile times and hot reloading in C/C++, if you architect your code correctly.

                                                                                              1. 1

                                                                                                What’s “modern” method chaining?

                                                                                                1. 1

                                                                                                  I just meant to distinguish method chaining from old-school one statement per line. Method chaining provides a more visual conveyance of the data flow, IMHO.

                                                                                                  1. 1

                                                                                                    I just asked because cascading has been around since long before I was born.

                                                                                                    I do agree that multiple messages per statement are great.

                                                                                                    1. 1

                                                                                                      True. Just not as much in mainstream languages until the last decade or two. And more recent languages reaching mainstream, e.g. Rust, are fully expression oriented.

                                                                                              1. 1

                                                                                                Can’t you just call malloc/free from Go?

                                                                                                1. 12

                                                                                                  Glossing over why sudo would mysteriously not work, this writes a bunch of noise out to the monitor:

                                                                                                  > sudo cat /dev/urandom > /dev/fb0
                                                                                                  -bash: /dev/fb0: Permission denied
                                                                                                  

                                                                                                  That command does not work because the redirection is performed by the shell which does not have the permission to write to /dev/fb0. The redirection of the output is not performed by sudo.

                                                                                                  How to do it here

                                                                                                  1. 7

                                                                                                    You can use tee as well:

                                                                                                    cat /dev/urandom | sudo tee /dev/fb0
                                                                                                    

                                                                                                    It’s quite funny that person who don’t know how shell and sudo (nb: use doas or su instead) tells us a lengthy story about writing to framebuffers in Linux

                                                                                                    1. 11

                                                                                                      The frame buffer is arguably a lot simpler than a *nix shell

                                                                                                      1. 7

                                                                                                        nb: use […] su instead

                                                                                                        You better don’t, it’s vulnerable to the ages-old TIOCSTI trick::

                                                                                                        #include <sys/ioctl.h>
                                                                                                        int main() {
                                                                                                            char* c = "exit\nid\n";
                                                                                                            for (; *c; ++c)
                                                                                                                ioctl(0,TIOCSTI,*c);
                                                                                                            return 0;
                                                                                                        }
                                                                                                        

                                                                                                        (in .bashrc or so)

                                                                                                        This can be deterred by using su -P, but it’s marked as experimental (according to the manpage), and I haven’t seen anyone using it.

                                                                                                        1. 3

                                                                                                          TIOCSTI

                                                                                                          more info here, as I haven’t heard of it previously https://ruderich.org/simon/notes/su-sudo-from-root-tty-hijacking

                                                                                                      2. 1

                                                                                                        This probably works for the author if they’re in the video group:

                                                                                                        $ ll /dev/fb0
                                                                                                        crw-rw---- 1 root video 29, 0  5 apr 15:37 /dev/fb0
                                                                                                        

                                                                                                        EDIT: I’m stupid, didn’t see that part of the article.

                                                                                                      1. 17

                                                                                                        Meh, what’s a factor 10 when you’re still under a request per second? Does this actually matter?

                                                                                                        I’m curious whether any attempt was made to contact the Bing team before the change & post.

                                                                                                        1. 3

                                                                                                          Seems very unnecessarily frequent. If you had multiple search engines checking in this frequently it’d add up quickly

                                                                                                        1. 1

                                                                                                          On laptops, I use knuckles for modifier keys. On other keyboards, I just use my palm for the control key. Save caps lock for the escape key.

                                                                                                          1. 1

                                                                                                            I like having a tap on caps mapped to esc, and a press mapped to ctrl.

                                                                                                            Actual ctrl key I map to ctrl+opt+cmd and press with the palm for custom combos.

                                                                                                            1. 1

                                                                                                              That sounds interesting, how did you acomplished that?

                                                                                                          1. 1

                                                                                                            The main problem with front end development was never the browser, but rather the endless layers/kilobytes of abstraction meant to make everything automatic.

                                                                                                            1. 1

                                                                                                              As soon as something other than a print statement is imported, you can be pretty sure that monads won’t be explained simply.

                                                                                                              1. 2

                                                                                                                A monad is a type m for which the following functions may be implemented:

                                                                                                                (>>=) :: forall a b. m a -> (a -> m b) -> m b
                                                                                                                return :: a -> m a
                                                                                                                

                                                                                                                Subject to the following rules:

                                                                                                                -- Rule 1
                                                                                                                return a >>= k  =  k a
                                                                                                                -- Rule 2
                                                                                                                m >>= return  =  m
                                                                                                                -- Rule 3
                                                                                                                m >>= (\x -> k x >>= h)  =  (m >>= k) >>= h
                                                                                                                

                                                                                                                That’s it. That is what a monad is (there are equivalent definitions that some people prefer over this one, but all of them give the same result). Monads get some special treatment in Haskell (do notation requires a monad), but other than that there’s nothing magical about them. Monads aren’t magical things. “Monad” is a name for a common pattern: a type whose definition permits the functions defined above.