Live data from Hacker News

Ask HN: How Can I Learn Programming From The Ground Up?

news.ycombinator.com

1–10 of 13 posts

Ask HN: How Can I Learn Programming From The Ground Up?

#1
Most of the people here on HN have extensive coding experience, and are deeply proficient in creating working code that actually does the job. I do know that reaching that level of proficiency requires years of dedicated keyboard bashing, but as a new entrant something has been bothering me.

I've been trying to make a web app in PHP, and I bought one of those popular books on it (http://www.amazon.com/Beginning-PHP5-Programmer-Dan-Squier/dp/0764557831/ref=pd_bxgy_b_img_a). It was quite okay, but it didn't give me what I was looking for. I want to actually understand what I am doing from the grounds up. For e.g.I wish to understand how TCP/IP works. So, that I know what is happening to my HTTP request after I send it and how I can take advantage of its capabilities. I also wish to understand other things like understanding how an RDBMS is implemented. So, that I can make better code to access data from it more efficiently are also a part of this.

In general I want to know why I am doing what I am doing. Some of this knowledge requires years of actual experimentation to gain, and I am ready to do that, but what I am looking for is a good platform from which I can start.

Can you suggest any ways/resources to do this? (This also applies to programming in general)

P.S. - I put this up on HN because there is a lot of noise out there, and it is hard for me as a n00b to differentiate between seemingly good advice/resources and actual good advice/resources.

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#2
I understand exactly where you're coming from.

But you have to define further what you mean by "programming from the ground up".

Do you want to learn computer science? Do you want to learn machine/systems architecture? Do you want to learn how to write cleaner more logical code?

All three?

The world of computer science/programming is absolutely huge.

There are so many ways to go about it depending on what you're looking for or the type of learner/person you are. Do you have the patience to sit down and study theory or do you want to intermix theory with coding?

It's a long road but clearly you're interested. If you want to chat further I'd be really happy and interested in helping you. If you have Skype or something we can exchange contact information. My email is in my profile.

(Also, interestingly there is a free book called "Programming From the Ground Up" which teaches you assembly http://nongnu.askapache.com/pgubook/ProgrammingGroundUp-1-0-... )

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#3
So, in essence, you want to learn everything there is to know about computers and computing :-) . I have a similar impulse -- whenever I see some program, protocol, or even hardware device, I want to learn enough about how it operates to form a good, thorough mental model.

Some immediate, relatively practical steps: - If you're not running one of the free Unixes, start now. I learned an enormous amount from first trying to get coLinux to work on my windows box and then actually installing various distros. That was four years ago, and things have gotten much easier (hardware support, guided installation, etc.), so you won't learn as much as I did, just as I didn't learn as much as the people who did it in, say, the mid-90's, but it's still worthwhile.

Distro: I currently run Debian, but I think for the purpose of learning, it (like a whole class of similar distros, like Ubuntu, RedHat derivatives, and even OpenSolaris) is too easy: it doesn't force you to keep learning past the basics in order to get it running and keep it running. Slackware (http://slackware.com/) and the BSD's (http://www.freebsd.org/ , http://netbsd.org/ , http://openbsd.org/ ) are probably good; I don't have any personal experience with (Gentoo http://www.gentoo.org/ ), but my impression is that it would work.

- Learn the Unix ecosystem: the command line and associated tools, the init system, daemons, etc. The "do one thing, and do it well" philosophy makes for programs that are easy to understand; once you understand that kind of program, it becomes much easier to look at, say, a browser and think about the components required to make it work.

Books/articles: - ESR's "How to Become a Hacker" (http://catb.org/esr/faqs/hacker-howto.html) tries to answer a question not unlike yours. - ESR's /The Art of Unix Programming/ (http://catb.org/esr/writings/taoup/html/ ) explains the philosophy of Unix: why things are the way they are. - /Structure and Interpretation of Computer Programming/ (http://mitpress.mit.edu/sicp/ ) is a fantastic book on how to think about programming. One of my favorites.

On my to-read list: - John Lions' commentary on Unix (see http://en.wikipedia.org/wiki/Lions_Commentary_on_UNIX_6th_Ed...) for a deep understanding of Unix circa 1976 - Donald Knuth's /The Art of Computer Programming/ for a similarly deep, low-level understanding of a whole bunch of really important algorithms and data structures.

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#4
post #2

I understand exactly where you're coming from. But you have to define further what you mean by "programming from the ground up". Do you want to learn computer science? Do you want to learn machine/systems architecture? Do you want to learn how to write cleaner more logical code? All three? The world of computer science/programming is absolutely huge . There are so many ways to go about it depending on what you're loo…

Yes, in essence I want to learn all 3.

>>The world of computer science/programming is absolutely huge.That's precisely why I asked HN. :)

>>>There are so many ways to go about it depending on what you're looking for or the type of learner/person you are. Do you have the patience to sit down and study theory or do you want to intermix theory with coding?I actually really don't know what type of learner I am. On one hand I don't have much problem in understanding things. On the other I struggle with some issues that make it really hard to get stuff done. What I do know is that I need space to imagine things for myself, and work things out until I am absolutely sure that I understand something.

Whenever I study theory a million different ideas pop into my head. It's like, oh I can do this with this, or maybe I can make this with this and so on. I know it's not practical to chase down every path, but it definitely helps me to implement some of them. Whenever I fail in doing that I realize just how flawed my realization was. So, then I can go back to the drawing board and just start over again.

>>>It's a long road but clearly you're interested. If you want to chat further I'd be really happy and interested in helping you. If you have Skype or something we can exchange contact information. My email is in my profile.Thanks a lot!

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#5

So, in essence, you want to learn everything there is to know about computers and computing :-) . I have a similar impulse -- whenever I see some program, protocol, or even hardware device, I want to learn enough about how it operates to form a good, thorough mental model. Some immediate, relatively practical steps: - If you're not running one of the free Unixes, start now. I learned an enormous amount from first try…

[deleted]

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#6

So, in essence, you want to learn everything there is to know about computers and computing :-) . I have a similar impulse -- whenever I see some program, protocol, or even hardware device, I want to learn enough about how it operates to form a good, thorough mental model. Some immediate, relatively practical steps: - If you're not running one of the free Unixes, start now. I learned an enormous amount from first try…

