this post was submitted on 20 Nov 2025
158 points (100.0% liked)

Chapotraphouse

14333 readers
734 users here now

Banned? DM Wmill to appeal.

No anti-nautilism posts. See: Eco-fascism Primer

Slop posts go in c/slop. Don't post low-hanging fruit here.

founded 5 years ago
MODERATORS
 
top 24 comments
sorted by: hot top controversial new old
[–] chgxvjh@hexbear.net 42 points 4 months ago* (last edited 4 months ago) (1 children)

It's pretty good but I feel like it minimizes the sheer amount of unpaid work by foss developers.

Realistically there is small and large foss blocks all over the structure and many of them in positions where their absense could lead to a partial or total collapse.

[–] sexywheat@hexbear.net 25 points 4 months ago (1 children)

A few years ago wasn’t there a single open source project that got abandoned by its dev and it crippled the entire web?

[–] thethirdgracchi@hexbear.net 29 points 4 months ago (1 children)

You're thinking of https://en.wikipedia.org/wiki/Npm_left-pad_incident probably, where a single dev removed his like 11 line package of code that just adding padding to text and broke half the internet, yeah.

[–] chgxvjh@hexbear.net 24 points 4 months ago (1 children)

I still can remember tech bros writing blogs about how putting every function in a separate package is a really good idea. And how it's silly to implement it yourself.

[–] lib1@hexbear.net 14 points 4 months ago* (last edited 4 months ago) (1 children)

Kevlin Henney did a presentation which included a code review of the left pad package. Several of his unit tests failed.

The code in question wasn’t particularly well written or anything

module.exports = leftpad;

function leftpad (str, len, ch) {
    str = String(str);

    var i = -1;

    ch || (ch = ' ');
    len = len - str.length;


    while (++i < len) {
        str = ch + str;
    }

    return str;
}

::: spoiler And this is the package that it was replaced with. It also failed several tests

'use strict';
module.exports = leftPad;

var cache = [
  '',
  ' ',
  '  ',
  '   ',
  '    ',
  '     ',
  '      ',
  '       ',
  '        ',
  '         '
];

function leftPad (str, len, ch) {
  // convert `str` to a `string`
  str = str + '';
  // `len` is the `pad`'s length now
  len = len - str.length;
  // doesn't need to pad
  if (len <= 0) return str;
  // `ch` defaults to `' '`
  if (!ch && ch !== 0) ch = ' ';
  // convert `ch` to a `string` cuz it could be a number
  ch = ch + '';
  // cache common use cases
  if (ch === ' ' && len < 10) return cache[len] + str;
  // `pad` starts with an empty string
  var pad = '';
  // loop
  while (true) {
    // add `ch` to `pad` if `len` is odd
    if (len & 1) pad += ch;
    // divide `len` by 2, ditch the remainder
    len >>= 1;
    // "double" the `ch` so this operation count grows logarithmically on `len`
    // each time `ch` is "doubled", the `len` would need to be "doubled" too
    // similar to finding a value in binary search tree, hence O(log(n))
    if (len) ch += ch;
    // `len` is 0, exit the loop
    else break;
  }
  // pad `str`!
  return pad + str;
}
[–] chgxvjh@hexbear.net 19 points 4 months ago (3 children)

Not really caring about things working correctly didn't start with LLM coding assistants/agents. Outside of a few industries programming never was a serious engineering discipline and people mostly rejected the idea that it should be one.

[–] SwitchyandWitchy@hexbear.net 12 points 4 months ago* (last edited 4 months ago) (1 children)

brogrammers rejected it. Nerds like Margaret Hamilton stood on principle

This caption is misleading btw. She never worked directly for NASA, she worked at MIT who were contracted by NASA for the software.

I also know people who have worked in nuclear energy and aviation software and they are really serious about not taking shortcuts. And regularly complain about higher ups saying things and occasionally pressuring them against industry standards in the name of speeding things up.

[–] PorkrollPosadist@hexbear.net 5 points 4 months ago (1 children)

The only thing I know about software engineering in aviation is that they don't even fuck with dynamic memory allocation. They are not fucking around.

[–] SwitchyandWitchy@hexbear.net 3 points 4 months ago

For some of the really flight critical stuff that I picked their brains on, the on-cpu cache was disabled because using it would make deterministally analyzing the executive time too difficult. There also wasn't a pre-emptive multitasking scheduler but instead every task would run during a scheduled time slot in a big superloop.

All of this caution actually made the software a lot more primitive than the software that Margaret Hamilton led the development of for the Apollo program, but these days cpu cycles and memory are a lot cheaper than the engineering time to implement all these things in a safe way, or so they said.

[–] SoyViking@hexbear.net 11 points 4 months ago

Clients want new shiny features and they want them fast and they want them cheap and they want to change their scope 20 things during the project. They do not want to pay for boring unit tests that confirms that the system works.

[–] Blep@hexbear.net 10 points 4 months ago

Academics wanted it to be math.

[–] SwitchyandWitchy@hexbear.net 32 points 4 months ago* (last edited 4 months ago) (3 children)

I think the arrow around the handle of the ai wedge handle is drawn backwards. It looks like it's un-tipping the infrastructure.

[–] SwitchyandWitchy@hexbear.net 31 points 4 months ago
[–] SootySootySoot@hexbear.net 7 points 4 months ago (1 children)

Actually top notch observation xi-clap

[–] RNAi@hexbear.net 5 points 4 months ago (1 children)

We have the best peoplewhofocusonverytinydetails dom't we folks a-little-trolling

[–] culpritus@hexbear.net 19 points 4 months ago (2 children)

What is the picture at the very bottom that is mostly cropped out? Some creature chewing on a rope?

[–] SockOlm@hexbear.net 41 points 4 months ago (4 children)

looks like a shark eating the internet cable https://youtu.be/1ex7uTQf4bQ

[–] kleeon@hexbear.net 28 points 4 months ago

support the troops

[–] Owl@hexbear.net 22 points 4 months ago

For anybody not in the know - they have to put extra shielding on internet cables lying at depths sharks can reach, because sharks just love chewing on them.

[–] HexReplyBot@hexbear.net 2 points 4 months ago

I found a YouTube link in your comment. Here are links to the same video on alternative frontends that protect your privacy:

[–] RNAi@hexbear.net 7 points 4 months ago