
So you want to learn to code? - kylebragger
http://forrst.com/posts/So_you_want_to_learn_to_code-Nbp
======
ecounysis
I would recommend reading a highly regarded book on the programming language
you are interested in. To do this, go to Hacker Books
(<http://www.hackerbooks.com/>) and search by what interests you.

Many people recommend Python as a good first language. This is what Eric
Raymond suggests in his _How to Become a Hacker_ essay
(<http://www.catb.org/~esr/faqs/hacker-howto.html>): _"It is cleanly designed,
well documented, and relatively kind to beginners. Despite being a good first
language, it is not just a toy; it is very powerful and flexible and well
suited for large projects."_

------
hugh3
I suspect that most people's idea of the way to learn to code is pretty
similar to the way they themselves learned to code. Once again it's Bucheit's
Law: _Advice = limited experience + massive overgeneralization_

Speaking of which, I need y'all to open up BASIC and type:

10 PRINT "GREG STINKS!!!!"

20 GOTO 10

What's that? You don't have an older brother named Greg? Hmmm, this could be a
bit of a problem then.

------
katherinehague
I think that the most valuable advice in this is in the first line, simply
learn by doing. I've been wanting to learn to code for well over a year.
However, I think I've watched to many videos and done to many guided
tutorials...never actually getting enough time doing projects on my own to
actually solidify any skills. Thus it feels like I haven't actually learnt
anything at all. My day to day work doesn't involve any programming so carving
out time to practice is hard, but sooo necessary. I've got my work cut out for
me.

~~~
ISeemToBeAVerb
I agree. As a beginner myself, I'd been reading about Ruby and Rails for a
month or so. Mind you I said READING, not doing. That whole month of reading
went out the window the minute I actually sat down at my computer and got
busy. There are SO many questions you'd never even think to ask if you just
sat there and read books or blogs. I fully agree that the best way to improve
is to sit down and start coding in your chosen language. Everything else is
just a diversion. I'll add one thing to this discussion; don't be afraid to
make mistakes. Don't be afraid if your code isn't the most efficient. Just
write. You'll pick up on more efficient ways to write as you go. You just have
to be observant of your process.

------
mtogo
Some of the advice in there is really horrible. Start learning to code with
_Tizag_ tutorials!?

No. Pick a language. It doesn't matter which, pick any language. Python, Ruby,
C, C++, Java, Smalltalk, PHP, Scheme, Io, whatever. Now find an introduction
to computer science course or textbook. Spend a couple months working your way
through it until you understand all of the concepts. Take a day or two off to
learn version control.

Now, assuming your goal is to learn webdev, find a web framework for your
language of choice (If you picked a language that isn't commonly used for
webdev, spend a weekend learning a new one). Follow it's introduction tutorial
or a related tutorial (e.g. Djangobook).

Once you have the basics down, pick up a book on software engineering like
Code Complete and work through the basic concepts of good design and clean
code.

But most importantly, _make things_. Scratch your own itch. Contribute to a
FOSS project. Write scripts and little applications of various types. The one
thing this post did get right was that the best way to learn is by trial and
error.

It's really not that hard and you'll enjoy every minute of it (or you won't,
in which case you don't want to be a programmer).

If you don't have the patience to spend 6-8 months learning CS, your language,
and your framework of choice, you don't have the patience to work on and ship
a software project.

~~~
panschk13
I think the general idea of the article - to find something you want to do and
then use google to solve it, is a good one. If you force people to first read
big books about coding guidelines before doing anything of interest TO THEM,
most will just give up. Of course, one can disagree about the articles or
sites suggested, but that's not the main point IMO.

~~~
pheaduch
Just Googling is horrible way to learn how to program. Sure you may find an
answer relatively quickly, but down the road when you come up against more
difficult problems and can't find the answer, what then?

You don't learn by just Googling, you learn by working through the problem
which reinforces concepts that you've read. Using Google is like if you were
to go through school just copying answers -- you'd learn absolutely nothing!

------
__rkaup__
How come articles like this come up on the homepage so often? A lot of us here
already know how to code, and those who want to probably aren't reading Hacker
News.

