1. 16

    90s C code has plenty of weird properties, but the strangest is an absolute refusal to use proper indentation combined with a massive lack of visual whitespace.

    I do not believe that is actually an essential property of 90s C code.

    1. 2

      And more to the point, I can see pretty clear reasons within the excerpt as to why it’s formatted that way. I probably wouldn’t have written it that way, but it’s not nearly as terrible as the author is trying to make it sound.

      Yes, the lack of indentation under the while loop makes it harder to see what’s contained in the loop. But digging up the actual source, it’s pretty clear that the method in question is basically a little “pre-work”, a “main loop”, and a little “post-work”. The version I linked actually indents the loop body, but it’s not necessary indentation, even for readability.

      I’m a C incompetent, and this code doesn’t particularly bother me.

      Edit: the second excerpt is honestly annoying, as it indents things more than it should, which is the opposite of the first block, which didn’t indent very much at all.

    1. 3

      No, it’s vector multiplication in disguise as a markov chain.

      1. 3

        That seems like a category mistake the me, whereas the title of the article doesn’t.

        A Markov chain may be a specific pattern of vector multiplications, but that pattern makes all the difference. Markov chains and vector multiplications are on a different level. On the other hand ‘deep learning’ and ‘Markov chain’ are terms for alternative patterns of vector multiplications, one a lot more involved than the other.

        1. 2

          There’s a video on YT somewhere of a talk by a physicist (IIRC) on why deep learning is so ridiculously effective - it pretty much boils down to the same reason that mathematics is so unreasonably effective in describing physical systems in general, i.e. (handwaving extremely wildly from memory) that physical systems tend to be simple functions of their inputs (albeit with many, many inputs!) where causality is preserved. This is what makes it possible for RNNs and the like to approximate physical systems in various ways, because the nature of said physical systems is exactly what permits approximations of the information content of the system to be at least partially valid instead of being a total loss.

          (I tried to find the video, but there are too many terrible ones on the same topic these days. I’ll have another look later.)

        2. 4

          No, it’s a monoid in the category of endofunctors.

        1. 6

          Government jobs tend to be 40 hours or less. State government in my state has a 37.5 hour standard. There is very occasional off-hours work, but overtime is never required except during emergencies – and not “business emergencies”, but, like, natural disasters.

          1. 8

            I’m surprised that tech workers turn up their nose at government jobs. Sure, they pay less, but the benefits are amazing! And they really don’t pay too much less in the scheme of things.

            How many private sector tech jobs have pensions? I bet not many.

            1. 9

              I work in a city where 90% of the folks showing up to the local developer meetup are employed by the city or the state.

              It’s taken a lot of getting used to being the only person in the room who doesn’t run Windows.

              1. 4

                I feel like this is pretty much the same for me (aside from the meetup bit).

                Have you ever worked with windows or have you been able to stay away from it professionally?

                1. 3

                  I used it on and off for a class for about a year in 2003 at university but have been able to avoid it other than that.

                2. 1

                  Yeah. I hadn’t used Windows since Win 3.1, until I started working for the state (in the Win XP era). I still don’t use it at home, but all my dayjob work is on Windows, and C#.

                3. 5

                  they pay less

                  Not sure about this one. When you speak about pay, you also have to count all the advantages going with it. In addition, they usually push you out at 5pm so your hourly rate is very close to the contractual one.

                  1. 3

                    Most people who are complaining that they pay less are the tech workers who hustle hard in Silicon Valley or at one of the big N companies. While government jobs can pay really well and have excellent value especially when considered pay/hours and benefits like pensions, a Google employee’s ceiling is going to be way higher.

                    There’s a subreddit where software engineers share their salaries and it seems like big N companies can pay anything from $300k–700k USD when you consider their total package. No government job is going to match that.

                  2. 3

                    Do you work in the public sector? What’s it like?

                    1. 13

                      I do.

                      Pros: hours, and benefits. Less trend-driven development and red queen effect. Less age discrimination (probably more diversity in general, at least compared to Silicon Valley).

                      Cons: low pay, hard to hire and retain qualified people. Bureaucracy can be galling, but I imagine that’s true in large private sector organizations, too.

                      We’re not that behind the times here; we’ve avoided some dead-ends by being just far enough behind the curve to see stuff fail before we can adopt it.

                      Also, depending on how well your agency’s goals align with your values, Don’t Be Evil can actually be realistic.

                      1. 6

                        I will say, I once did a contract with the Virginia DOT during Peak Teaparty. Never before in my life have I seen a more downtrodden group. Every single person I talked to was there because they really believed in their work, and every single one of them was burdened by the reality that their organization didn’t and was cutting funding, cutting staff, and cutting… everything.

                        They were some of the best individuals I ever worked with, but within the worst organization I’ve ever interacted with.

                        Contrast that to New York State- I did a shitton of work for a few departments there. These were just folks who showed up to get things done. They were paid well, respected, and accomplished what they could within the confines of their organization. They also were up for letting work knock off at 2PM.

                        1. 2

                          Also, depending on how well your agency’s goals align with your values, Don’t Be Evil can actually be realistic.

                          Agreed. There’s no such thing as an ethical corporation.

                          Do you mind sharing the minimum qualifications of a candidate at your institution? How necessary is a degree?

                          I’m asking for a friend 😏

                          1. 2

                            What about B corps?

                            1. 1

                              No, not even them.

                              When you think about what “profit” is (ie taking more than you give), I think it’s really hard to defend any for-profit organization. Somebody has to lose in the exchange. If it’s not the customers, it’s the employees.

                              1. 5

                                That’s a pretty cynical view of how trade works & not one I generally share. Except under situations of effective duress where one side has lopsided bargaining leverage over the other (e.g. monopolies, workers exploited because they have no better options), customers, employees and shareholders can all benefit. Sometimes this has negative externalities but not always.

                                1. 1

                                  Then I guess we must agree to disagree 🤷🏻‍♂️

                                2. 2

                                  Profit is revenue minus expenses. Your definition, taking more than you give, makes your conclusion a tautology. i.e., meaningless repetition.

                                  Reciprocity is a natural law: markets function because both parties benefit from the exchange. As a nod to adsouza’s point: fully-informed, warrantied, productive, voluntary exchange makes markets.

                                  Profit exists because you can organize against risk. Due to comparative advantage, you don’t even have to be better at it than your competitors. Voluntary exchange benefits both weaker and stronger parties.

                                  1. 1

                                    Profit is revenue minus expenses. Your definition, taking more than you give, makes your conclusion a tautology. i.e., meaningless repetition.

                                    I mean, yes, I was repeating myself. I wasn’t concluding anything: I was merely rephrasing “profit.” I’m not sure what you’re trying to get at here aside from fishing for a logical fallacy.

                                    a tautology. i.e., meaningless repetition.

                                    Intentionally meta?

                                    Reciprocity is a natural law

                                    Yup. No arguments here. However, reciprocity is not profit. In fact, that’s the very distinction I’m trying to make. Reciprocity is based on fairness and balance, that what you get should be equal to what you give. Profit is expecting to get back more than what you put in.

                                    Profit exists because you can organize against risk.

                                    Sure, but not all parties can profit simultaneously. There are winners and losers in the world of capitalism.

                                  2. 1

                                    So, if I watch you from afar and realize that you’ll be in trouble within seconds, come to your aid, and save your life (without much effort on my side) in exchange for $10, who’s the one losing in this interaction? Personally, I don’t think there’s anything morally wrong with playing positive-sum games and sharing the profits with the other parties.

                                3. 1

                                  For an entry-level developer position, we want either a batchelor’s degree in an appropriate program, with no experience required, an associate’s degree and two years of experience, or no degree and four years of experience. The help-desk and technician positions probably require less for entry level but I’m not personally acquainted with their hiring process.

                                  1. 2

                                    I would fall into the last category. Kind of rough being in the industry for 5 years and having to take an entry level job because I don’t have a piece of paper, but that’s how it goes.

                                    1. 2

                                      For us, adding an AS (community college) to that 5 years of experience would probably get you into a level 2 position if your existing work is good. Don’t know how well that generalizes.

                                      1. 2

                                        Okay cool! I have about an AS in credits from a community college I’d just need to graduate officially. Though, at that point, I might as well get a BS.

                                        Thanks for helping me in my research :)

                              2. 4

                                I don’t, but I’m very envious of my family members who do.

                                One time my cousin (works for the state’s Department of Forestry) replied to an email on Sunday and they told him to take 4 hours off Monday to balance it off.

                                That said, from a technological perspective I’d imagine it would be quite behind in times, and moves very slowly. If you’re a diehard agile manifesto person (I’m not) I probably wouldn’t recommend it.

                                EDIT: I guess it’s really what you value more. In the public sector, you get free time at the expense of money. In the private sector, vice versa. I can see someone who chases the latest technologies and loves to code all day long being miserable there, but for people who just code so they can live a fulfilling life outside of work it could be a good fit.

                          1. 4

                            I’m going to propose an alternative argument: that the debate over full-stack vs. front-end/back-end demonstrates that our ability to develop user interfaces is broken.

                            I want to be specific here, because I’m not talking about developing user experiences. Taking an abstract set of requirements and turning it into an implementable series of interactives is absolutely a unique and complex skill. The same is true of design.

                            But this front-end/back-end dichotomy strikes me as… okay, as someone who’s done plenty of both, front-end is needlesly complicated because our front-end targets are absolute garbage. The browser offers an absolutely awful target for applications, and your basic front-end “hello world” these days takes 15 pages of boiler plate and 1,024 dedicated frameworks.

                            Front-end development shouldn’t be complicated. Our tools make it complicated, but that’s because we have bad tools

                            1. 1

                              The author of the article quotes a tweet from, er, himself at one point which I think supports your view more effectively than it supports the argument he makes in the article:

                              If we spent as much time thinking about users as we do about the titles we give front-end developers then the web would be a much better place.

                              I think this is a good way of looking at it.

                            1. 1

                              WWDC is a developers conference, not a consumer/product conference. Why would new hardware be announced in WWDC?

                              1. 8

                                Historically, that’s just how Apple does it. Macworld says:

                                WWDC kicks off with a big keynote, at which Apple execs typically introduce the latest developments in Apple operating systems (iOS, macOS, tvOS, watchOS) and introduces new hardware products, with a focus on those that developers care about most. That is, primarily Mac computers (especially the Pro lines).

                                1. 7

                                  Beyond the historical “they always do it”, it’s also because Apple doesn’t differentiate between software and hardware releases from a developer’s perspective. Apple is a consumer electronics company, and views the entire stack- software through hardware- as a single releaseable unit.

                                  1. 3

                                    Every single iOS-developer, and every single Mac developer who writes native apps, need a Mac. If Apple for example fucks up the keyboard on their laptops, then every one of those developers who use a laptop have to live with that until Apple fixes it.

                                    (I know it’s technically possible to make an iOS-app on another OS and then only sign it using a Mac, but I think the point still stands; in general, Apple’s developers use Macs.)

                                  1. 2

                                    I’d reply to this, but I’m really busy doing dot products on big piles of vectors… they’re really big vectors…

                                    1. 2

                                      Computationally, I don’t think they’re that big. Typical vision models have matrix multiplications that are quite small (on the order of 1000x1000 matrices for the huge ones) relative to the problems solved for computational chemistry (a couple of orders of magnitude bigger).

                                      1. 2

                                        I’m doing it by hand, and I’m not good at math.

                                        1. 1

                                          I guess that’s why you are procrastinating on Lobste.rs then?

                                    1. 23

                                      Kinda late on UNIX bashing bandwagon :)

                                      Also, Windows owes more of it’s legacy to VMS.

                                      1. 10

                                        It does, but users don’t use any of the VMSy goodness in Windows: To them it’s just another shitty UNIX clone, with everything being a file or a program (which is also a file). I think that’s the point.

                                        Programmers rarely even use the VMSy goodness, especially if they also want their stuff to work on Mac. They treat Windows as a kind of retarded UNIX cousin (which is a shame because the API is better; IOCP et al)

                                        Sysadmins often struggle with Windows because of all the things underneath that aren’t files.

                                        Message/Object operating systems are interesting, but for the most part (OS/2, BeOS, QNX) they, for the most part, degraded into this “everything is a file” nonsense…

                                        Until they got rid of the shared filesystem: iOS finally required messaging for applications to communicate on their own, and while it’s been rocky, it’s starting to paint a picture to the next generation who will finally make an operating system without files.

                                        1. 10

                                          If we talk user experiences, it’s more a CP/M clone than anything. Generations later, Windows still smells COMMAND.COM.

                                          1. 6

                                            yes, the bowels are VMS, the visible stuff going out is CP/M

                                            1. 4

                                              Bowels is a good metaphor. There’s good stuff in Windows, but you’ve got to put on a shoulder length glove and grab a vat of crisco before you can find any of it.

                                          2. 10

                                            I think you’re being a little bit harsh. End-users definitely don’t grok the VMSy goodness; I agree. And maybe the majority of developers don’t, either (though I doubt the majority of Linux devs grok journald v. syslogs, really understand how to use /proc, grok Linux namespaces, etc.). But I’ve worked with enough Windows shops to promise you that a reasonable number of Windows developers do get the difference.

                                            That said, I have a half-finished book from a couple years ago, tentatively called Windows Is Not Linux, which dove into a lot of the, “okay, I know you want to do $x because that’s how you did it on Linux, and doing $x on Windows stinks, so you think Windows stinks, but let me walk you through $y and explain to you why it’s at least as good as the Linux way even though it’s different,” specifically because I got fed up with devs saying Windows was awful when they didn’t get how to use it. Things in that bucket included not remoting in to do syswork (use WMI/WinRM), not doing raw text munging unless you actually have to (COM from VBScript/PowerShell are your friends), adapting to the UAC model v. the sudo model, etc. The Windows way can actually be very nice, but untraining habits is indeed hard.

                                            1. 6

                                              I don’t disagree with any of that (except maybe that I’m being harsh), but if you parse what I’m saying as “Windows is awful” then it’s because my indelicate tone has been read into instead of my words.

                                              The point of the article is that those differences are superficial, and mean so very little to the mental model of use and implementation as to make no difference: IOCP is just threads and epoll, and epoll is just IOCP and fifos. Yes, IOCP is better, but I desperately want to see something new in how I use an operating system.

                                              I’ve been doing things roughly the same way for nearly four decades, despite the fact that I’ve done Microsoft/IBM for a decade, Linux since Slackware 1.1 (Unix since tapes of SCO), Common Lisp (of all things) for a decade, and OSX for nearly that long. They’re all the same, and that point is painfully clear to anyone who has actually used these things at a high level: I edit files, I copy files, I run programs. Huzzah.

                                              But: It’s also obvious to me who has gone into the bowels of these systems as well: I wrote winback which was for a long time the only tools for doing online Windows backups of standalone exchange servers and domain controllers; I’m the author of (perhaps) the fastest Linux webserver; I wrote ml a Linux emulator for OSX; I worked on ECL adding principally CL exceptions to streams and the Slime implementation. And so on.

                                              So: I understand what you mean when you say Windows is not Linux, but I also understand what the author means when he says they’re the same.

                                              1. 2

                                                That actually makes a ton of sense. Can I ask what would qualify as meaningfully different for you? Oberon, maybe? Or a version of Windows where WinRT was front-and-center from the kernel level upwards?

                                                1. 2

                                                  I didn’t use the term “meaningfully different”, so I might be interpreting your question you too broadly.

                                                  When I used VMS, I never “made a backup” before I changed a file. That’s really quite powerful.

                                                  The Canon Cat had “pages” you would scroll through. Like other forth environments, if you named any of your blocks/documents it was so you could search [leap] for them, not because you had hierarchy.

                                                  I also think containers are very interesting. The encapsulation of the application seems to massively change the way we use them. Like the iOS example, they don’t seem to need “files” since the files live inside the container/app. This poses some risk for data portability. There are other problems.

                                                  I never used Oberon or WinRT enough to feel as comfortable commenting about them as I do about some of these other examples.

                                              2. 2

                                                If it’s any motivation I would love to read this book.

                                                Do you know of any books or posts I could read in the meantime? I’m very open to the idea that Windows is nice if you know which tools and mental models to use, but kind of by definition I’m not sure what to Google to find them :)

                                                1. 4

                                                  I’ve just been hesitant because I worked in management for two years after I started the book (meaning my information atrophied), and now I don’t work with Windows very much. So, unfortunately, I don’t immediately have a great suggestion for you. Yeah, you could read Windows Internals 6, which is what I did when I was working on the book, but that’s 2000+ pages, and most of it honestly isn’t relevant for a normal developer.

                                                  That said, if you’ve got specific questions, I’d love to hear them. Maybe there’s a tl;dr blog post hiding in them, where I could salvage some of my work without completing the entire book.

                                                2. 1

                                                  I, for one, would pay for your “Windows is not Linux” book. I’ve been developing for Windows for about 15 years, but I’m sure there are still things I could learn from such a book.

                                                3. 7

                                                  but users don’t use any of the VMSy goodness in Windows: To them it’s just another shitty UNIX clone, with everything being a file or a program (which is also a file). I think that’s the point.

                                                  Most users don’t know anything about UNIX and can’t use it. On the UI side, pre-NT Windows was a Mac knockoff mixed with MSDOS which was based on a DOS they got from a third party. Microsoft even developed software for Apple in that time. Microsoft’s own users had previously learned MSDOS menu and some commands. Then, they had a nifty UI like Apple’s running on MSDOS. Then, Microsoft worked with IBM to make a new OS/2 with its philosophy. Then, Microsoft acquired OpenVMS team, made new kernel, and a new GUI w/ wizard-based configuration of services vs command line, text, and pipes like in UNIX.

                                                  So, historically, internally, layperson-facing, and administration, Windows is a totally different thing than UNIX. Hence, the difficulty moving Windows users to UNIX when it’s a terminal OS with X Windows vs some Windows-style stuff like Gnome or KDE.

                                                  You’re also overstating the everything is a file by conflating OS’s that store programs or something in files vs those like UNIX or Plan 9 that use file metaphor for about everything. It’s a false equivalence: from what I remember, you don’t get your running processes in Windows by reading the filesystem since they don’t use that metaphor or API. It’s object based with API calls specific to different categories. Different philosophy.

                                                  1. 3

                                                    Bitsavers has some internal emails from DEC at the time of David Cutler’s departure.

                                                    I have linked to a few of them.

                                                    David Cutler’s team at DECwest was working on Mica (an operating system) for PRISM (a RISC CPU architecture). PRISM was canceled in June of 1988. Cutler resigned in August of 1988 and 8 other DECwest alumni followed him at Microsoft.

                                                4. 5

                                                  I have my paper copy of The Unix Hater’s Handbook always close at hand (although I’m missing the barf bag, sad to say).

                                                  1. 5

                                                    I always wanted to ask the author of The Unix Hater’s Handbook if he’s using Mac OS X

                                                    8~)

                                                    1. 5

                                                      It was edited by Simson Garfinkel, who co-wrote Building Cocoa Applications: a step-by-step guide. Which was sort of a “port” of Nextstep Programming Step One: object-oriented applications

                                                      Or, in other words, “yes” :)

                                                      1. 2

                                                        Add me to the list curious about what they ended up using. The hoaxers behind UNIX admitted they’ve been coding in Pascal on Macs. Maybe it’s what the rest were using if not Common LISP on Macs.

                                                    2. 7

                                                      Beat me to it. Author is full of it right when saying Windows is built on UNIX. Microsoft stealing, cloning, and improving OpenVMS into Windows NT is described here. This makes the Linux zealots’ parodies about a VMS desktop funnier given one destroyed Linux in desktop market. So, we have VMS and UNIX family trees going in parallel with the UNIX tree having more branches.

                                                      1. 4

                                                        The author doesn’t say Windows is built on Unix.

                                                        1. 5

                                                          “we are forced to choose from: Windows, Apple, Other (which I shall refer to as “Linux” despite it technically being more specific). All of these are built around the same foundational concepts, those of Unix.”

                                                          Says it’s built on the foundational concepts of UNIX. It’s built on a combo of DOS, OS/2, OpenVMS, and Microsoft concepts they called the NT kernel. The only thing UNIX-like was the networking stack they got from Spider Systems. They’ve since rewritten their networking stack from what I heard.

                                                          1. 4

                                                            Says it’s built on the foundational concepts of UNIX.

                                                            I don’t see any reason to disagree with that.

                                                            The only thing UNIX-like …

                                                            I don’t think that’s a helpful definition of “unix-like”.

                                                            It’s got files. Everything is a file. Windows might even be a better UNIX than Linux (since UNC)

                                                            Cutler might not have liked UNIX very much, but Windows NT ended up UNIX anyway because none of that VMS-goodness (Versions, types, streams, clusters) ended up in the hands of Users.

                                                            1. 10

                                                              It’s got files. Everything is a file.

                                                              Windows is object-based. It does have files which are another object. The files come from MULTICS which UNIX also copied in some ways. Even the name was a play on it: UNICS. I think Titan invented the access permissions. The internal model with its subsystems were more like microkernel designs running OS emulators as processes. They did their own thing for most of the rest with the Win32 API and registry. Again, not quite how a UNIX programming guide teaches you to do things. They got clustering later, too, with them and Oracle using the distributed, lock approach from OpenVMS.

                                                              Windows and UNIX are very different in approach to architecture. They’re different in how developer is expected to build individual apps and compose them. It wasn’t even developed on UNIX: they used OS/2 workstations for that. There’s no reason to say Windows is ground in the UNIX philosophy. It’s a lie.

                                                              “Windows NT ended up UNIX anyway because none of that VMS-goodness (Versions, types, streams, clusters) ended up in the hands of Users.”

                                                              I don’t know what you’re saying here. Neither VMS nor Windows teams intended to do anything for UNIX users. They took their own path except for networking for obvious reasons. UNIX users actively resisted Microsoft tech, too. Especially BSD and Linux users that often hated them. They’d reflexively do the opposite of Microsoft except when making knockoffs of their key products like Office to get desktop users.

                                                              1. 3

                                                                Windows is object-based.

                                                                Consider what methods of that “object” a program like Microsoft Word must be calling besides “ReadFile” and “WriteFile”.

                                                                That the kernel supports more methods is completely pointless. Users don’t interact with it. Programmers avoid it. Sysadmins don’t understand it and get it wrong.

                                                                I don’t know what you’re saying here.

                                                                That is clear, and yet you’re insisting I’m wrong.

                                                                1. 3

                                                                  Except, that’s completely wrong.

                                                                  I just started Word and dumped a summary of its open handles by object type:

                                                                  C:\WINDOWS\system32>handle -s -p WinWord.exe
                                                                  
                                                                  Nthandle v4.11 - Handle viewer
                                                                  Copyright (C) 1997-2017 Mark Russinovich
                                                                  Sysinternals - www.sysinternals.com
                                                                  
                                                                  Handle type summary:
                                                                    ALPC Port       : 33
                                                                    Desktop         : 1
                                                                    Directory       : 3
                                                                    DxgkSharedResource: 2
                                                                    DxgkSharedSyncObject: 1
                                                                    EtwRegistration : 324
                                                                    Event           : 431
                                                                    File            : 75
                                                                    IoCompletion    : 66
                                                                    IoCompletionReserve: 1
                                                                    IRTimer         : 8
                                                                    Key             : 171
                                                                    KeyedEvent      : 24
                                                                    Mutant          : 32
                                                                    Process         : 2
                                                                    Section         : 67
                                                                    Semaphore       : 108
                                                                    Thread          : 138
                                                                    Timer           : 7
                                                                    Token           : 3
                                                                    TpWorkerFactory : 4
                                                                    WaitCompletionPacket: 36
                                                                    WindowStation   : 2
                                                                  Total handles: 1539
                                                                  

                                                                  Each of these types is a distinct kernel object with its own characteristics and semantics. And yes, you do create and interact with them from user-space. Some of those will be abstracted by lower-level APIs, but many are directly created and managed by the application. You’ll note the number of open “files” is a very small minority of the total number of open handles.

                                                                  Simple examples of non-file object types commonly manipulated from user-land include Mutants (CreateMutex) and Semaphores (CreateSemaphore). Perhaps the most prominent example is manipulating the Windows Registry; this entails opening “Key” objects, which per above are entirely distinct from regular files. See the MSDN Registry Functions reference.

                                                                  1. 0

                                                                    None of these objects can exist on a disk; they cannot persist beyond shutdown, and do not have any representation beyond their instantaneous in-memory instance. When someone wants an “EtwRegistration” they’re creating it again and again.

                                                                    Did you even read the article? Or are you trolling?

                                                                    1. 3

                                                                      None of these objects can exist on a disk; they cannot persist beyond shutdown, and do not have any representation beyond their instantaneous in-memory instance. When someone wants an “EtwRegistration” they’re creating it again and again.

                                                                      Key objects do typically exist on disk. Albeit, the underlying datastore for the Registry is a series of files, but you never directly manipulate those files. In the same sense you may ask for C:\whatever.txt, you may ask for HKLM:\whatever. We need to somehow isolate the different persisted data streams, and that isolation mechanism is a file. That doesn’t mean you have to directly manipulate those files if the operating system provides higher-level abstractions. What exactly are you after?

                                                                      From the article:

                                                                      But in Unix land, this is a taboo. Binary files are opaque, say the Unix ideologues. They are hard to read and write. Instead, we use Text Files, for it is surely the path of true righteousness we have taken.

                                                                      The Windows Registry, which is a core part of the operating system, is completely counter to this. It’s a bunch of large binary files, precisely because Microsoft recognised storing all that configuration data in plain text files would be completely impractical. So you don’t open a text file and write to it, you open a Registry key, and store data in it using one of many predefined data types (REG_DWORD, etc…).

                                                                      Did you even read the article? Or are you trolling?

                                                                      It sounds like you’re not interested in a constructive and respectful dialogue. If you are, you should work on your approach.

                                                                      1. -3

                                                                        What exactly are you after?

                                                                        Just go read the article.

                                                                        It’s about whether basing our entire interactions with a computer on a specific reduction of verbs (read and write) is really exploring what the operating system can do for us.

                                                                        That is a very interesting subject to me.

                                                                        Some idiot took party to the idea that Windows basically “built on Unix” then back-pedalled it to be about whether it was based on the same “foundational” concepts, then chooses to narrowly and uniquely interpret “foundational” in a very different way than the article.

                                                                        Yes, windows has domains and registries and lots of directory services, but they all have the exact same “file” semantics.

                                                                        But now you’re responding to this strange interpretation of “foundational” because you didn’t read the article either. Or you’re a troll. I’m not sure which yet.

                                                                        Read the article. It’s not well written but it’s a very interesting idea.

                                                                        Each of these types is a distinct kernel object with its own characteristics and semantics

                                                                        Why do you bring this up in response to whether Windows is basically the same as Unix? Unix has lots of different kernel “types” all backed by “handles”. Some operations and semantics are shared by handles of different types, but some are distinct.

                                                                        I don’t understand why you think this is important at all.

                                                                        It sounds like you’re not interested in a constructive and respectful dialogue. If you are, you should work on your approach.

                                                                        Do you often jump into the middle of a conversation with “Except, that’s completely wrong?”

                                                                        Or are you only an asshole on the Internet?

                                                                        1. 4

                                                                          Or are you only an asshole on the Internet?

                                                                          I’m not in the habit of calling people “asshole” anywhere, Internet or otherwise. You’d honestly be more persuasive if you just made your points without the nasty attacks. I’ll leave it at that.

                                                                2. 2

                                                                  networking for obvious reasons

                                                                  Them being what? Is the BSD socket API really the ultimate networking abstraction?

                                                                  1. 7

                                                                    The TCP/IP protocols were part of a UNIX. AT&T gave UNIX away for free. They spread together with early applications being built on UNIX. Anyone reusing the protocols or code will inherit some of what UNIX folks were doing. They were also the most mature networking stacks for that reason. It’s why re-using BSD stacks was popular among proprietary vendors. On top of the licensing.

                                                                    Edit: Tried to Google you a source talking about this. I found one that mentions it.

                                                      1. 17

                                                        This design decision seems pretty hard to defend:

                                                        At 1.3 seconds before impact, the self-driving system determined that an emergency braking maneuver was needed to mitigate a collision (see figure 2). According to Uber, emergency braking maneuvers are not enabled while the vehicle is under computer control, to reduce the potential for erratic vehicle behavior. The vehicle operator is relied on to intervene and take action. The system is not designed to alert the operator.

                                                        1. 2

                                                          “I can’t figure out why, when the emegency stop code is enabled, the car gets all erratic. I know, I’ll just comment it out. Okay, next bug…”

                                                          1. 0

                                                            Holy smokes this sounds bad!

                                                          1. -1

                                                            Repetitive, irrelevant, and … pointless.

                                                            Much of the man page corpus is just plain wrong. Many changed the code and never bothered to change the documentation. One can easily get misled.

                                                            UNIX/POSIX … is getting massively “bit-rotted” in its old age. Time for different metaphors, possibly maintained by ML to keep them effective and relevant?

                                                            1. 13

                                                              Do you have any examples of outdated manpages? Your comment is awfully vague.

                                                              1. 5

                                                                I run across examples semi-regularly, and try to report upstream when I find them (some upstreams are easier to report to than others). Mostly I’m pretty happy with manual pages, though.

                                                                Just recently, I noticed that pngcrush(1) on Debian is missing the newish -ow option. Upstream doesn’t ship a manpage at all, so Debian wrote one, but it doesn’t stay in sync automatically. Therefore I should probably report this to Debian. Upstream does ship a fairly complete pngcrush -v help text though, so I wonder if the manpage could be auto-synced with that.

                                                                I’m pretty sure I’ve reported a bunch of others in the past, but the only example that comes to mind at the moment is that privileges(5) on illumos used to be years out of date, missing some newer privileges, but it was fixed fairly quickly after I reported a bug.

                                                              2. 1

                                                                I really want to see documentation generated via machine learning systems. I wouldn’t want to use that documentation for anything, but I’d like to see it.

                                                              1. 6

                                                                A trivial counterexample to this is inheritance for actors in games, e.g., “EliteMook” extends “Mook”, adding smarter target selection or something.

                                                                1. 7

                                                                  Games these days will often drop inheritance in favour of using an entity component system or data oriented approach. This is much more cache friendly than the more naive taxonomic inheritance hierarchy, especially when you have thousands or tens of thousands of entities you need to process.

                                                                  1. 2

                                                                    Quite right, at scale.

                                                                    For small games, or for games that don’t have a gigantic update loop, a taxonomic approach you’d see from OOP works fine.

                                                                    My example wasn’t the end-all-be-all, it was just a case where inheritance works pretty nicely. No approach, of course, is going to work forever.

                                                                  2. 5

                                                                    I found it interesting that Eiffel is dropped into the article but 6 additional variants on inheritance are described by Bertrand Meyer:

                                                                    https://archive.eiffel.com/doc/manuals/technology/oosc/inheritance-design/section_05.html#HDR8

                                                                    1. 7

                                                                      Because Eiffel imposes that preconditions are contravariant and preconditions are covariant with inheritance, it does impose “subclass means subtype” out of all of the possibilities.

                                                                      1. 6

                                                                        The ironic thing is that while Eiffel preconditions are contravariant, the argument types are covariant. That leads to type errors at runtime and an extremely ugly hack in the Eiffel language to get around it.

                                                                        1. 1

                                                                          I’ve never programmed in Eiffel so I have no insight into the language specifically. I only meant to point out that the author’s ontology of inheritance is not comprehensive.

                                                                          1. 2

                                                                            think of it as a minimal reproduction case for the bug.

                                                                      2. 4

                                                                        Even that counter-example breaks- what happens when the behavior that makes an EliteMook different than a regular Mook also needs to be incorporated into bosses- we have an EliteBoss now. Which sort of touches upon what the article is talking about, because really we’re talking about different kinds of inheritance.

                                                                        1. 4

                                                                          the existence of a counterexample is merely lucky happenstance, when the thesis is “most of the time this situation is not true”. Particularly the ontology of a computer game (or indeed any game; D&D went for decades before multiple inheritance was added) can be more simplistic than one for a business process.

                                                                          1. 4

                                                                            Perhaps a more accurate title would’ve been in order “Why inheritance often does not make sense.”

                                                                        1. 3

                                                                          Another anti-pattern is making the Controller instance manage the Serializer. Ideally, the Controller just returns an object, and any need to transform that object to a specific format is handled decoratively or via DI. Transformations don’t belong in business logic.

                                                                          1. 4

                                                                            I somewhat regret using a controller as the example, because this is applicable to any Ruby object. Its so easy to get into controller analysis rather than my main gist.

                                                                            1. 1

                                                                              My rule still applies- controller or not, they should just return the structure that makes sense to them. If it doesn’t make sense to the consumer, put a layer of indirection between them. As much as I am wary of indirection, objects should do what makes sense to the object.

                                                                          1. 3

                                                                            Oh man, I spent so much time trying to get dual monitors to work reliably back then.

                                                                            1. 10

                                                                              I think the reason agile is weird is because there are two kinds of agile. There is the agile as a method, where we adopt a series of industry best practices and employ those tools to get things done. Whether a team adopts scrum, kanban, etc., the important thing is that they have a process, employ the process, and things get done. You do these things, tick off these boxes, and you get thing done.

                                                                              Then there’s agile as a process (AaaP). You don’t adopt any specific methodologies, though you might, but instead you treat your methodology as something that’s constantly being developed and refined. AaaP is saying that you’ll never have a finished approach or methodology, but instead will constantly re-evaluate it. The idea is that there is no off-the-shelf approach that’s going to be perfectly usable with your team, and your specific set of problems, so you need to construct your own methodology by applying agile principles and delivering constant feedback.

                                                                              The “agile as a process” version sometimes works. It’s based on the idea that if you put skilled people in a room and get out of their way, they’ll get things done. I think the challenge is one of scaling- that sort of “figure out and adjust” methodology works well for small teams, but for large teams or teams with high turnover or teams that have to balance priorities across 100 different software products, and thus are rarely dedicated to one product’s worth of tasks, it tends to blow up.

                                                                              If “AaaP” sometimes works, “agile as a method” (AaaM) almost always doesn’t. My experience is that 90% of attempts to adopt scrum (what big companies love) devolve into “scrumfall” or just perversely take a waterfall and add more meetings to it. I think the article tends to touch upon a lot of those. I’ve done some Agile coaching, I’ve given them advice, they’ve paid me lots of money for the advice, and then they’ve gone off and ignored it because they want to continue letting their PMs micromanage teams.

                                                                              I don’t think there’s any right answer, but I think there are a lot of wrong answers when it comes to methodology. What I appreciate about AaaP is that it promotes self-organization and works best with skilled teams- meaning that you’re 2/3s of the way around the 3-factor theory of human motivation: autonomy and mastery. Chuck purpose on top, and I think that’s a team that will succeed.

                                                                              1. 1

                                                                                The best case for ‘scrumfall’ at big dumb corps is they actually assign product/project owners and task them with creating and prioritizing a back log. That goes a long, long way toward resolving the “not me” “not my responsibility” shit show so many of them have. Worst case is, as you said, don’t do anything different but have a stand up, and more meetings.

                                                                              1. 4

                                                                                I do something similar, but different in a key way. I keep the original code sample handy, but I enter in a subtly different version based on my understanding of the code. What I’m doing is testing my mental model: if this code does $X, then this alteration should produce $Y.

                                                                                It’s a great way to crash a new tech stack in a day or two, and it’s a really useful way of understanding documentation for libraries or frameworks. Essentially it’s a simplified version of what you’ll do by referring to the docs in the future.

                                                                                1. 6

                                                                                  JSON RPC server on localhost with wide-open CORS and no password or any other restriction

                                                                                  Edited for additional, important details.

                                                                                  I’d ask what they were thinking, but they obviously weren’t.

                                                                                  1. 9

                                                                                    The venture capitalist says: “Holy crap, that’s the worst idea I’ve ever heard! What’s the act called?”

                                                                                    The anarchocapitalists reply: “The Blockchain!”

                                                                                  1. 2

                                                                                    Apparently my last 9-5 job used this as their policy manual.

                                                                                    1. 4

                                                                                      The value of blockchains isn’t the currency systems implemented on them- it’s the general distributed ledger. There are useful problems that can be solved by storing information in public, validated with proof-of-work, with conflicts in history being resolved by consensus.

                                                                                      Coins are the carnival barker trying to push traffic into the system. Do the grueling proof-of work, and we give you an entry in the ledger that says you own some coins. Get in quick though (at least with Bitcoin), because there aren’t very many. But that means the value can only go up! They’ll get rarer over time!

                                                                                      1. 1

                                                                                        Yes the inflation model of btc is fundamentally unsustainable. Also it’s a bit unfortunate that the proof-of-work chosen is not work that benefits humanity in any way.

                                                                                        1. 1

                                                                                          The proof-of-work model chosen by Bitcoin is the most straightforward, and arguably, the most resistant to Sybil nodes and “cheating”. It is, after all, consciously modelled after physical mining, which is also arguably wasted work - dig up X tons of ore to extract Y kilos of precious metal.

                                                                                        2. 1

                                                                                          Do you have any good reading that you can recommend about cryptocurrencies?

                                                                                        1. 0

                                                                                          You don’t want to manually write makefiles. Use Autotools instead: https://autotools.io/index.html

                                                                                          1. 14

                                                                                            Why not, its completely fine to write “simple” makefiles for “simple” projects. I think the musl makefile is a good example for a not so simple but still simple makefile.

                                                                                            To me autotools generated makefiles are a hell to debug, just slightly less hellish than debugging cmake.

                                                                                            1. 5

                                                                                              The musl makefile is one of the cleanest production makefiles I’ve ever seen. But I note even its opening comment says, “This is how simple every makefile should be… No, I take that back - actually most should be less than half this size.”

                                                                                              I count, at least, 3 languages used:

                                                                                              1. GNU dialect of make
                                                                                              2. shell
                                                                                              3. sed

                                                                                              And hacks like this:

                                                                                              obj/musl-gcc: config.mak
                                                                                              	printf '#!/bin/sh\nexec "$${REALGCC:-$(WRAPCC_GCC)}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@
                                                                                              	chmod +x $@
                                                                                              
                                                                                              obj/%-clang: $(srcdir)/tools/%-clang.in config.mak
                                                                                              	sed -e 's!@CC@!$(WRAPCC_CLANG)!g' -e 's!@PREFIX@!$(prefix)!g' -e 's!@INCDIR@!$(includedir)!g' -e 's!@LIBDIR@!$(libdir)!g' -e 's!@LDSO@!$(LDSO_PATHNAME)!g' $< > $@
                                                                                              	chmod +x $@
                                                                                              

                                                                                              Local legend @andyc of Oil Shell fame pushes the idea that Shell, Awk, and Make Should Be Combined. IMHO, the musl example is persuasive empirical evidence for his position.

                                                                                              (I’m hoping @stefantalpalaru is being sarcastic about Autotools and we’re all falling to Poe’s Law.)

                                                                                              1. 2

                                                                                                (I’m hoping @stefantalpalaru is being sarcastic about Autotools and we’re all falling to Poe’s Law.)

                                                                                                No, I’m not. I’ve worked with hand written Makefiles, Autotools and CMake on complex projects and I honestly think that Autotools is the lesser of all evils.

                                                                                                Local legend @andyc of Oil Shell fame

                                                                                                Now I hope you’re the one being sarcastic. Who exactly uses the Oil Shell?

                                                                                                1. 3

                                                                                                  Now I hope you’re the one being sarcastic.

                                                                                                  I was not being sarcastic. @andyc’s Oil Shell posts consistently do well in voting here.

                                                                                                  Who exactly uses the Oil Shell?

                                                                                                  Who uses a less than a year old shell that explicitly isn’t for public use yet? I’m hoping very few people.

                                                                                                  What does the number of Oil Shell users have to do with his argument?

                                                                                            2. 7

                                                                                              Err. Last time I touched autotools it was a crawling horror.

                                                                                              Makefiles are fine. Just don’t write ones that call other makefiles (recursive make considered harmful and all that).

                                                                                              1. 3

                                                                                                Just don’t write ones that call other makefiles (recursive make considered harmful and all that).

                                                                                                Clearly someone needs to write “Make: The Good Parts” 😂

                                                                                                1. 2

                                                                                                  Isn’t non-recursive make also considered harmful?

                                                                                                  1. 2

                                                                                                    I think the ideal is a makefile that includes parts from all over your source tree, so that there’s one virtual Makefile (no recursive make invocation O(n^2) issues) but changes can be made locally. Best of both worlds!

                                                                                                2. 5

                                                                                                  I’m no expert on Make or Autotools, but my response to building automation on top of an automation tool is: “Please, god, no!”

                                                                                                  If your automation tool lacks the expressiveness to automate the problem your solving, the solution should never be to bolt another automation tool on top of it. It’s time to start over.

                                                                                                  1. 2

                                                                                                    I’m going to take a guess that you’re not a DevOps engineer.

                                                                                                    1. 1

                                                                                                      “Lets just use another layer of automation!” is the DevOps version of solving every problem with another layer of indirection clearly! :)

                                                                                                    2. 1

                                                                                                      But why not? One tool (cmake, meson) checks dependencies and works on high-level concepts such as “binary”, “library”. Other tool (make, ninja) is low-level and operates on building individual files. It’s sane separation of concerns.

                                                                                                      Make, however, tries to be high-level (at least GNU make, it even has built-in Scheme), but not enough high-level and it might be better at low level (that’s why ninja was invented).

                                                                                                      Monolith build tools like Bazel might better handle invalidation but this class of tools is not explored enough (existing tools are designed for specific Google/Facebook’s use cases).

                                                                                                    3. [Comment removed by author]

                                                                                                      1. 3

                                                                                                        Autotools is terrible.

                                                                                                        Yes, but all the alternatives are worse.

                                                                                                      2. 1

                                                                                                        Disagree

                                                                                                        https://varnish-cache.org/docs/2.1/phk/autocrap.html

                                                                                                        And look how complicated this configure script is which doesn’t take 60 seconds to run:

                                                                                                        https://github.com/bsdphk/Ntimed/blob/master/configure

                                                                                                      1. 4

                                                                                                        i don’t want to mean, but if the author made any worthwhile points, i was unable to tell.

                                                                                                        Therefore, I must humbly ask my prospective reader for a certain moderation when they feel it necessary to pass a harsh judgement on the many errors, lacks and other troubles of the text. Assuming that a large number of medium.com readers are at least as concerned about and as perplexed by the issue as myself, I had to put fast delivery before academic perfection.

                                                                                                        is he trolling? he couldn’t take the time to edit his piece because it was so urgent to get out to his readers; meanwhile, his reader will be spending well over the expected 19 minutes trying to decipher his horrible prose. i’m sure the author has good intentions, but this suggests a real self-importance and disregard for his reader’s time. someone get him a copy of strunk & white.

                                                                                                        1. 3

                                                                                                          Honestly, I recommend being mean when you see lines like this:

                                                                                                          You may have correctly guessed that this story will be, to a great extent, a boring analytical piece of writing.

                                                                                                          Or this…

                                                                                                          Yet today, surely all participants of the debate would agree with me, to define a correct domain for a proper and productive discussion of those issues is of utmost importance for the future of humankind.

                                                                                                          Rhetorical masturbation, like the more traditional sort, shouldn’t be done in public.

                                                                                                        1. 10

                                                                                                          This topic touches a nerve for me, after iOS 7 made the iPhone 4 so laggy that I felt that I had no alternative but to recycled it.

                                                                                                          Apple could probably silence the critics with an iOS notification to tell users the state of their battery when the CPU starts to throttle due to battery issues. Though I would not place a bet on Apple doing that.

                                                                                                          Fingers crossed that Microsoft’s alleged Andromeda device, and the Librem 5 device from Purism, can inject some fresh ideas into the market. The current mobile market needs a good shake-up.

                                                                                                          1. 12

                                                                                                            Fingers crossed that Microsoft’s alleged Andromeda device, and the Librem 5 device from Purism, can inject some fresh ideas into the market. The current mobile market needs a good shake-up.

                                                                                                            I doubt people are willing to trust Microsoft again after they had backstabbed Windows Phone 8 users with lack of WM10 upgrades, and the WM10 users getting sunsetted, in a long line of backstabs of Windows Mobile users from them; and I severely doubt the Librem 5 will do much better than the FreeRunner, let alone N900, did. Unfortunate, but it’s based on precedent.

                                                                                                            I think MS and others are waiting for the theoretical future form factor that will obsolete or at least put a dent into smartphone sales; the existing market is too entrenched, but a new one is fertile. The problem is guessing what’s going to actually take off.

                                                                                                            1. 1

                                                                                                              Honestly, if Apple started popping up notifications that say, “Your battery is old, and we had to slow the phone down,” they’d be ragged on for telling people to buy a new phone.

                                                                                                              1. 1

                                                                                                                Well my Parent’s Macbook Air is saying the battery “Needs Servicing” so it’s not like they aren’t warning their computer users…