Logo
Konami Code: The original cheat code.
  • Home
  • Hot
  • Random
  • Search

Browse

  • AI AI
  • AWS AWS
  • Agile Agile
  • Algorithms Algorithms
  • Android Android
  • Apple Apple
  • Backend Backend
  • Bash Bash
  • C++ C++
  • Cloud Cloud
  • Csharp Csharp
  • All Categories

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

Realloc Memes

Posts tagged with Realloc

Possibly The Worst Way To Read A File In C

Programming Debugging C++ Algorithms
23 days ago 73.6K views 0 shares
Possibly The Worst Way To Read A File In C
This code is the programming equivalent of filling a bathtub one teaspoon at a time while expanding the bathtub after each spoon. ๐Ÿ˜ฑ Instead of reading the file in chunks or pre-allocating memory, this monster allocates exactly ONE byte, reads ONE character, reallocates the ENTIRE array, and repeats for EVERY SINGLE CHARACTER. The malloc/realloc combo is basically begging the memory manager to have a nervous breakdown. The performance would be so catastrophically bad that you could probably go make a sandwich between reading "Hello" and "World". It's like watching someone solve a maze by rebuilding the entire universe after each step.

Spotlight

Portable Power Station

GearScouts.com

Stop scrolling, start exploring! Find the gear that'll get you off the couch and into the wild. Compare power stations for off-grid adventures, flashlights for midnight hikes, and essentials that make the outdoors your playground. Get Outside โ†’

Ad The Signal Rescuer

For when your router is as unreliable as untested code
TP-Link WiFi Extender | ProgrammerHumor.io
Buy = You get cool gear + we can finally afford proper documentation instead of just comments. ๐Ÿ“–