Ask HN: How Can I Learn Programming From The Ground Up?
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.
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.
Seriously, thanks a lot for commenting.
On the other hand I wanted to ask you if you need any help at all in editing your book/proof reading then I am willing to pitch in.
Oh and do you know any good e-reader softwares for the PC? Reading a book in Adobe Reader is a bit annoying.
http://www1.idc.ac.il/tecs/
An introductory video is called "From Nand to Tetris in 12 Steps" and is at http://video.google.com/videoplay?docid=7654043762021156507
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.
>>>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!
>>>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. <<< See, for me it's the opposite: the command line is perfectly natural, almost more like an extension of myself, but GUIs drive me nuts. I think that's just a personality thing.
Other resources online: you seem to have already discovered MIT's OCW. I know other universities (e.g. Yale) have similar programs, but they're nowhere near as extensive as MIT's, and they tend not to have what I want. I've also found course websites from all sorts of universities useful.
If you can get access to a good research library, that's enormously helpful, as a lot of things (e.g. TAoCP) just aren't online.
And of course Wikipedia is awesome; I often use its "references" and such for textbook recommendations.
http://www.academicearth.org/subjects/computer-science
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.
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-... )
>>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!