Skip to content
DevMeme
6166 of 7590
CS Fundamentals Post #6761 · source on Telegram

The Big-Endian Debate: Why the 'End' Comes First

Description

A 'Soyjak vs. Chad' meme format explaining the computer science concept of endianness. On the left, a crying Wojak character labeled 'Every sane person' shouts, 'Nooooo 'end' is what comes last'. On the right, a calm, smiling black-and-white photo of computer scientist Danny Cohen is labeled 'Danny Cohen' and says, 'Haha big end go first'. In the center, a diagram illustrates the concept using an egg (with a 'big end' and 'little end') and a memory layout showing that in big-endian format, the Most Significant Byte (MSB) is stored first at the lowest memory address. The joke satirizes the counter-intuitive naming convention of 'big-endian,' where the 'big end' of a number is stored first, a concept formalized by Danny Cohen. He famously borrowed the term from Jonathan Swift's 'Gulliver's Travels' to describe the pointless 'holy wars' over byte order, a nuance that adds another layer of humor for those familiar with tech history

Comments

24
Anonymous ★ Top Pick The main difference between big-endian and little-endian is the order in which you get unexpected results. One reads your integer as 5, and the other reads it as 83,886,080. Both are wrong because you forgot to account for network byte order
  1. Anonymous ★ Top Pick

    The main difference between big-endian and little-endian is the order in which you get unexpected results. One reads your integer as 5, and the other reads it as 83,886,080. Both are wrong because you forgot to account for network byte order

  2. Anonymous

    Sure, little-endian CPUs might dominate the datacenter, but DNS packets are still sending a love letter to Danny Cohen on every UDP port 53

  3. Anonymous

    After 40+ years in the industry, you realize the real endianness war isn't between big and little - it's between those who've debugged network protocol implementations at 3am and those who think byte order is just a theoretical concern until their perfectly working x86 code mysteriously corrupts data on ARM

  4. Anonymous

    Danny Cohen's 1980 paper settled the endianness debate the same way most architecture decisions are made: by ensuring both sides would argue about it for the next 40+ years. The real joke? We're still writing ntohl() and htonl() wrappers because someone thought 'network byte order' was a compromise. At least when your struct padding is wrong, you can blame it on the egg

  5. Anonymous

    The protocol that “just memcpy’s the struct” works great - until a big‑endian box joins the fleet and your checksum becomes modern art; use htons()/ntohl

  6. Anonymous

    Byte order is the architecture decision you feel only in production - without htonl()/ntohl, 0x06C1 becomes 0xC106 and your postmortem reads ‘authentication broke because the wire speaks Gulliver.’

  7. Anonymous

    Danny Cohen coined 'endian' so we'd politely name our cross-platform serialization nightmares

  8. @Loner_feed 1y

    Need explanation

    1. @kddpq 1y

      https://en.m.wikipedia.org/wiki/Endianness The joke is about the universally confusing terms "big endian" and "little endian". big endian=most significant byte appears first little endian=opposite

      1. @anilakar 1y

        Could be worse. My boss, his brother and a coworker wrote a book and not only got it wrong but also mixed up bit and byte order. I pointed this out, and somehow it also slipped past the editor at Make.They're DSc(Tech), PhD and BSc(Tech).

      2. @Loner_feed 1y

        Thanks!

  9. @Algoinde 1y

    Just sort all the bits before reading. Interoperability!

  10. @kddpq 1y

    literally me

  11. _ 1y

    I mean there can be two end but there's only one start. But you're still interested into what comes first, so we ask which end come first

  12. Е.Х. я 1y

    That makes pilots (at least one instructor pilot) "not sane" ... while approaching the runway for landing when he confused me by saying "see those lights at the end of the runway" he was referring to the "NEAR end" where the landing "starts" for a sane person, not the FAR end. Maybe he was a programmer as well as a pilot.

    1. @Algoinde 1y

      I always thought the end of the runway is where the landing ends and the takeoff ends, but I guess it's always the takeoff end for no ambiguity for ATC comms and such?

      1. Е.Х. я 1y

        No idea, i am neither a pilot nor know how ATC works, I just took 2 lessons for fun (or so I thought it would be).

        1. @Algoinde 1y

          apparently he was not being specific enough

          1. Е.Х. я 1y

            Possibly he did not bother being specific for someone who is there just for fun and does not plan to make use of this knowledge, and even if he used proper jargon i'd likely not understand anyway. But i felt stupid looking for light where there were none.

    2. _ 1y

      In French we have two words for "end": "fin" is the opposite of the start, while "bout" is where is stops in any direction

      1. @RiedleroD 1y

        in German we just say the equivalent of "side" (end works too, but is rarely used outside books and pretentious speech)

  13. Е.Х. я 1y

    So does Russian language, has words specific to the purpose. In English we commonly add more words to narrow the meaning of other words. So we just need french Big-Bout-ian and Little-Bout-ian byte order ?? :)

    1. _ 1y

      "gros-boutien" and "petit-boutien" is how it's called, but everybody use the english words

      1. Е.Х. я 1y

        English is like the lowest common denominator, common, but lowest :)

Use J and K for navigation