How to teach myself computer science?
January 12, 2008 6:41 PM   Subscribe

I want to teach myself computer science. I know that teaching myself is far from a university education on the subject, but I'd like to try. How can I teach myself? What are books/lectures/tools/websites/anything that I could use to do this? Covering everything from the programming languages themselves, to algorithms, software development, and the mathematics background necessary for this.

Starting with freshman year from college, I always considered changing my major to Computer Science but I never acted on it, and now it's a bit too late for me. I took C classes when I was younger, but it was mainly as a hobby.

If you're self-taught in the field of computer science, I'd love to hear from you. If you're university trained, even better. I'm relatively self-motivated (I know it's not easy to teach yourself these concepts), and have 2 semesters of experience in Java. (I know, I know.) I want to learn it all.
posted by petah to Computers & Internet (22 answers total) 65 users marked this as a favorite
This previous question has all the material you're looking for.
posted by RogerB at 6:51 PM on January 12, 2008

Response by poster: That question seems to be geared towards a graduate program.

What I'm looking for is more of an undergraduate program. I'm not an experienced programmer like the poster of that question. I'm interested in not only books related to programming and development, but the mathematical background required. I know that many university programs require a number of intermediate and advanced mathematics and physics courses on top of the computer science curriculum. I'd be interested in filling these gaps as well.
posted by petah at 6:55 PM on January 12, 2008

Why go to MIT of course, as they've put much of their course work online for you to use for free!

And the book for the their introductory course is also freely available:
posted by zaphod at 7:08 PM on January 12, 2008

I disagree that the other question is highly focused towards grad-school-level topics; it mentions SICP, for instance, which was used in a freshman-level CS class at MIT. Even if you think that's a little advanced, there's still going to be a lot of overlap with what you're looking for.

If you've taken some classes on C and Java, you should already be a little familiar with the topic; what exactly do you feel like you're missing? You seem to think that there's more math you should know about, but what exactly? There's a lot of math that's usually prerequisite in engineering degrees -- calculus, differential equations, and so on -- that in reality isn't very relevant to most computer programming. Lots of people have learned programming with very little formal math background at all; it's the kind of thing you pick up as necessary, when you realize you need it.

Have you read Teach Yourself Programming in Ten Years?
posted by xil at 7:13 PM on January 12, 2008 [1 favorite]

Make sure you understand what you want.

Do you want to study computer science, specifically, or do you want to study software development or software engineering (or other related fields)? I consider them very different areas.

When I started college, I was a self-taught programmer and had already self-invented the rudiments of computer science and software development on my own. When I started studying computer science in school, the acceleration of growth of my abilities in software development when way WAY up. You are, of course, a different person than me - but nothing beat an instructor who inspires curiosity and builds the drive the learn, understand and do more.
posted by plinth at 7:31 PM on January 12, 2008

Response by poster: Plinth-
I believe I'm talking about computer science. I was under the assumption that software development was a facet of CS, because they don't offer it at my university, but it appears that I am mistaken.

I've taken a few courses, but all I've learned is syntax and basic concepts of programming. Some of my friends are computer science majors, and it seems like they focus a lot on abstract concepts that may not deal directly with programming or computer science, but still manage to help to develop an understanding of the more advanced concepts relating to computer science. When I talk to my friends who major in CS, it just seems that they cover a wide breadth of material.
posted by petah at 7:49 PM on January 12, 2008

Many CS departments follow the ACM curricula recommendations; you could use these as a broad outline of what a CS major will have studied by the time he graduates.

Also, I believe that the subjects covered by the Computer Science GRE subject test are online somewhere, as is a practice test... I learned a lot by cramming for this test =)
posted by qxntpqbbbqxl at 8:17 PM on January 12, 2008

What we're trying to get out of you is: What exactly do you want to learn, and why? Are you interested in the topic in an academic sense, or do you want to know the theory behind things you use in practice, or just want to know the boundaries of the field, or what?

You said "I want to learn it all", but that's not helpful, and isn't realistic even when you're majoring in the subject. The Wikipedia article on CS describes the basic landscape, with about 50 different subtopics. Nobody knows all this stuff; it's simply too large a field, and it's growing so rapidly, nobody could keep up.

The section Computer science education especially points out the issue: some people say "CS" and mean "computational theory", and others mean "everything about how to do stuff with computers". I'm not sure we know which one you meant.

So. Are you more interested in theory -- what it means to "compute", what you can do with a machine, what you can't do with a machine, how long it will take to perform a computation, algorithms, data structures, etc. -- or are you more interested in more practical issues -- computer languages, programming environments, how to do X with computers?
posted by xil at 8:29 PM on January 12, 2008

But honestly, if your friends are CS majors, ask them. It sounds like you should start by browsing through a CS 101 textbook, and they'll certainly have opinions on the ones they've seen.

(I'd tell you about mine but they're all out of print by now!)

