
Ask HN: Are there any basic primers for Comp Sci? - bonesinger
What I'm specifically asking is not tutorials or code academy-like websites.
I'm looking for primers/website/books that organize information about computer science and web development, for example: how does the web work? What is a session? What are protocols? 
The information I'm looking for is the type you learn in a Computer Science class, not something like Udacity. 
I want to know and why how stuff works, not just "this is how you do it."
The reason for this is because I’ve had some entry-level web dev interviews, but I didn’t know enough of the basic foundational questions to get past the 1st round. I attribute it to my lack of formal education in the computer science field. At best I can categorize myself as someone who just hacks code together (I think someone used the analogy on HN, the difference between a cook who cobbles food together and a chef who creates and innovates?).<p>EDIT: Thanks! I've got a lot of information from everyone and I'm going to go through it bit by bit.<p>I realize I wrote a rather misleading question. I am interested in Computer Science and its abstract topics as well as networking/web topics. I want to know what technology I'm working on and how it works, and I want that theoretical background so that I can be a better programmer.
======
silentbicycle
"Computer science" is a misleading search term for learning about web
development, that's likely to point you towards things like algorithms & big O
notation. By all means, learn that stuff too (it _will_ make you a better
programmer), but also look into the protocols and conventions the web is built
on.

For example, here's RFC 2616 (<http://www.ietf.org/rfc/rfc2616.txt>), the
primary definition for HTTP/1.1. Try writing a web server just using sockets
in Python/Ruby/whatever, based off of that. Don't worry about performance,
handling more than one client at a time, or covering the complete spec, just
look at how the essentials fit together.

I learned a LOT doing this (in Lua); I learn best building from the bottom up.
If you learn better top down, try digging down from whatever
platform(s)/framework(s) you're using now.

If you want to dig deeper, look into distributed systems, Unix network
programming (Stevens's books are great), and let your interests lead you from
there.

------
olalonde
I've often seen SICP recommended as a good overall introduction to computer
science and programming although I haven't fully read it myself. It is
available for free online: <http://mitpress.mit.edu/sicp/>

I am not sure about networking but whenever I want to find a good book on a
given topic, I usually head to Amazon.com and find out the bestsellers or
highest rated books:
[http://www.amazon.com/gp/search/ref=sr_nr_n_5?rh=n%3A283155%...](http://www.amazon.com/gp/search/ref=sr_nr_n_5?rh=n%3A283155%2Cn%3A%211000%2Cn%3A5%2Cn%3A3652%2Cn%3A3740&bbn=3652&sort=popularity-
rank&ie=UTF8&qid=1342970243&rnid=3652)

~~~
fjh
I've read SICP, and while it is a brilliant book, I think it is a really bad
suggestion here, given what the op seems to be interested in.

SICP is a great introduction to programming topics like recursion,
abstraction, and implementation of programming languages. It teaches a way of
thinking about programming, which is quite abstract. It is utterly unhelpful
if you're interested, as the op seems to be, in the more practical concepts of
real-world systems, and the internet / web-development in particular.

------
antidoh
The Turing Omnibus is an interesting survey of computer science. For any
chapter that interests you or that you don't understand to your liking, you
now have a starting point for further focused learning.
<https://duckduckgo.com/?q=the+turing+omnibus>

For more specific topics, look through the entire O'Reilly catalog. There is
bound to be something there that covers at least part of what you want to
learn. <http://shop.oreilly.com/category/browse-subjects.do>

For stuff that you do while you're doing something else, I really like Unix
Power Tools. <http://shop.oreilly.com/product/9780596003302.do>

------
stonemetal
"Computer Networking a top down approach" was the text book used in both my
undergrad and graduate level networking courses. It should be able to answer
your three specific questions. The current edition is the 6th so you can pick
up a used copy of the 5th for around 25 dollars on amazon. As far as computer
science goes there isn't a singular source that covers it all. I would start
out with either the Algorithm Design Manual or Intro to Algorithms(the first
is a bit more self study friendly). They both cover big O notation and data
structures.

------
sunahsuh
The kinds of questions you're asking aren't necessarily covered systematically
in CS curricula either unless you specifically take a networking course, and
even then, depending on the class/professor, specific application-level
protocols like HTTP might not be covered in depth. I didn't really get a deep
understanding of the networking stack (especially specific application-level
protocols) until I started working on networking products, despite taking and
doing well in a 400-level networking class at my university.

I honestly think Wikipedia is a fantastic and fairly in-depth resource for
technical topics. I would start here and follow as many links as you need to
get a better understanding of what's going on:
<http://en.wikipedia.org/wiki/OSI_model> Protocol specifications are also
surprisingly readable. Here's the HTTP protocol RFC (request for comments):
<http://www.w3.org/Protocols/rfc2616/rfc2616.html>

As a newer programmer recently remarked to me, it's tough when you get going
because you don't even know where to look. It's a lot like learning a new
(spoken) language: immerse yourself, understand that bewilderment and
frustration is normal in the beginning, and keep at it until you hit that
inflection point where it starts making sense. The fact that you even want to
get from "phrase book" to "fluent speaker" is a good sign.

------
michaelrkn
"The reason for this is because I’ve had some entry-level web dev interviews,
but I didn’t know enough of the basic foundational questions to get past the
1st round." i would guess that it isn't a lack of "that theoretical
background" that's holding you back, but not having a deep understanding of
very practical skills. most udacity/codecademy-type sites will teach you
programming syntax, but not design patterns. other resources like
railstutorial.org will teach you how to use web frameworks, but not give you
the deeper understanding of what the framework is actually doing if you don't
understand web programming already.

on the programming side, i'd suggest familiarizing yourself with object-
oriented design; i've heard that [http://www.lynda.com/Programming-
tutorials/Foundations-of-Pr...](http://www.lynda.com/Programming-
tutorials/Foundations-of-Programming-Object-Oriented-Design/96949-2.html) is a
great video series. i'm not sure of a good resource to gain a deeper
understanding of web development, but i don't think protocols are the right
place to start. i'd look for resources that really dive into the http response
cycle, mvc pattern, and the guts of whatever framework (such as rails or
django) you're using.

