Hacker News new | ask | show | jobs
by bitwize 5028 days ago
Step 1 in learning to code:

10 PRINT "COCKS"

20 GOTO 10

Step 2 in learning to code:

10 INPUT "How many cocks do you want",C

20 FOR I = 1 TO C

30 PRINT "8===========D"

40 NEXT I

I'm not recommending that your first steps into programming be in BASIC, or involve cocks. (On both accounts I would recommend the exact inverse.) But this is how a million programmers got started: useless programs that amused us. Never, ever, ever underestimate a useless program, especially for beginners. The author of this article seemed to want to focus on building a prototype for his Web startup. And that's fine, as a long-term goal. But if you're brand new to the world of programming it's probably a good idea to start with the basics, like printing or drawing stuff on the screen, doing some simple (or, later mor complicated) mathematics, or munging or transforming data in interesting ways. This helps keep the budding programmer focused on the patterns and "shape" of their language, which knowledge they can then later direct to a specific purpose like Web or smartphone apps.

1 comments

I totally disagree. I can't stand tutorials or classes that present useless stuff as exercises. It's so much easier to work on something that you can at least imagine would have some value. And it is much, much easier to work on something that you think is either cool or have always wanted to build, etc.

Also, 1/2 a downgrade for the lame, childish example.

coding lame, childish "examples" are great to get people interested in learning to code.

they provide immediate gratification in terms that non-developers find humorous. which is a great way to spark interest.

Your standard for the importance of things being useful might be slightly out of perspective when you consider the main goal here is to learn: when you first start programming it doesn’t matter what the program does just as long as it did something, you understood it, and you can build on that knowledge to the next thing. That’s why we start with Hello World.
Still I think his point is relevant. For a lot of people the fact that something is useful contributes a whole lot to the motivation for learning it.
He said "...useless programs that amused us" I think that everyone missed the "amused us" part. If your program is useless but still does something that you think is amusing, then that is a great feeling
If I'm learning a new language, the very first thing I want to see is Hello World. It lets me see the basic syntax. Introducing a simple variable and if statement comes next. You pretty much have to start here before you can start creating.