I just read this excellent article Pragmatic Learning: It’s not “fun” on Roger Schank’s blog. It’s a very good post that calls bullshit on the “gamification” cargo cult which is widespread in the edtech and corporate training world. Just adding points, badges, and levels to a corporate training program that teaches you something boring is not going to suddenly make it fun. The author’s main observation is that forced learning is not fun and we need not pretend it is. Consider an employer who wants their employees to know X because it is required by law, or a bunch of students forced to learn Y or else they’ll fail. These “forced” trainings are not fun, and gamifying them is akin to putting lipstick on a pig.
How does one learn to code? Students in computer science and software engineering will have a few first-year programming courses, with the first one introducing basics like variables, control flow, and loops. Autodidact programmers probably started with a tutorial somewhere, but eventually got a book on the subject. Regardless of the learner’s path, we’re talking about a book that teaches “the basics.”