Ask HN: Help? Despite years of trying, I cannot learn to program.
19 points| austenallred | 12 years ago | reply
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?
[+] [-] mdip|12 years ago|reply
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
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
[+] [-] pwg|12 years ago|reply
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
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
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.
[+] [-] unknown|12 years ago|reply
[deleted]
[+] [-] nicholas73|12 years ago|reply
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
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
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
[+] [-] jpd750|12 years ago|reply
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
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
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
In short: why not sit down and try to code something simple?
[+] [-] cprncus|12 years ago|reply
[+] [-] s_baby|12 years ago|reply
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
[+] [-] gremlinsinc|12 years ago|reply
[+] [-] ceekay|12 years ago|reply
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
[+] [-] meerita|12 years ago|reply
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
[+] [-] adultSwim|12 years ago|reply
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.