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
Assignment vs comparison Memes
Posts tagged with Assignment vs comparison
The Single Equal Sign Of Doom
Programming
Debugging
Javascript
Security
Backend
10 months ago
461.1K views
0 shares
That feeling when you realize your production server is granting admin access to literally everyone because you used = (assignment) instead of == (comparison) in your if statement. Fun fact: This single character mistake is why some senior devs wake up in cold sweats at 2AM. The code if (user = admin) doesn't check if user equals admin - it assigns admin to user, then evaluates to true because admin is truthy. Congrats, you just made everyone a superuser!
Today's picks
Windows User And Linux User
Linux
121.2M views
19 days ago
Do Not Falter Now, Brothers!
Python
511.8K views
4 months ago
NordVPN
Sponsored
VPN