For the theory side, anything with "algorithms" or "data structures" is a reasonable place to start; it's hard to care about computational theory first, without knowing how algorithms operate on data. Maybe Introduction to Algorithms. SICP would also work, but it's a bit idiosyncratic to say the least.

On the practical side, the previous thread mentioned Computer Systems: A Programmer's Perspective, which appears to be more focused towards an understanding of how real computers work. Haven't read it myself, but it looks like a good overview.
posted by xil at 8:39 PM on January 12, 2008 [1 favorite]

Response by poster: xil-
When I said "I want to learn it all", I mean a general overview of the field, as I would expect an undergraduate education would give you. I'm interested in the field of computer science as a whole, which is why my question is vague. (Sorry about that, I don't think I was sure from the start what I was looking for)

I want to sample and get a general overview of computer science as a discipline. So it would be a mix of both theory and practical application. What I'm trying to do is to learn what a "computer science major" would learn at the university, if that's possible.
posted by petah at 8:39 PM on January 12, 2008

Response by poster: xil-
I have asked my friends and for the most part they don't know themselves what they're learning. At this point they've taken general education courses, and a slew of physics and math classes with two or three programing classes thrown in there.
posted by petah at 8:41 PM on January 12, 2008

Response by poster: xil-
I think what I'm looking for is the first definition, that of theory rather than "software engineering." That seems to be the distinction the wikipedia article makes.
posted by petah at 8:45 PM on January 12, 2008

I'm a second-semester senior in a computer science program, so the information that follows is based on the curriculum at my particular university.

The first thing you have to do pretty much is learn how to program, which you seem to be well on your way to doing. I'll put in another good word for SICP, which is available for free online (see zaphod's 2nd link above). But once you've learned how to program, then there's the rest of CS. There are many different areas which fall under computer science: I'll go into a few I happen to have taken classes on. You don't have to learn everything in CS: just focus on the parts that interest you.

First, there's CS theory. This is really just a very specialized kind of math, so learning some actual math first is always a plus. First-order logic, set theory and especially graph theory will all really help. CS theory covers a lot of things, including "computation theory", the study of formal ways of thinking about what computation is: this includes things like Lambda calculus, Turing machines, and complexity theory. Sipser is a good text on these topics, with the exception of Lambda calculus, which for some reason seems to be covered mainly by programming language theorists. It also includes algorithms and data structures, but I found that the most useful part of the course I took in this field was the proofs--the actual algorithms and data structures you can look up in a book. Unfortunately, it's hard to learn proofs from a book, and CLRS, the algorithms textbook we used, was fairly dry, and while it was a good reference, it would be hard going to learn the material just by reading the book.

There's also programming language theory, some of which is mind-stretching and is lots of fun, so I really wouldn't neglect this area. And it also lets me plug Programming Languages: Application and Interpretation, a great textbook written by my thesis advisor and available for free online. Programming language theory hits a whole bunch of math if you get into it deep enough: temporal logic, category theory, and so forth all figure into it eventually. If you want to get into the more "math-y" parts of it, type theory in particular, I've been recommended Types and Programming Languages by Benjamin Pierce, but I haven't been able to read it so far.

The only other area of general CS I know at all is operating systems: The Lions commentary on Unix 6th Edition source code is rather dated but still amazingly interesting, and available for free online. I'm not sure if you could use it as an only text in operating systems without extreme difficulty. Andy Tannenbaum also wrote a text that Linus Torvalds was using around the time he started to write Linux, but I can't vouch for it at all personally. In general, the way to learn "systemsy" stuff, IMHO, is to do it yourself. Try writing a kernel, or a network stack! Probably not today, but it isn't nearly as hard as you'd think.

This still leaves lots of things: AI, machine learning, circuit design and electrical engineering in general, information theory, crypto, computer vision/robotics/..., software engineering theory, the list goes on. Have fun, and good luck!
posted by goingonit at 9:02 PM on January 12, 2008 [1 favorite]

Back in 2000, a MIT professor, Philip Greenspun, started ADUni
ADU was a one-year, intensive post-baccalaureate program in Computer Science based on the undergraduate course of study at the Massachusetts Institute of Technology (MIT). The majority of the instructors were professors from MIT and the program was tuition free. After running from September 2000 through July 2001, seeing the first class to graduation, the program was forced to shut down.

This site serves a dual purpose. It is here to tell the story of ADU and it is here to carry on the school's mission of supplying free education. Toward this latter end, provides all course materials and lectures generated during the program to the general public for free use.
This might help.
posted by Gyan at 10:07 PM on January 12, 2008 [3 favorites]

Last semester I took an algorithms class from one of the authors of Algorithms, using that textbook. It's a short book, but it covers a lot of ground, and does so with clarity. I would definitely recommend it. There is a pre-print available online as well, which includes all the chapters.
posted by panic at 10:46 PM on January 12, 2008 [1 favorite]

