top | item 6412343

Ask HN: Help? Despite years of trying, I cannot learn to program.

19 points| austenallred | 12 years ago | reply

I have been trying to force myself to learn to program for years, and I can't get anything to work, not for want of trying.

I recognize how important programming is; I consider it the literacy of the 21st century. I have utmost respect for engineers, and I know I need to learn, but every time I sit down and try to learn to program, no matter which language/method I use, I don't get very far. I feel completely handicapped.<p>I've started the following, only to get stuck, end up spinning my wheels by trying something else.

CodeCademy

Team Treehouse

Python the Hard Way

Eloquent JavaScript

Udemy courses

My biggest problem is that I find it really, really hard to get interested, and I'm terrible at motivating myself to do something I'm not interested in. When I read a book, for example, I can either read only a couple pages at a time and throw it away (I'm well versed in the first 10 pages of great literature) or I go crazy and tear through the book in a all day and all night without sleep and without paying attention to anything else in the world.

So what can I do to make programming interesting enough that I'll want to learn how to do it? Or what resources am I not trying?

33 comments

order
[+] mdip|12 years ago|reply
My biggest problem is that I find it really, really hard to get interested, and I'm terrible at motivating myself to do something I'm not interested in.

I'll ignore the obvious question of "why are you trying to do something you're not interested in?" because that's not what you're asking. I think most people are terrible at motivating themselves to do something they're not interested in, so the trick is to find a way to hack that.

I've seen so many people decide to learn to "program" because it was part of their Computer Science degree which they chose to pursue because that's where the jobs are. Many of them finished their degrees and ended up in a "software factory" churning out code for as long as they could stand to do it.

I don't see programming as an end unto itself (that "job" is not going to make you enjoy programming; it'll probably make you hate it). It's a skill that allows you to make things. To manufacture interest in programming, program something to enhance something you are interested in. Stick with easy things -- something you could learn to do from an hour long tutorial in your language of choice (and stick with an easy language). Don't stress over building something that is "right" or even attempt to understand best practices at this stage. Doing so will probably result in loss of interest.

Once you've made something that helps something you're interested in, the positive feedback from that experience might challenge you to look at more complicated tasks, further honing your ability. At some point, you'll encounter a problem that will be complicated enough that you'll have to go back and learn how to do things "right", and you'll probably be far enough along in your pursuit that you'll enjoy learning how to do it right.

I've done this myself with a few skills I wanted to pick up. I've always wanted to get into hardware, but could never manufacture the interest. Recently found myself purchasing an Arduino and a bunch of mysterious parts to make a device that will send me and my wife a text when the dryer completes its cycle. My interest in doing this was for task avoidance -- I hate ironing.

[+] dragonwriter|12 years ago|reply
> I have been trying to force myself to learn to program for years [...] My biggest problem is that I find it really, really hard to get interested, and I'm terrible at motivating myself to do something I'm not interested in.

Why are you trying to force yourself to do something you aren't interested in? My first suggestion would be to really understand what you want out of it, and why you are doing this.

My second suggestion, if you decide it is something you really do want to do and you have a good story for yourself as to why you are doing it is to try to do learning with either a co-learner or a mentor who understands your motivation for learning, and to try to work with them to find real projects to apply what you are learning that relate to your motivation.

[+] austenallred|12 years ago|reply
Because I recognize the value in it. I hate sitting by waiting while my co-founder builds things and keeps servers up and I feel like an idiot. I can go get more users and sign them up all day, but I can't really contribute to product, even when I'm wildly passionate about it.
[+] pwg|12 years ago|reply
> So what can I do to make programming interesting enough that I'll want to learn how to do it?

Pick a simple chore you do now manually by hand and try to automate it so that the computer can do it for you.

This way, you may have more motivation, because if you can automate the chore, you won't have to do it manually anymore.

Learning to code from the "how-tos" is hard if you are unmotivated because the examples they ask you to create are not something you'll ever need, or use, again. Therefore you have difficulty staying motivated because it all feels like busy work.

Note, the word "simple" above is critically important. You have to pick something that is within your skill level. So it has to be something "simple".

[+] Anonymous9823|12 years ago|reply
Agreed. I never remember following any tutorials, nearly everything I learned was because I needed to solve a problem.

Come up with anything you can do for fun. For example...

Always trying to decide what movie to watch with your girlfriend? Write a quick program that takes in a pasted list of movies you have available, and spits out a random one to watch. Then you realize, I don't want to watch any old movie, I want to watch a comedy. What if you created a database that contained a list of your movies and their related genres. Then you just click a genre, like comedy, and it returns a random one from the list? Then you start getting repeats, and that's no fun. What if it saved the date of the last time it was randomly generated, or what if you could mark movies as watched, so they don't repeat until you get through the entire list?