good luck.

~~~
bonesinger
Thanks! I actually went through all the links in this thread and found quite a
few books, specifically Head First Design Patterns + Head First Object
Oriented Analysis & Design.

You succinctly described my plight, "knowing the syntax but not having a deep
understanding" as well.

------
evilthinker
First of I'll assume that by computer science you really mean software
engineering, more specifically network and web applications engineering.
Otherwise if you want deep CS foundations start by getting a good CS theory
book (Sipser or Hopcroft et Al.), and a good algorithms book(Skiena or
Cormen), and complement them with some introductory logic(phil/math
introductions are generally good enough).

For the "how does the web work question", the real question is if you are
really interested in knowing that, if so "Computer Networking: A Top-Down
Approach" gives a really in depth analysis of protocols at the different
levels of abstraction. Otherwise most web related O'Reilly books cover the
surface of what you need to know to develop applications at most small
corporations.

------
ralph
Thanks for clarifying the question. To learn comp. sci. read Aho and Ullman's
excellent C edition of _Foundations of Computer Science_. (That's Aho as in
awk.) What you need for a good grounding all in one place. You can still pick
up a paper edition if you want but they've also made it available as PDFs.

<http://amazon.com/exec/obidos/ASIN/0716782847/mqq-20>
<http://i.stanford.edu/~ullman/focs.html>

------
lifeguard
I think you want the basics of networking as it relates to the World Wide Web.
So let's start at the bottom of the stack and go all the way up to a webpage:

<http://en.wikipedia.org/wiki/Packet_switching>

<http://en.wikipedia.org/wiki/Ethernet>

<http://en.wikipedia.org/wiki/Internet_Protocol>

<http://en.wikipedia.org/wiki/Transmission_Control_Protocol>

<http://en.wikipedia.org/wiki/User_Datagram_Protocol>

<http://en.wikipedia.org/wiki/Client_server>

<http://en.wikipedia.org/wiki/Http>

<http://en.wikipedia.org/wiki/Secure_Sockets_Layer>

<http://en.wikipedia.org/wiki/Domain_Name_System>

