Over the last couple days I guided someone through implementing a basic "bingo" game in JavaScript, and it was a good reminder of just how much
technical knowledge,
familiarity with idioms and conventions and language that programmers use, and
trained cognition
it takes just to write any substantial software.
And more importantly, most importantly, very importantly: how unintuitive programming languages are, how much they perpetuate stuff that programmers have to be mentally broken into, that isn't obvious until you've had it explicitly explained.
Like "for" loops, the kind you find in C or Java, with two semicolons in the middle, are horrible interface design (if the goal is the best interface for humans working with higher-level concepts, rather than the best tiniest-increment improvement over previous methods for manually guiding the CPU instruction-by-instruction through an iterative loop). Python-style "for foo in bar" is much closer to reasonable. Could be even clearer if it was "for each foo in bar".
Do-while loops? Would be better if the syntax was `do ... repeat while`. Six characters could smooth the learning curve for that one construct profoundly.
More substantially than just syntax though, I have profoundly increased appreciation for the point made by Rich Hickey (creator of Clojure) that variables - places where values are stored and possibly are later overwritten, are inhuman unintuitive bullshit. He puts it more nicely than that. I appreciated this point when I first heard his talk, but it gains so much revealed wisdom when you see a programming novice think of a variable as a placeholder for code which is lazily reevaluated each time it is used rather than as holding the result of that code. I'm now convinced that it is a serious possibility that a programming language where everything is lazily evaluated and variables don't exist and mutable values don't exist isn't just easier to audit and optimize, but genuinely easier to understand and learn unless we've already had our logic severely bent to match all these programming languages which are optimized to express computer implementation details instead of human reasoning.














