If you read one book on the computer science side, read this: http://mitpress.mit.edu/sicp/. All of computer science is in this book. Not a simple book at all.
I will commit CS heresy and call Structure and Interpretation of Computer Programsoverrated. The major ideas I recall learning from SICP were tail recursion, static vs. dynamic scope, functions as data, and what people mean by “closure”. Those are somewhat important ideas in computer science, but not, I would say, among the 20 most important ideas is computer science.
(f) the Pareto principle (both in optimization and development),
(g) what/how distinction (abstraction),
(h) undecidability (can’t tell what a general function does by looking at it).
Might add more as I think of them. I don’t remember my SICP so well anymore, but it talks about (c), (d), (e), and (g). (f) is a general engineering principle, not specific to CS, (a), (b) and (h) are on the theory of computation side.
Some big ideas that occur to me, from a systems point of view:
The notion of hiding implementation behind interfaces.
The notion of functional layering—that if the system offers some limited set of features, you can implement other features purely in terms of those lower-level features. This is a key idea behind modern networks.
The notion of building reliable systems out of unreliable parts, using redundancy and retries. This is the key technique in such varied systems as RAID, TCP/IP and MapReduce.
The notion of enforcing safety properties in a programming language. The big insight of programming language design is that you can make it impossible for some mistakes to arise in a given language.
I never actually read SICP so I can’t comment on which of those ideas are in the book.
In my mind the first two bullet points are under (g) (I may have been too abstract in my description of (g), but what I had in mind would include both of these).
Sounds like you approached SICP once it was already beneath your level. The main thing to take away from SICP is that programming is the construction of processes—hierarchical descriptions of what the computer is tasked to do, with no detail left out. This and the implications of it were probably already obvious to you by the time you approached the book.
In my experience, most comp sci or programming textbooks are like grammar, vocab, and style guide to language, whereas SICP delves into the very nature of language itself, it’s purpose, what we use it for, and overviews of why and how we study it. You can drill the grammar and vocab later.
The book is good for theoretical comp sci, awful for business programming. It’s like telling a business freshman to learn calculus from Rudin or Spivak instead of Stewart.
“Theoretical comp. sci.” is Sipser, etc. I suppose this is “conceptual comp. sci.” That is far from a bad thing, though.
Right, “conceptual” is a far better term. Theoretical comp sci is a different beast entirely.
I agree that SICP is accessible to a freshman programmer, but I doubt that it’s the best book for them. Something like Code Complete would be far more useful.
I think we will have to agree to disagree on what the best first book ought to be for a programmer.
Not sure what you mean by this.
It was a joke with a grain of a joke. That is, I believe all programming activity, regardless of application area, has a unifying conceptual core. Because of this, statistical programmers, and business programmers, and web developers, and operating system programmers are participating in the same activity, much like algebraists, topologists, logicians, and analysts.
If you want to get into math you first study what it is mathematicians do, what a formal argument is, styles of proof, subject areas, abstraction, etc. If you want to get into programming you first study what it is programmers do, processes, styles of programming, abstraction, etc.
I guess my position is that when going into a new field, study domain-independent concepts first. That is, study the part of the field that does not decay with time.
OK, thanks for clarifying. As for the “best first book”, it’s probably highly individual. In my field (physics), students are taught easy basics first (F=ma etc.), long before they learn Lagrangian mechanics and relativity. Whether this is due to insufficient math or because the bottom-up approach is more suitable on average, I am not sure.
Yes, but the first chapter of the first book a student uses to learn physics contains a detailed description of what physics is: that it is the study of the nature, properties, and evolution of matter and energy, that it involves collection of experimental evidence and building mathematical, predictive theories from that evidence, etc.
SICP is that “first chapter” for computer science & programming. In terms of theoretical analysis it is actually rather poor—I wouldn’t compare it to Lagrangian mechanics or relativity at all. What it does is set the stage and provide a framework for thinking about computer programming in general, in such a way that keeps you from making common and avoidable mistakes in the future.
(There’s a reason SICP is/was the first class for incoming comp sci freshman at MIT for so many years.)
What IlyaShpitser is saying, I think, is counter-intuitive, seemingly irrational, but generally true: if you make every decision based on $$$ concerns, you lose perspective, a willingness to take risks, the desire to perform creative exploration, and incentive to learn the fundamentals which enable the above. This will make you a mediocre programmer with only moderate $$$ potential, whereas if you focused instead on really becoming a master of your art, $$$ can follow in large quantities.
Here I am just talking about myself in OP’s situation, not about OP. Obviously OP may have different priorities. $$$/effort is not very good in technical fields in general. Given that one wants $$$ and be a techie, I imagine there is some sort of tradeoff involved where one wants “interesting work (given a techie predilection)” but also make a decent living. Given this, the best bet seems to me to just become technically good at what one does (which would involve studying that pesky underlying computer science). Why even bother with a technical field for $$$ otherwise if you are in the kind of percentile that can study quantum physics?
That rather depends. You certainly don’t need comp sci background to write ten pages of spaghetti in VB for Excel. But if the OP wants to actually be a good programmer, a foundation of comp sci will help.
If you read one book on the computer science side, read this: http://mitpress.mit.edu/sicp/. All of computer science is in this book. Not a simple book at all.
I will commit CS heresy and call Structure and Interpretation of Computer Programs overrated. The major ideas I recall learning from SICP were tail recursion, static vs. dynamic scope, functions as data, and what people mean by “closure”. Those are somewhat important ideas in computer science, but not, I would say, among the 20 most important ideas is computer science.
This is a fun game you propose. Here are what I think the important ideas in CS are (no particular order):
(a) turing universality,
(b) distinction of p vs np,
(c) dynamic programming/memoization,
(d) styles: declarative/functional/imperative/oo,
(e) metaprogramming (including algs as data),
(f) the Pareto principle (both in optimization and development),
(g) what/how distinction (abstraction),
(h) undecidability (can’t tell what a general function does by looking at it).
Might add more as I think of them. I don’t remember my SICP so well anymore, but it talks about (c), (d), (e), and (g). (f) is a general engineering principle, not specific to CS, (a), (b) and (h) are on the theory of computation side.
Some big ideas that occur to me, from a systems point of view:
The notion of hiding implementation behind interfaces.
The notion of functional layering—that if the system offers some limited set of features, you can implement other features purely in terms of those lower-level features. This is a key idea behind modern networks.
The notion of building reliable systems out of unreliable parts, using redundancy and retries. This is the key technique in such varied systems as RAID, TCP/IP and MapReduce.
The notion of enforcing safety properties in a programming language. The big insight of programming language design is that you can make it impossible for some mistakes to arise in a given language.
I never actually read SICP so I can’t comment on which of those ideas are in the book.
In my mind the first two bullet points are under (g) (I may have been too abstract in my description of (g), but what I had in mind would include both of these).
Sounds like you approached SICP once it was already beneath your level. The main thing to take away from SICP is that programming is the construction of processes—hierarchical descriptions of what the computer is tasked to do, with no detail left out. This and the implications of it were probably already obvious to you by the time you approached the book.
In my experience, most comp sci or programming textbooks are like grammar, vocab, and style guide to language, whereas SICP delves into the very nature of language itself, it’s purpose, what we use it for, and overviews of why and how we study it. You can drill the grammar and vocab later.
The book is good for theoretical comp sci, awful for business programming. It’s like telling a business freshman to learn calculus from Rudin or Spivak instead of Stewart.
There is only one kind of programming :).
“Theoretical comp. sci.” is Sipser, etc. I suppose this is “conceptual comp. sci.” That is far from a bad thing, though.
SICP is comparable to Early Transcendentals because it is used for freshman comp. sci. courses (but is in fact far deeper than this might imply).
Not sure what you mean by this.
Right, “conceptual” is a far better term. Theoretical comp sci is a different beast entirely.
I agree that SICP is accessible to a freshman programmer, but I doubt that it’s the best book for them. Something like Code Complete would be far more useful.
I think we will have to agree to disagree on what the best first book ought to be for a programmer.
It was a joke with a grain of a joke. That is, I believe all programming activity, regardless of application area, has a unifying conceptual core. Because of this, statistical programmers, and business programmers, and web developers, and operating system programmers are participating in the same activity, much like algebraists, topologists, logicians, and analysts.
If you want to get into math you first study what it is mathematicians do, what a formal argument is, styles of proof, subject areas, abstraction, etc. If you want to get into programming you first study what it is programmers do, processes, styles of programming, abstraction, etc.
I guess my position is that when going into a new field, study domain-independent concepts first. That is, study the part of the field that does not decay with time.
OK, thanks for clarifying. As for the “best first book”, it’s probably highly individual. In my field (physics), students are taught easy basics first (F=ma etc.), long before they learn Lagrangian mechanics and relativity. Whether this is due to insufficient math or because the bottom-up approach is more suitable on average, I am not sure.
Yes, but the first chapter of the first book a student uses to learn physics contains a detailed description of what physics is: that it is the study of the nature, properties, and evolution of matter and energy, that it involves collection of experimental evidence and building mathematical, predictive theories from that evidence, etc.
SICP is that “first chapter” for computer science & programming. In terms of theoretical analysis it is actually rather poor—I wouldn’t compare it to Lagrangian mechanics or relativity at all. What it does is set the stage and provide a framework for thinking about computer programming in general, in such a way that keeps you from making common and avoidable mistakes in the future.
(There’s a reason SICP is/was the first class for incoming comp sci freshman at MIT for so many years.)
Berkeley also.
The youth is wasted on the young, and CS61A is wasted on freshmen. Only years later did I truly appreciate what CS61A was trying to teach me.
He did say “computer science”, not “programming”.
Yes, but the OP is concerned with
which has little to do with comp sci.
Strongly disagree w/ this. $$$ creates vast distortions and crappy norms.
One needs to understand what one is doing.
But $$$ are the very reason the OP is considering programming in the first place, otherwise they’d presumably stick to physics.
What IlyaShpitser is saying, I think, is counter-intuitive, seemingly irrational, but generally true: if you make every decision based on $$$ concerns, you lose perspective, a willingness to take risks, the desire to perform creative exploration, and incentive to learn the fundamentals which enable the above. This will make you a mediocre programmer with only moderate $$$ potential, whereas if you focused instead on really becoming a master of your art, $$$ can follow in large quantities.
What is one trying to do?
Here I am just talking about myself in OP’s situation, not about OP. Obviously OP may have different priorities. $$$/effort is not very good in technical fields in general. Given that one wants $$$ and be a techie, I imagine there is some sort of tradeoff involved where one wants “interesting work (given a techie predilection)” but also make a decent living. Given this, the best bet seems to me to just become technically good at what one does (which would involve studying that pesky underlying computer science). Why even bother with a technical field for $$$ otherwise if you are in the kind of percentile that can study quantum physics?
That rather depends. You certainly don’t need comp sci background to write ten pages of spaghetti in VB for Excel. But if the OP wants to actually be a good programmer, a foundation of comp sci will help.