Logo
The first computer password was 'password'.
  • 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

Uninitialized-variables Memes

Posts tagged with Uninitialized-variables

Using Garbage Values To Generate Pseudorandom Numbers

C++ Programming Debugging Algorithms
20 days ago 116.2M views 0 shares
Using Garbage Values To Generate Pseudorandom Numbers
Oh honey, someone just discovered the ancient forbidden art of using uninitialized variables as a random number generator! Declaring an `unsigned` variable without giving it a value, then casting that beautiful pile of memory garbage to a double and dividing by UINT_MAX? *Chef's kiss* 💋 This is the programming equivalent of reaching into a mystery box and hoping you don't pull out a cursed artifact. Sure, you'll get SOME number between 0.0 and 1.0... but will it be random? Will it be the same every time? Will it summon demons? Who knows! The variable could contain literally anything that was sitting in that memory address before—leftover pizza orders, your ex's phone number, or the meaning of life. Undefined behavior never looked so confident. This function returns with the swagger of someone who just used duct tape to fix a spaceship. Technically genius, practically terrifying, and absolutely NOT what your CS professor had in mind when teaching you about random number generation. 🎲

Today's picks

UPLIFT DESK V3 2-Leg White Laminate Wood Standing Desk – Adjustable Height, Advanced 1-Touch Memory Keypad, Under Desk Cable Management, Wire Grommets & Rocker Board (Black C-Frame, 48 x 30 inch)

UPLIFT DESK V3 2-Leg White Laminate Wood Standing Desk – Adjustable Height, Advanced 1-Touch Memory Keypad, Under Desk Cable Management, Wire Grommets & Rocker Board (Black C-Frame, 48 x 30 inch)

Affiliate
$718.00
How do I compile a php file?

How do I compile a php file?

Programming
172.1K views 5 years ago
Branch Naming

Branch Naming

Programming
96.4K views 1 year ago