> ...solving “How do you tell if a number is even or odd” with clumsy solutions such as (x % 2). They don’t [...] come to the conclusion that (most) computers are digital machines, all you have to do is check the first bit (x & 1).
Not to be nitpicky, since your overall point still stands, but I'd argue that it's better to use a mathematical abstraction (modulo) than an optimization that's dependent on the way the data is stored (bitwise operations), particularly when the compiler will probably optimize it away anyway.
This post isn't about learning programming languages faster. It is the author of the blog discovering the rudiments of what Alan Kay discovered decades ago regarding programming literacy.
Actually, I think most programmers know the 'even/odd' trick from memorizing it, having seen it used elsewhere. It's a mathematics trick, not a programming one.
When learning to program your first language, there's a lot of memorization involved as far as algorithms go. But if you can write an algorithm in 1 language, you can basically write it in any language.
Learning languages after the first is never about algorithms. It's about learning the features of the language and the easiest ways to do things. And sometimes the syntax, depending on the languages.
Learning by Google: get 1,000,000 search results for every phrase you type in, no clue whether it's complete or even accurate, no clue when you've learned enough to be proficient.
Learn by book: get the information you need organized in a sensible fashion by someone who's an expert on the subject.
Learn by taking a course from an expert: all the advantages of learning by book, plus you get answers to your questions that may not be covered in the text, quizzes to reinforce what you've learned, practice exercises, etc.
Maybe its just me and because (I like to think that) I'm pretty decent at writing good software, but I find that I best learn a programming language by writing code, not by doing any of the above.
As for what I use to get to the point where I can write code? Code written by others, in snippet form, as an example, or part of a full app.
If you don't know the language to begin with, how could you possibly know what code to write? How do you know what's important? How do you know that what you're doing is correct? How do you know when you're done?
Two things to remember here: Sturgeon's Law--- 90% of everything is crap as applied to books and as a beginner who are you to distinguish? The second thing regarding classes is that teachers like everyone else all hang out on a bell curve, this creates its own version of Sturgeons Law; how is the beginning student to know a good instructor from otherwise?
The problem I have with people who claim that "all languages are the same" is that they aren't. You can't use that bit-shifting trick in some higher-level languages, and any lisp fan will regal you for hours with descriptions of clever solutions to problems that just can't be done in C.
This is very true, I came to realize this very thing by watching the SICP lectures: the important thing is to understand programming as a problem solving method and computers as tools; the languages that carry this method and express it to computers become secondary in learning.
This guy sounds like an asshole. If he is so concerned about the current state of affairs he should write some tutorials and teach some real problem solving concepts. Instead he rages about something and in the end pretends to be smarter than he actually is.
Not to be nitpicky, since your overall point still stands, but I'd argue that it's better to use a mathematical abstraction (modulo) than an optimization that's dependent on the way the data is stored (bitwise operations), particularly when the compiler will probably optimize it away anyway.