<http://en.wikipedia.org/wiki/HTML>

<http://en.wikipedia.org/wiki/CSS>

<http://en.wikipedia.org/wiki/Java_script>

<http://en.wikipedia.org/wiki/AJAX>

<http://en.wikipedia.org/wiki/Inter-process_communication>

<http://en.wikipedia.org/wiki/Algorythm>

<http://en.wikipedia.org/wiki/Java_%28programming_language%29>

<http://en.wikipedia.org/wiki/Sql>

<http://en.wikipedia.org/wiki/Unix>

<http://en.wikipedia.org/wiki/Well_known_ports>

<http://en.wikipedia.org/wiki/Google_page_rank>

There are good links at the ends of these articles. If you can remember some
of the history of these various technologies and mention it in an interview it
could be the deciding factor for a nerd to give you the job :-)

~~~
petercooper
Another tip: if you ever find a Wikipedia article, change the "en" to "simple"
and you'll often get a much simpler explanation. More useful on math and
science stuff than anything else, but for example:
[http://simple.wikipedia.org/wiki/Transmission_Control_Protoc...](http://simple.wikipedia.org/wiki/Transmission_Control_Protocol)

~~~
swordswinger12
Am I the only one who finds simple english wikipedia articles about highly
technical subjects absolutely adorable? I can just imagine a wide-eyed 7 year
old thinking it's the coolest thing they've ever read.

------
billswift
You're still a bit ambiguous, even after the edit. If you want the real
fundamentals of programming, then you need discrete math, algorithms, and data
structures; everything else is built on those foundations. Programming as a
skill, you can get by without them, just as a carpenter doesn't need to know
mechanics. But really understanding computer science without them would be
like a mechanical or civil engineer that doesn't know classical Newtonian
mechanics.

I don't feel comfortable giving specific book recommendations, because I have
no way of knowing whether the ones I own or have read are much if any better
than most of the others out there; and you can look up reviews on Amazon
probably easier than I can.

~~~
bonesinger
yes, I understand what you mean by ambiguous, another poster mentioned that I
look at a CS syllabus and follow something of that nature. I believe that is
what I was trying to say.

------
SEJeff
I'm kind of shocked that no one here has suggested you look at the Khan
Academy's CompSci videos. For simple video learning, you can _not_ beat the
Khan Academy: <http://www.khanacademy.org/science/computer-science>

It is very python heavy, but python is an excellent first language for someone
wanting to quickly get into the thick of things. Enjoy!

~~~
dinkumthinkum
I looked at it just now and it doesn't look like there is much there,
certainly very little CS, and not much intro programming stuff.

~~~
bonesinger
I've recently enrolled in Coursera's SaaS class online. Its extremely intense
compared to Udacity. I've got a few other books I want to read and some
projects to start, I'm super excited!

------
bonesinger
I know now what to do, I've got a few books to read and some potential
projects I should work on to give me that deeper understanding, thanks!

------
naner
Most of the top colleges for CS have their curriculum and course catalogs
online. Use that information to map out your own path.

------
mlwarren
For the specific examples you're asking about, I'd suggest the Web Application
Architecture book.([http://www.amazon.com/Web-Application-Architecture-
Principle...](http://www.amazon.com/Web-Application-Architecture-Principles-
Protocols/dp/047051860X/ref=dp_ob_title_bk))

------
felixhummel
The book "RESTful Web Services" [1] has a really good overview of HTTP in
general and some hints on resource oriented architectures.

[1] <http://shop.oreilly.com/product/9780596529260.do>

------
chipsy
[http://www.amazon.com/Schaums-Outline-Principles-Computer-
Sc...](http://www.amazon.com/Schaums-Outline-Principles-Computer-
Science/dp/0071460519)

<http://en.wikipedia.org/wiki/Outline_of_computer_science>

I flipped through the Schaum's guide once - it's very good, I would have
benefited a lot from it if I were younger. Wikipedia's outline is a good
alternative, just maybe not as compact or tailored to the needs of a student.

------
p_sherman
<http://en.wikipedia.org/wiki/Portal:Computer_science>

------
halayli
Take a look at CS curriculums at well known universities, then check the
syllabus of each course.