Dumb things like the above can be fun for learning. You start with something simple and get a functioning program within the hour. Then you start building on it, improving it, adding new features, etc.

[+] NovemberWest|12 years ago|reply
I would suggest you get assessed for a learning disability. The pattern you describe is extremely typical for someone who is 2xE -- I.e. both bright and learning disabled. Identifying and addressing a previously undiagnosed disability is typically life changing in the most wonderful way.

For this specific issue, I suggest you go to programmer meet-ups and make friends in person. Find someone you hit off with. Ask them to do a little hand holding and explaining. You might have to try this a few times before you find someone that clicks with you in the right way. Once you get over that initial hump, you will likely be fine.

[+] nicholas73|12 years ago|reply
You need a project that you want to finish at all costs. Programming is a grueling bit by bit learning process. You will Google just as much as you program. Heck, when I first started, I tried to understand a complex Facebook app. I literally Google'd the code line by line.

Check out how my first project looks now: http://sudokuisland.com

There are now several thousand lines of code, both front end and back end. I can build handle all parts of the stack. The learning process took over a year but that was while working full time.

As much as I can't praise Udacity and Codeacademy enough, they aren't enough. Without a project you will forget everything you learned. I know my code inside and out, and can refer to it when I see a similar problem.

[+] mscottmcbee|12 years ago|reply
As a professional programmer, I can't sit down, open a book on a language/platform, and read it and learn it. It doesn't matter how much I want to learn that language/platform. I have to learn by doing.

Forget about learning to program. Figure out what you want to make, and start making it.

I've been working on an Android app recently. This is my third or so attempt at learning the platform. This time, I've actually made good progress, because I have a goal. I started not by saying "Gee, I want to learn this", but by saying "Why does this app not exist? I could make it. I should make it"

Start with a basic "Hello world". After that, instead of going onto the next chapter, think "What's the easiest thing I can do next to advance my goal".

[+] memracom|12 years ago|reply
Python the Hard Way? And you are not already a software developer in some other language? I wonder whether your problem is that you are not beginning at the beginning. Try again by focusing on learning from a book and practicing everything on your own computer. Which book? That is the first thing that you need to focus on, seriously. Spend a week evaluating various beginner books for Javascript and Python, both of which are reasonable languages to start with. Yes, I said a FULL week. You need to identify candidate books, find a copy in a bookstore or a library or through borrowing, and then spend a couple of hours studying the book, i.e. read the complete table of contents. Read the introduction. Look at a chapter near the beginning of the book, one near the middle and one near the end. Think about what you understand and what you do not understand. Your goal is to find an author whose voice is clear for you. Nobody else can do this job for you. You will know it when you see it, because the right book for you will seem clear, understandable, and a joy to read compared to the other ones.

That said, there is something to be said for just diving into the deep end, especially if you have a real world use for some software. Engineers and Scientists tend to learn programming this way. They download EPD Python or iPython, grab some experimental data, and start writing analysis tools to give meaning to their raw data. Is there something in your real life where you could solve a problem with software? If so, then relentlessly working on it a few hours a day will get you to your goal. And remember, real software developers use Google. The blogosphere and sites like StackOverflow are a developer's friend.

[+] vasilipupkin|12 years ago|reply
You don't need to learn to program unless you have a specific goal in mind. Lack of such goal is probably why you can't bring yourself to do it. It's a myth that everyone needs to know how to program
[+] jpd750|12 years ago|reply
My biggest problem when I first started out was just following tutorials and thinking "hmmm, i really dont get this".

The best way I learned to program is to do it. No,seriously. Pick a project you want to make and make it. If a task like "user registration" is too tough, break it down further into subtasks e.g. create form to register, have form send info to db, etc.

Following tutorials and online sources that have you make useless things like "CREATE A CALCULATOR" I never found useful in trying to learn programming.

[+] cprncus|12 years ago|reply
In line with several other comments:

1) Programming is not the "the literacy of the 21st century." Come on. It isn't now and it never will be, unless languages evolve to be essentially AIs that you can just request features in English, and even then it won't be, since most people won't bother to make programs. I'll go to the mat on this one. Those who bandy this idea around are misrepresenting reality.

2) Dan Miller, a career guru/author, has a point in one of his books that you should not attempt to strengthen your weaknesses--because then you end up with "strong weaknesses". Instead, strengthen your strengths. If you are good at soft skills, selling, design, idea man stuff, DO THAT, and leave the Model View Controller stuff to those who live and breathe that. You'll (likely) never do it as well as they do, anyway.

