madbernard: a long angled pier (Default)
[personal profile] madbernard
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?
From:
Anonymous
OpenID
Identity URL: 
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.

May 2016

S M T W T F S
1234567
8910 11121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 27th, 2017 03:46 pm
Powered by Dreamwidth Studios