Logo
Talk is cheap. Show me the code.
  • 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

Portable-code Memes

Posts tagged with Portable-code

Architecture Dependent Chars

C++ Programming Hardware
7 hours ago 9.4M views 0 shares
Architecture Dependent Chars
Picture a bell curve where the vast majority of developers confidently proclaim "one char equals one byte!" because they've only ever coded on systems where that's true. Meanwhile, the galaxy-brain developers on both ends are sweating bullets using sizeof(char) because they've been traumatized by the fact that char size can technically be architecture-dependent in C/C++. Sure, the C standard guarantees sizeof(char) is always 1... but 1 what? One byte! And how big is a byte? Well, that's where things get spicy—it's typically 8 bits, but the standard only requires it to be at least 8 bits. Some exotic architectures have had 9-bit, 16-bit, or even 32-bit "bytes." So while Mr. Confident in the middle is technically right 99.9% of the time, the paranoid devs writing portable code for embedded systems or ancient hardware are out here future-proofing like their lives depend on it.

Today's picks

Oh Boy

Oh Boy

Debugging
195.5M views 2 days ago
Funny Programming Quote Gift Programmer T-Shirt

Funny Programming Quote Gift Programmer T-Shirt

Affiliate
$15.29
NordVPN

NordVPN

Sponsored
VPN