Jul. 22nd, 2015

madbernard: a long angled pier (Default)
I'm grimly slogging through the Javascript track of Codecademy again. Ticking off the boxes for Free Code Camp. The "address book" bit with Bill Gates etc was particularly annoying. Did they ever explain For/In loops? Every other thing Codecademy does is massively slow and information sparse, and then suddenly they expect you to know For/In?

But! Plus side, the people behind the Free Code Camp Twitter account let me know they're building their own Javascript course, so someday Codecademy will be back in its own box for people who are happy with how it works!

Also, I've been taking breaks by reading the massive "What is Code" article at Bloomberg that was going around a few weeks back. It pointed out a quirk in Javascript that I hadn't seen elsewhere, which you can recreate right now (in at least Chrome and Firefox)... F12 to get the Developer Tools open, go to the Console tab, type in 0.2 + 0.4, hit enter. Answer: 0.6000000000000001

I found this page that explains Floating Point errors in Javascript. The upshot is, the computer stores decimal fractions as binary fractions, and sometimes there's no exact match, so it uses the closest binary fraction it has. And you get around this by rounding. I wonder if this is something that people who code JS for a living do all the time?

November 2022

S M T W T F S
  12345
6789101112
1314 1516171819
20212223242526
27282930   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 5th, 2025 11:04 pm
Powered by Dreamwidth Studios