Menu
It compiles! Ship 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
547.6K 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
324.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
Redragon K686 PRO SE 98 Keys Wireless Gasket RGB Gaming Keyboard, 3-Mode Anime Mechanical Keyboard w/Hot-Swap Socket, Dedicated Knob Control & 5-Layer Noise Dampening, Custom Hi-Fi Linear Switch
Affiliate
$74.99
welcome to snackoverflow
Programming
150.2K views
5 years ago
NordVPN
Sponsored
VPN