Hacker News new | ask | show | jobs
by sfn42 692 days ago
I think it's funny how some people always complain that simple educational examples are not representative of professional level code.

This is clearly intended for complete beginners. It's explaining what a variable is. More advanced stuff comes later. Not to mention teaching a programming language is not the same as teaching frameworks and libraries within that language. If you're going to show more advanced exanples you inevitably need frameworks and libraries, which use more advanced language features and techniques, which makes learning a nightmare because now you're trying to understand a library while also trying to understand the language. Huge difficulty multiplier.

The first step is to learn the programming language itself. For that you don't need advanced code examples, nor do you want them. You want simple examples that demonstrate whatever you're trying to demonstrate with as little distraction as possible.