Menu
Build time: When coffee becomes code.
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
Parseint Memes
Posts tagged with Parseint
The Magic Number Of Zeroes
Javascript
Frontend
Webdev
Programming
Debugging
1 year ago
344.0K views
0 shares
JavaScript's parseInt() function is like that one coworker who ignores all your emails until you add exactly seven zeroes after the decimal point. The function stubbornly returns 0 for every decimal value, until suddenly—at 0.0000005—it decides "Oh, I see a 5 now!" and returns 5. It's like watching someone squint harder and harder at tiny text until they finally give up and just read whatever letter they think they see. The floating point precision gods have spoken, and they've chosen chaos.
Someone Explain This To Me Like Im Five
Javascript
Debugging
Programming
Webdev
Frontend
1 year ago
337.0K views
0 shares
JavaScript's parseInt function just decided that 0.0000005 equals 5 because scientific notation turned it into "5e-7" and parseInt grabbed just the "5" like a toddler picking only the M&Ms out of trail mix. Six decimal places? Nah, too much work. Five? Still zero. Seven? BOOM, suddenly 5. It's like JavaScript was programmed by someone rolling dice to determine behavior. No wonder developers drink.
JavaScript's Type Conversion: A Horror Story
Javascript
Webdev
Frontend
Debugging
Programming
1 year ago
355.7K views
0 shares
JavaScript's type conversion is like that friend who's confident but wrong about everything. Empty string? That's clearly 0! "07foo"? Obviously 7! And my personal favorite: a tiny decimal like 0.0000005 somehow becomes 5, because who needs those pesky zeros anyway? The best part is how parseInt() and Number() can't even agree with each other. One sees scientific notation, the other just sees numbers to ignore. It's like watching two drunk mathematicians argue about how to split the bill. This is why JavaScript developers drink.
Showing My Friend My Foolproof Parse Int Method
Javascript
Programming
Frontend
Debugging
1 year ago
275.9K views
0 shares
The eternal struggle between doing things right and doing things that work. Instead of using parseInt() or Number() like a civilized developer, this mad genius is just removing the quotation marks with replaceAll() to convert a string to a number. It's the coding equivalent of using a hammer to screw in a lightbulb - horrifying yet somehow it works. The face on the left is every senior dev witnessing this crime against programming humanity, while the face on the right is the junior who's just proud they "solved" the problem without reading the docs.
Lian Li A4-H2OX5 Mini-ITX PC Case, Triple-Slot Mount GPU, Aluminum Exterior & SPCC Steel Interior, 240mm AIO, SFX Sandwich Layout, PCIe 5.0, Supports SFX/SFX-L PSU - A4H2OX5 Black
Affiliate
Home Lab
Lian Li
Compact 11-Liter Design: The A4-H2O is one of the smallest cases on the market at just 11 liters, yet it supports a triple-slot GPU and accommodates 240mm AIO water cooling, striking the perfect bala…
Today's picks
LG 34U530A-W 34-inch UltraWide WFHD (2560 x 1080) IPS Wide Computer Monitor, 100Hz, VESA DisplayHDR 400, HDMI, DisplayPort, USB Type-C, Tilt/Height/Swivel Stand, White
Affiliate
$299.38
GearScouts.com
Sponsored
Power stations
Ctrl+C: The Silent Developer Killer
Linux
399.3K views
9 months ago