Menu
Code for the psychopath who'll maintain it.
Home
Hot
Random
Search
Browse
AI
AWS
Agile
Algorithms
Android
Apple
Azure
Backend
Bash
C++
Cloud
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
Map Memes
Posts tagged with Map
Keep It Simple Stupid
Javascript
Programming
Webdev
Frontend
1 year ago
525.9K views
0 shares
The AUDACITY of JavaScript developers to create an entire UNIVERSE just to print numbers 0-15! Look at that top code—creating an array, filling it, mapping it, and THEN forEach-ing it?! HONEY, WHY?! Meanwhile, the humble for loop at the bottom is sitting there like "I've been doing this since 1995, darling." This is the programming equivalent of using a rocket launcher to kill a spider. I can't even! 💅
Developer Said The Map Had O(0) Complexity And A Simple If-Else Would Have O(2) Complexity...
Algorithms
Programming
Debugging
1 year ago
316.8K views
0 shares
Oh, the mythical O(0) complexity! This is like claiming your code runs before you even write it. And O(2)? I guess that's twice as fast as O(1) and half as fast as O(4)? 🤦♂️ What we're seeing here is a beautiful map lookup with constant time complexity - that's O(1) for those keeping score at home. Meanwhile, our "complexity expert" is probably the same person who thinks adding more if-statements makes the code run faster because "the computer has more options to choose from." Next week: the same developer discovers the revolutionary O(-1) algorithm that finishes before it starts!
Today's picks
Cable Matters 20Gbps USB C KVM Switch, 3-in-1-Out, 140W PD Charging | 8K@30Hz on Windows, 4K@60Hz on macOS, Shares USB-C/Thunderbolt 4 Monitor or Dock, Not for Captive Cable Docks/Adapters
Affiliate
$67.99
You Are Doomed
StackOverflow
398.0K views
1 year ago
NordVPN
Sponsored
VPN