This is what I took in the late 80 / early 90s:

CS 11 -- Pascal
CS 12 -- LISP
CS 13 -- C
CS 30 -- Systems programming in PDP11 & 68000
CS 111 -- Operating Systems
CS 112 -- Queueing Theory (mathematics)
CS 118 -- Computer Network Fundamentals
CS 130 -- Software Engineering
CS 131 -- Programming Languages
CS 132 -- Compiler Design
CS 141 -- Data Structures
CS 151A -- Computer hardware I (circuit theory, chips, transistors, latches)
CS 151B -- Computer hardware II (systems architecture)
CS 161 -- AI
CS 1?? -- Natural Language Processing
CS 174A -- 3D Graphics
CS 180 -- Algorithms and Complexity
CS 181 -- Formal Automata

Half of it was BS, but half was very useful and all of it was developmental. The program hasn't changed much in 20 years, here's the latest department catalog summary.

I also took the full engineering courses of calculus (3 years) and physics (1 year +). Curiously, the Microsoft interviewer asked me a question that I learned how to answer from the physics.
posted by panamax at 11:56 PM on January 12, 2008

If you have 2 semesters of Java, then you may have a basic understanding of elementary data structures and loops. If you do, I would also echo the other recommendations for the "CLRS", The "Introduction to Algorithms" by Cormen, Liverson, Rivest, and Stein.

Pay special attention to Big-O notation. In industry it will come up in virtually every task. IMO, understanding asymptotic running time is what separates the engineers from the programmers -- you need to understand that an efficient program is not the result of efficient line-by-line code; it is the result of understanding algorithms and structures.

You will also need to develop an intuitive understanding of logarithms and the ability to write logical proofs. You may be able to develop both from the CLRS, mainly through their examples of recursion.

For the first benchmark, I'd say if you can understand why MergeSort is faster than InsertionSort (aka "Straight Selection" as I have heard it called"), then you're got the basics.
posted by cotterpin at 2:43 AM on January 13, 2008

An understanding of logic is useful to a computer scientist as well as to a non-scientist trying to navigate the information age. The textbooks I used in school are long out of print, but the Wikipedia article has some suggestions.
posted by SuperSquirrel at 8:14 AM on January 13, 2008

Data Structures, Data Structures, Data Structures. You'd be surprised how many people we've interviewed who have never used a Map or a Queue before and can't explain what they do. These were covered 2nd semester at my school, along with search algorithms (and above mentioned big O notation), and were an important base for the rest of the courses.

Some people think that knowing the difference between an array and a linked list is not very important in the real world, but the basic concepts are the ones that no one doing on-the-job training is going to want to take the time teach you.
posted by theRussian at 10:28 AM on January 13, 2008

Data structures, abstraction, pointers, optimization, etc. TheRussian has the gist of what to forward to. Most Computer Science tracks will start off with C++ or Java as they are decent languages to become accustomed with for data structures and object oriented programming. Some even use Pascal which really isn't used outside of an educational setting. Eventually you might even get into assembly languages which one step above writing in pure binary.

But more simply, Computer Science is really just a science. It's not really a track for students that want to be business programmers, as only a portion of the track is dedicated to programming. Sure you'll learn a lot of really valuable concepts in COSC that you would not cover in any other track. But there are other curriculums out there that cover programming as well (Infomation Systems Management for starters...the name might vary depending on the university). With ISMN the focus is rather on databases and software design, or more simply, the business side of programming.

Computer Science will have a lot of useful programming concepts in it, however it often then switches to other fields in the later courses like computer logic (electronics) with more emphasis on mathamatical concepts that really don't require programming but rather an in depth knowledge of computer processors.

I often think a lot of Computer Science majors would've found their match better in Information Systems, only knowing that they wanted to write programs at the time they signed up. In a way I would relate CS degrees to people that move on to work at high level technology 3D development, embedded programming, development of operating system drivers, etc. The Info Sys guys on the other hand go on to write...well, VB apps mainly...or web apps. The approaches are different but worth considering either ways.

As far as resources to add, there's not much I could offer than what has already been mentioned. Pick up a good C++ book on data structures and abstraction. Look into books on logic design. Also find a resource on the MINIX operating system (eg. with source code and explanation). It doesn't hurt to minor in mathematics either while taking this course...if only to understand fully what Big-O/Little-O (Omega) notation means when optimizing code.
posted by samsara at 11:32 AM on January 13, 2008

Response by poster: Gyan-
I think that I've seen that ADUni website before. If only they didn't have their lecture videos in RealPlayer format...
posted by petah at 8:55 PM on January 13, 2008

Response by poster: Thanks for all the responses guys, sorting through all this advice will definitely keep me busy for the next few days.
posted by petah at 12:40 AM on January 14, 2008

« Older Use the Hivemind, Luke   |   American Blu-Ray Player; European TV - Will it... Newer »
This thread is closed to new comments.