Logo
DNS: The internet's phone book, but slower.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Azure Azure
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • All Categories
As an Amazon Associate ProgrammerHumor.io earns from qualifying purchases.

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

HTTP 418: I'm a teapot

The server identifies as a teapot now and is on a tea break, brb

Close-enough Memes

Posts tagged with Close-enough

Actual Code In The Linux Kernel

Linux Programming
6 months ago 439.0K views 1 shares
Actual Code In The Linux Kernel
Someone actually committed a function called myisspace() to the Linux kernel that checks if a character is a space by comparing it to... the letter 'j'. And the comment? "Close enough approximation." In a codebase that powers billions of devices worldwide, where every line is scrutinized by some of the most brilliant engineers on the planet, someone decided that 'j' is basically a space character. The ASCII value of 'j' is 106, while space is 32. That's not even close! But hey, it's for a "simple command-line parser for early boot" so I guess standards are optional when your OS is still rubbing the sleep out of its eyes. The beauty here is imagining the code review: "Yeah, just use 'j' instead of ' ' (space). Ship it." This is either galaxy-brain optimization or someone's Friday afternoon commit that somehow made it through. Either way, it's living rent-free in one of the most important codebases in computing history.

Today's picks

Where's The Love

Where's The Love

Programming
149.4M views 6 days ago
Samsung T7 500GB, Portable SSD, up to 1050MB/s, USB 3.2 Gen2, Gaming, Students, & Professionals, External Solid State Drive (MU-PC2T0R/AM), Red

Samsung T7 500GB, Portable SSD, up to 1050MB/s, USB 3.2 Gen2, Gaming, Students, & Professionals, External Solid State Drive (MU-PC2T0R/AM), Red

Affiliate
$164.99
C Is Faster If You Just Ask It Nicely To Run Python

C Is Faster If You Just Ask It Nicely To Run Python

C++
621.8K views 1 year ago