3) If you insist on learning to programming despite these two admonitions not to, I agree with many here who wrote: pick a project, and do it. And not some dopey toy project that you don't care about. Something real. I had an idea for an application years ago and have been working on it in my spare time and now feel that I can program, at least to some level. If you are in a company, work with the tech people to contribute to one module or one class or one feature, and start there. Become master of that section, and then move on.

[+] bdfh42|12 years ago|reply
The key here is that in all probability you need a realistic programming task that will result in a piece of software you want to use.

It is exceedingly difficult to just "learn to program". If you were to go to college then you would be set tasks that you would be motivated to complete (for a qualification of what have you) and you would thus learn enough about programming to complete the task.

Without the motivation for each stage of learning - the task of learning would be pretty dry.

[+] whichdan|12 years ago|reply
I started learning to code when I was a kid -- not by reading books or plowing through tutorials, but by making websites. I'd build something simple, and then iterate on it, adding features as I felt like it. After a certain point I got the urge to recode my work, then having a better understanding of how all the pieces fit together. After several apps, I started to gain a more intrinsic sense for how programming "worked."

In short: why not sit down and try to code something simple?

[+] cprncus|12 years ago|reply
Wow. When I was a kid I typed in, from a book, the sprite graphics code for a balloon and maybe made the world's shortest and lamest adventure game. Times change.
[+] s_baby|12 years ago|reply
Quality and consistency of practice is better than quantity.

A) It's better to give 100% for 30 minutes then 70% for 60 minutes. 30 minutes a day is a small commitment even for those with lack of motivation.

B) Don't judge your practice by how much you've accomplished that day but by how successful you were at "practicing perfectly" for your allotted time.

[+] danvoell|12 years ago|reply
If programming isn't interesting enough, figure out a problem you really want to solve with programming. Such that every morning you wake up saying its up to me to solve this problem, I'm going to figure out how to get past every wall in my way and I'm going to reach out to people for help, since this problem needs to get solved.
[+] gremlinsinc|12 years ago|reply
I've watched tons of tutorials on different languages and frameworks but all the generalized tutorial projects were boring... it wasn't till I got hired to work on something cool.. something that i honestly had no idea how to do or where to start.. I just decided I'd pick a php framework ..laravel being most elegant ..this was after coding the MVP in rails but not being able to deploy it on shared hosting (hostgator and site5 both lacked support for rails 3.2 and Ruby1.9..)..so I ported what I had in rails to laravel and discovered how easy beautiful and rails like laravel is.Moral. ..drop tutorials and just build something. Pick a framework and build it... Don't know what to build? Build someone else's idea via a freelancing site...working day in and day out is the only way to become a programmer.
[+] ceekay|12 years ago|reply
Step back for a minute: why do you want to learn programming ? To build out an idea you have ? Or to get a job as a professional coder ? If former, you don't really need to learn coding - consider hiring others to do it, look at odesk.com or elance.com or craigslist.com. Product Management is an equally interesting / important skill.

If latter, and if you really want to be coding for the love of it, get real serious and focus. Figure out what area (systems ? web ? mobile ?) and just code. If web consider devbootcamp.com. Otherwise get a book and write code. I'm not a huge fan of online tools. Coding is like driving. The more you do, the better you'll get. No one can teach you.

[+] BWStearns|12 years ago|reply
Try learning Ruby (both Ruby and Python are pretty beginner friendly but I feel Ruby to be more accessible). Also, try fixing something with your work or general personal crap that is shitty. I learned to program because about 80% of my job was absolute BS and could totally be automated. If you want to kill something really annoying with code it's a lot easier to learn to code because of the motivation. That said, if you have issues keeping interest then just come back to it later.
[+] meerita|12 years ago|reply
Here a novel coder. I learn Ruby + Rails later.

After reading 2000 books on the matter, python and all the stuff I learnt only by before having the need to build something.

When I found out I wanted to build something, I started to understand coding. When I found a stopper I went back to the books, Google, and so on. At the end, I built the product I wanted and learnt to code. I think it's the only way to motivate yourself and learn how to code.

[+] Choronzon|12 years ago|reply
Just stop. Your forcing yourself to go against your own nature,you dont need to code and good coder is not more valuable than a good artist or architect or plumber. Master something you enjoy.If you want to directly help your co-founder now study design and UI experience.As a programmer myself It would be far more productive to partner with a good designer rather than an additional programmer in any business venture.
[+] adultSwim|12 years ago|reply
Find an actual person to teach you. People teach much better than a book can.

I know the feeling with having trouble working through books. Quit trying to pound a square peg into a round hole. Find what works for you (your current approach doesn't!)

Don't learn/read things just because you think they are good for you. Do what you are actually interested in.