Thanks for replying! :)

>>>If you're not running one of the free Unixes, start now. I learned an enormous amount from first trying to get coLinux to work on my windows box and then actually installing various distros. That was four years ago, and things have gotten much easier (hardware support, guided installation, etc.), so you won't learn as much as I did, just as I didn't learn as much as the people who did it in, say, the mid-90's, but it's still worthwhile.That's on my to-do list too. As soon as I get my own computer I plan to install a BSD or some UNIX variant suitable for my hardware. (No. I don't own a PC. I borrow people's laptops to work on just like this one)

>>>I currently run Debian, but I think for the purpose of learning, it (like a whole class of similar distros, like Ubuntu, RedHat derivatives, and even OpenSolaris) is too easy: it doesn't force you to keep learning past the basics in order to get it running and keep it running. Slackware (http://slackware.com/) and the BSD's (http://www.freebsd.org/ , http://netbsd.org/ , http://openbsd.org/ ) are probably good; I don't have any personal experience with (Gentoo http://www.gentoo.org/ ), but my impression is that it would work.I've been thinking about choosing a distro and I've ended up quite confused at times. For me there are two sides to this. For the purpose of learning things Ubuntu is too easy (I've forced Ubuntu installs on some poor human beings), but at the same time if I keep something to permanently work on then I would prefer a system which isn't taxing to work on. Although, I will teach myself the command line for fun (just like you said), but I don't want to spend my time doing things through it.

Sometimes, I just need a different environment to work in. An environment which doesn't get in the way of my creative flow. For example, if I am writing an essay/code and I have to switch to command line to type in a long command to access some book somewhere in my system then in the heat of the moment command line would just drive me crazy. During those times I just have to get that stuff out of my head and anything else is an agonizing diversion.

Hence, maybe I'll just end up multi-booting my system.

>>>books/articles: - ESR's "How to Become a Hacker" (http://catb.org/esr/faqs/hacker-howto.html) tries to answer a question not unlike yours. - ESR's /The Art of Unix Programming/ (http://catb.org/esr/writings/taoup/html/ ) explains the philosophy of Unix: why things are the way they are. - /Structure and Interpretation of Computer Programming/ (http://mitpress.mit.edu/sicp/ ) is a fantastic book on how to think about programming. One of my favorites.Thanks a lot for those resources!

I actually watch MIT's 6.00 lectures, and they simply rock.

Do you know any other good resources online?

Anyway, thanks a lot for commenting!

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#7

So, in essence, you want to learn everything there is to know about computers and computing :-) . I have a similar impulse -- whenever I see some program, protocol, or even hardware device, I want to learn enough about how it operates to form a good, thorough mental model. Some immediate, relatively practical steps: - If you're not running one of the free Unixes, start now. I learned an enormous amount from first try…

Thanks for replying! :) >>>If you're not running one of the free Unixes, start now. I learned an enormous amount from first trying to get coLinux to work on my windows box and then actually installing various distros. That was four years ago, and things have gotten much easier (hardware support, guided installation, etc.), so you won't learn as much as I did, just as I didn't learn as much as the people who did it in…

Academic Earth has a lot of lectures on computer science.

http://www.academicearth.org/subjects/computer-science

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#8

So, in essence, you want to learn everything there is to know about computers and computing :-) . I have a similar impulse -- whenever I see some program, protocol, or even hardware device, I want to learn enough about how it operates to form a good, thorough mental model. Some immediate, relatively practical steps: - If you're not running one of the free Unixes, start now. I learned an enormous amount from first try…

Great advice.

I'd add to those book recommendations 'The Pragmatic Programmer: From Journeyman to Master' as well, great and fun read from beginning to end and good to open at any spot and read just a section.

Also a fantastic read, Peter Norvig's "Teach Yourself Programming in Ten Years" (http://norvig.com/21-days.html), read that one ASAP, good to calibrate your expectations, when I first read it was both at once a cold shower of reality while simultaneously infusing in me a drive to become a competent and skilled programmer.

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#9
Well, I'll take this time to pimp my little free book on learning Python:

http://learnpythonthehardway.org/

It's a book that teaches programming assuming no programming knowledge, and is organized into exercises you do one per week or faster if you want. It's basically a book you'd read before you try any of the others, teaching you the stuff that other programmers forgot they learned.

Re: Ask HN: How Can I Learn Programming From The Ground Up?

#10
post #9

Well, I'll take this time to pimp my little free book on learning Python: http://learnpythonthehardway.org/ It's a book that teaches programming assuming no programming knowledge, and is organized into exercises you do one per week or faster if you want. It's basically a book you'd read before you try any of the others, teaching you the stuff that other programmers forgot they learned.

I actually spent last night reading through your book. I've been programming for a while now, but I'm by no means a hardcore programmer (ruby and javascript make me feel too comfortable). But I did pick up a few tricks from you, especially the rules for if-else-if. Good stuff. If there's one thing I'd like to read more is coding tips like that. Anything else up your sleeves Zed?
Post reply on HN