JavaScript Is Broken

4 pointsposted 8 hours ago
by thunderbong

6 Comments

wryoak

7 hours ago

> over two years experience

> countless hours debugging

Did you forget to supply a radix to parseInt when calculating this?

BeetleB

7 hours ago

(Medium Account needed to read the post).

hluska

7 hours ago

Based on what I read, I don’t like the title much. JavaScript (like any tool) has to be used correctly.

It would be like the time I almost electrocuted myself. I could have claimed that electricity was broken but I’m just very stupid at times when I need to be very smart.

atmavatar

6 hours ago

If we're going to use electrical analogies, parseInt is like a wall outlet connected to a switch that will give you an electrical shock if you plug something in while the switch is on.

With some experience and/or foreknowledge of this behavior, you can avoid the shock, but the average person is going to assume the outlet works like any other electrical outlet and plug things in without thinking about the switch.

They'd still be correct to complain when this one outlet gives them a jolt from time to time.

And, in all likelihood, even people who know about the switch will absentmindedly get zapped occasionally.

user

6 hours ago

[deleted]