Live data from Hacker News

Ask HN: Why do I find it so difficult to learn to code?

news.ycombinator.com

21–29 of 29 posts

Re: Ask HN: Why do I find it so difficult to learn to code?

#21
You need to spend less time _reading_ and more time _writing_. And ideally that writing should be programming something useful, not just an exercise.

One of the best learning environments I've seen is the Python framework Web2py. It was developed by a professor originally for teaching purposes. Python is a nice clean language. You should be able to make some effective progress in an afternoon.

Re: Ask HN: Why do I find it so difficult to learn to code?

#23

Let's talk about Chinese. Can you "learn" Mandarin by reading a few books on Mandarin, taking a few courses, attempting to read some books in Mandarin, and occasionally speaking a few words to that cute Chinese girl at work? Yes, you can "learn" Mandarin that way, but you can't Learn it. If you were REALLY passionate about learning Mandarin, you would have to go to China (or at least Chinatown) and stay a while. Then…

I realize that you cannot learn Mandarin over night, as with programming. However, surely after 10 years worth of basics, I should have progressed further than I have.

Re: Ask HN: Why do I find it so difficult to learn to code?

#24

You can't expect to read art books and study the grand masters and one day magically be able to paint. You start with crayons in kindergarten and work your way up to oil on canvas. What you need to do is write code. Lots of code. Lots of badly broken, half-functional code. The software equivalent of a child's doodles. After six months you'll be writing code that kinda works some of the time, after two years you'll be…

That's just it! I understand that solution perfectly, it just doesn't seem to sink in/work for me. I've been doing 10 years worth of basics and still can't progress.

Re: Ask HN: Why do I find it so difficult to learn to code?

#25

Here's a slightly different piece of advice. When you get in 100 pages, around the point where you start getting lost and frustrated, stop reading and write some simple programs. Don't do the large projects everyone else is suggesting. Just some simple project euler programs or programming praxis. Writing a program that plays poker is always a good test project, if you can't think of anything. The reason for doing th…

This is fantastic advice, I have tried Euler in the past and struggled on the first question haha. I think when things pick-up from the basics of variables, classes, objects etc, that's where I start going wrong. I know about the mechanics of programming, it's using the tools to solve problems is where I go wrong.

Re: Ask HN: Why do I find it so difficult to learn to code?

#27
I found this poem which describes how my problem feels.

----

I am like a toolbox, with all the tools I will ever need lain gently and neatly in the box, ready for me to use them. The toolbox is translucent so I can see them there.

The key to the toolbox is locked inside of it.

Re: Ask HN: Why do I find it so difficult to learn to code?

#28
one-line-at-a-time.

Just start typing at the interactive prompt (e.g., IDLE, included with python); when you finish typing a line, press return and see if it executes.

If it doesn't then type it again until it does.

But just start typing. It's a language you are learning--so start by speaking it.

repetition is the mother of skill.

All of the stuff in the books about lexical dispatch, aliasing, Liskov substitution principle, guarded re-binding, immutable namespaces--screw that. You'll come back to that stuff when the time is right and by then you will have already been doing all of those things.

Again: one line at a time. This will work, and you will have fun. i promise.

Post reply on HN