Menu
My code doesn't work, I have no idea why. My code works, I have no idea why.
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
Ternary operator Memes
Posts tagged with Ternary operator
I 18 N Not Needed
Frontend
Webdev
Javascript
Programming
Typescript
8 days ago
87.2M views
0 shares
Classic move right here. Someone hardcoded the ternary operator display text directly into the UI instead of using proper i18n (internationalization) keys. So now users in Germany are staring at "Save" or "d" when the media is saved, and everyone's wondering what the hell "d" means in their language. Spoiler alert: it means nothing. The beauty of this is that some dev thought "we're only launching in English-speaking markets" and then three months later the PM announces expansion to 47 countries. Now you get to grep through thousands of files finding every hardcoded string while questioning your life choices. Pro tip: i18n isn't just for translation—it's for when you realize "d" made perfect sense at 2 AM but means absolutely nothing to anyone else, including your future self.
It's Just A Little Helper Why Do You Treat It Like Satan Himself
Kotlin
Python
Programming
1 month ago
64.2M views
0 shares
Most languages make you write out the full ternary operator like a responsible adult: condition ? exprIfTrue : exprIfFalse . But Kotlin and Python? They looked at that and said "nah, too verbose" and gave us the Elvis operator and inline if expressions that let you skip the false case entirely. Python's value if condition else default and Kotlin's value ?: default are genuinely useful for null-coalescing and default values. But the programming community treats them like they just committed a war crime against readability. Meanwhile, these same developers will nest 7 levels of callbacks and call it "clean code." The smug anime character face is exactly how Kotlin and Python devs feel when they write name ?: "Anonymous" while their Java colleagues are still typing out name != null ? name : "Anonymous" like it's 1995.
This Is Quite Powerful
Programming
Javascript
Typescript
C++
Java
9 months ago
580.6K views
1 shares
When you discover the ternary operator and suddenly feel like you've unlocked forbidden knowledge. Pooh goes from peasant to aristocrat just by condensing 5 lines into one elegant expression. The real power move is when you start nesting these bad boys three levels deep and your code reviewer needs a PhD in abstract syntax trees to decipher what you've written. Nothing says "I'm a sophisticated developer" quite like turning perfectly readable code into a cryptic one-liner that makes junior devs question their career choices. Pro tip: The ternary operator is great until you need to debug it at 3 AM and realize you've created a monster. But hey, at least you saved 4 lines of code, right?
This Is Quite Powerful
Programming
Javascript
C++
Java
Csharp
10 months ago
563.8K views
0 shares
When you discover the ternary operator exists and suddenly feel like you've ascended to a higher plane of programming consciousness. Six lines of pedestrian if-else logic? Nah. One elegant line that makes you feel like you're wearing a tuxedo while coding? Absolutely. Sure, both do the exact same thing, but one makes you look sophisticated at code reviews. The other makes you look like you just finished a "Programming 101" course. We all know which one you're picking. Just wait until you nest three of these bad boys together and your coworkers need a PhD to decipher what you wrote. Peak elegance.
WESILY Pack 50 PCS Hacker Stickers Cool Coding Aesthetic Vinyl Decals Waterproof Sticker Decor Laptop Water Bottle Computer Phone Cup Guitar Scrapbooking for Hackers Geeks Coders Programmers
Affiliate
Stickers
WESILY
Perfect Gifts: Our sticker pack is suitable for all ages - kids, teens, adults, girls, and boys. These stickers make great gifts for friends, family, and coworkers on Christmas, New Year's Day, Hallo…
The Tuxedo Ternary Transformation
Programming
Javascript
Typescript
C++
Java
1 year ago
670.9K views
0 shares
OMG, the AUDACITY of developers who think they're sooooo clever turning a perfectly respectable if-else statement into that one-liner ternary abomination! 💅 Look at Fancy Pooh in his tuxedo thinking he's ROYALTY because he saved three whole lines of code! Meanwhile, the rest of us peasants have to decipher your "elegant" syntax during code reviews. I'm literally DYING at how we all pretend this makes us sophisticated when we're just trying to impress each other with code golf! 🙄
The Virgin If-Else vs The Chad Ternary Operator
Programming
Debugging
Java
Javascript
1 year ago
532.4K views
0 shares
The virgin 6-line if-else statement vs the chad one-liner ternary operator. Nothing says "I'm a coding sophisticate" like condensing a perfectly readable conditional into a cryptic single line that makes future maintainers question their career choices. The sunglasses really sell it - "Look at me, I just saved 5 whole lines and only sacrificed the entire team's sanity." Next up: replacing all your variable names with single letters to achieve true programming enlightenment.
This Is Very Strong Indeed
Programming
Javascript
Typescript
C++
Java
1 year ago
592.8K views
2 shares
Regular Pooh: Writing out a full if-else block like some kind of verbose peasant. Tuxedo Pooh: Using the ternary operator like the sophisticated one-liner aristocrat you are. Why waste time write lot code when few code do trick?
Trying To Be Cute But We're Both Programmers
Programming
Javascript
Java
Python
Typescript
1 year ago
434.0K views
0 shares
What happens when flirting collides with programming logic. The blue texter drops a "ternary operation" joke about what appears to be a picture, and suddenly they're both speaking the sacred language of code nerds. For the uninitiated, a ternary operation is a conditional expression that takes the form condition ? value_if_true : value_if_false — which explains why they're both typing "really ? 😢 : [some emoji]" afterward. Nothing says romance like finding someone who gets your obscure syntax jokes and responds with matching code format. These two deserve each other in the most beautiful, nerdy way possible.
Perfect Relationship: Conditionally Rendered
Programming
Javascript
Typescript
Csharp
1 year ago
368.6K views
0 shares
When your crush finally gets your programming jokes! The pinnacle of romance in 2024 - finding someone who not only tolerates your ternary operator references but actually responds with proper syntax enthusiasm. Finding a partner who understands the difference between ?: and ? : spacing is rarer than bug-free code on the first commit. The "we're so synced" message is basically the equivalent of discovering you both use the same code formatter without fighting about it. True love isn't dead, it's just conditionally rendered.
Return Statement Evolution
Programming
Javascript
Java
Csharp
Python
1 year ago
611.3K views
0 shares
The evolution of every developer's coding style! At first, you write verbose conditional blocks like some kind of coding newbie. Then one day, you discover the ternary operator and suddenly you're wearing sunglasses because you're just that cool. Why waste 6 lines checking if a == 0 when you can flex on everyone with return (a == 0) ? true : false; ? Of course, the truly enlightened would just write return a == 0; but that wouldn't make for such a sassy Pikachu meme, would it?
VIVO Black 36 in Standing Desk Converter, DESK-V036KB
Affiliate
Tech Gadgets
VIVO
Create Instant Active Standing: VIVO’s desk riser provides on-demand standing throughout the day for the freedom to get out of your chair and relieve muscle tension, reduce stress, and increase produ…
Modern Programming: When Simple Tasks Require Interdimensional Travel
Python
Javascript
Programming
Webdev
1 year ago
367.6K views
0 shares
Programmer 1: *writes simple ternary operator to check if a number is odd or even* Random person: "gator hugger" Programmer 2: "That's JS's ternary operator, python works differently." Programmer 1: *creates unholy abomination that calls JavaScript from Python just to use a ternary operator* This is the equivalent of driving to another country because you prefer their traffic lights. Modern programming is just finding increasingly complex ways to avoid learning syntax differences.
The Redundancy Department Of Redundancy
Debugging
Javascript
Programming
Java
Csharp
1 year ago
464.0K views
0 shares
First frame: Seeing a ternary operator with an empty string fallback. Second frame: Realizing they wrapped it in a try-catch block that does exactly the same thing if it fails. That face when you discover someone wrote defensive code against their defensive code. It's like wearing a life jacket while sitting inside a lifeboat... that's inside another lifeboat. The redundancy is so beautifully pointless it's almost art.
Loading more content...
Today's picks
Bose QuietComfort Headphones (2nd Gen) - Wireless Headphones, Active Over Ear Noise Cancelling and Mic, Immersive Audio, USB-C Charging and Lossless Audio, Up to 24 Hours of Play time, Black
Affiliate
$319.00
"Unreachable code block."
Programming
111.7K views
3 years ago
when reading a programming book
Programming
92.4K views
4 years ago