Logo
Konami Code: The original cheat 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

Lexicographical sorting Memes

Posts tagged with Lexicographical sorting

The Sort Of Surprise Every JavaScript Developer Deserves

Javascript Frontend Webdev Programming Debugging
1 year ago 307.8K views 0 shares
The Sort Of Surprise Every JavaScript Developer Deserves
Innocent newbie: "I'll just use array.sort() to sort these numbers!" JavaScript: *sorts lexicographically* "Did I stutter?" Nothing says "welcome to JavaScript" quite like discovering your numbers are being sorted as strings. That moment when you realize you need array.sort((a,b) => a-b) and question all your life choices that led you to web development. It's basically JavaScript's hazing ritual - "Oh, you thought programming would make sense? That's adorable."

Self-Proclaimed ML Engineer Discovers How Strings Work

Python Programming Debugging Algorithms AI
1 year ago 399.8K views 0 shares
Self-Proclaimed ML Engineer Discovers How Strings Work
Behold, the "ML Engineer" who discovered that Python sorts strings alphabetically instead of numerically! The horror! Next breaking news: water is wet. What we're witnessing here is the classic "I didn't read the docs but it's definitely the language's fault" syndrome. Python's sorted() is working perfectly—it's sorting ["9%", "83%", "25%"] as strings, exactly as it should when you give it strings. Pro tip for our aspiring "ML Engineer": try sorted([int(x.strip('%')) for x in a]) next time. Or maybe stick to Excel?

Today's picks

QTL Programming Stickers for Developers Program Party Supplies Waterproof Vinyl Stickers for Water Bottle Laptop 50Pcs

QTL Programming Stickers for Developers Program Party Supplies Waterproof Vinyl Stickers for Water Bottle Laptop 50Pcs

Affiliate
$5.99
That's What Programmers Know About Languages

That's What Programmers Know About Languages

Java
339.9K views 1 year ago
"I am in. Home directory"

"I am in. Home directory"

Linux
73.2K views 3 years ago