Earlier quoted context omitted.
Nitpick: voltage potentials and ion channels. There's not much actual current flowing.
Nitpick over nitpick: synapses are not exactly electrical or ion current based, they have active transporters. If all electrical activity ceases, does memory survive? (Answer is very likely yes given cryonic experiments. Brain is protein, ion currents have tendency to auto fire on defrost.)
JavaScript Is Weird
381–383 of 383 posts
Re: JavaScript Is Weird
#382Earlier quoted context omitted.
Having designed programming curriculum, I have to disagree that the language is a bad language for beginners (though it is very far from ideal). To be fair the primary reason is not really a virtue of Javascript per se, but the fact that it runs in the browser is a large pedagogical gain that no other language can easily match and is hard to overstate. Learning to program is overwhelming for most students, and settin…
For starters it is maybe great, but I see problem with types that are not explained but create problems when building something more. Because in the end `var` is not just a bucket and adding strings to number bites people. It is like learning how to snowboard, I am now on a level where I can go downhill quite quickly, but I don't have enough experience to not crash if something unexpected pops up. Learning with `var`…
1. Tell the student we're oversimplifying, and maintain their trust in us so that they'll follow along when we do so.
2. Revisit oversimplified explanations when they have enough knowledge and context to understand more detailed and correct explanation.
The point I've been making is that Javascript makes it easy to pace our explanations of complex programming topics while still allowing students to consistently writing working code. Most languages require a large amounts of either upfront understanding or faith in "magic incantations", both of which hinder learning (this is not a criticism of those languages, they were designed for professionals). So Javascript still manages pretty admirably, all things considered.
Re: JavaScript Is Weird
#3830.2 + 0.1 === 0.3 That's not really a JS problem, that's a floating point problem. Plenty of languages will have the same issue. +!![] "" - - "" (null - 0) + "0" Calling these things weird is fair enough but I can't help thinking this is code you'd never actually write outside of the context of a "Look how weird JS is!" post. It's like picking examples from the Annual Obfuscated C Contest to show how hard it is to un…
I've been thinking for a while that modern languages shouldn't default to floating point computations. They're exactly the right thing if you do data stuff or scientific computing, but given how much of the internet relies on things like e-commerce and how often floating point is still misused for dealing with money, coupled with the fact that even many senior developers aren't fully aware of the subtleties of floati…
Arbitrary-precision rationals would get extremely hairy extremely quickly and simply break down for a huge number of use cases. People use exponentiation, square roots, and compound interest! If a "senior developer" who actually works with real account balances doesn't understand floating point, why would you expect them to understand why they can take the square root of 4, but the square root of 2 crashes their application? Or why representing the total interest on a 30-year loan at 3.5% takes over 400 bits?
The reality is that software engineers need to understand how computers work for the field they're working in. Many (if not most) programmers will never encounter a situation where they're responsible for tracking real account balances. The ones that do simply need to know how to do their job.