Blunt and necessary review of programming language books.
drdobbs.com
drdobbs.com
I picked Go because, seriously, I don't have time to read 145 pages just to get started. I'd be fine if Scala By Example introduced me to the major features of the language in a single whirlwind tour so I could at least start solving simple algorithmic problems, but the Scala folks went for something more elaborate. If it works for them, cool.
Ever read the Python tutorial? Even though it omits a bunch of important stuff, like decorators, it gives you enough information to get started with the language. A more dedicated learner can just read the PEPs or the language reference to learn about advanced features as he needs.
This is what I do with Go these days: look up features I'm having trouble with in the reference.
A friend once said this: "I'm convinced that in reality the documentation is the product."
Every book on a language needs this. The best I have seen was in a python book where the author stopped and told the reader enough had been learnt to write any program. The closet to the K&R model I have seen is with the Big Nerd Ranch books.
I highly recommend it to the handful of HN readers who are in need of an intro text.
I'm now reading K&R, and I'm surprised at the similarities, although I introduced new libraries just as much as new language features.
Got David Pollak's "Beginning Scala" book, Googled a lot and after several days of coding it clicked. Well worth the effort! The Web frameworks are not yet there (Lift is complex, Play is slow), but I learnt a lot.
I still keep my eye on Go, code most of the time C++/C++0x, some projects in Scala, and hope one day I can have all the benefits in one place.
I think this is where modern trends in programming language books, and by extension language learners who enable these books, gets it wrong. Everyone is trying to teach you the bare minimum to get started, and they leave you to struggle with the rest. This is a big reason why there are so many programmers who barely know anything below the surface of the language they've been using for years.
I like taking a fairly broad tour of a language before digging in. I like knowing what the essence of the language is. I like knowing whats possible and what isn't. I hate the feeling of being blind, feeling around the room for the door knob to get me into the next room where the process is repeated.
You don't need to read 145 pages to get started. Most people I've talked to only know 20-30% of Scala. But they feel that they already know enough to benefit enormously. Most of the Scala I know comes from the Tour of Scala, which consists of succinct, bite-size explanations of its main features.
On a related note, Scala is a big language because it is a dual language: It has features that are intended to facilitate application development, but it also has features that are intended for framework writers. These features are overkill for you if you're an application writer, and you don't have to learn them, but they are a godsend if you're writing a framework. This is evidenced by the fact that many features that are traditionally done in the compiler of other languages are implemented in the library!
[1] And they are not transplanted unmodified; often, since Scala has the advantage of hindsight, they are often modified to be even better!
http://www.korokithakis.net/tutorials/python/
It introduces most features of the language over 10ish pages, but assumes that you're familiar with programming.
Bigger books sell better.
Is this true? I was always under the impression that bigness was used to justify a higher price point."It is an article of faith in the computer publishing that bigger books sell better. They take up more space on the shelf and readers with a tech problem find a bigger book comforting. Readers aren't really sure what is wrong with their computer and they only have a few minutes in the bookstore so they figure the thickest book is the most likely to contain the solution."
There is a fixed cost, we'll call it X, to get the {book/meal/arrangement) made, the marginal cost of {paper/food/flowers) is small relative to the fixed cost and yet is the dominant factor in perceived value.
Understanding this you can use it to your advantage. You can boost the percieved value of a book or meal or floral arrangement by boosting its pages, vegetables, or flowers. The recipient will feel better about getting and the buyer will feel better about paying for something with a higher perceived value.
Smaller, better books please. I have been, and will continue to, vote with my wallet.
Also, Wikipedia says that "Teach Yourself Scheme in Fixnum Days" is outdated in some parts:
http://en.wikipedia.org/wiki/Teach_Yourself_Scheme_in_Fixnum...
I can't comment about the pandering though.
[1] "This edition of the book drops the design of imperative programs. The old chapters remain available on-line"
[2] http://www.ccs.neu.edu/home/matthias/HtDP2e/Draft/index.html
http://www.ccs.neu.edu/home/matthias/HtDP2e/Draft/i1-2.html
Many chapters after that one are just blank.
I even tried Land of Lisp only because it was supposed to be fun, but unfortunately it used this horrible and widespread format where the author writes all the code for you and proceeds to an explanation.
There is no creation (or creative problem solving) ! And creation is the fun component, it should be the point of programming.
Later, I read the Little Schemer and I found it very fun and engaging. Because I had to think by myself, I realized I learned more in 30 minutes with the Little Schemer than 200 pages of Land of Lisp.
My first attempt at programming was with an horribly dull PHP book. 5 stars on Amazon, but it was again the same format where the author writes all the code for you and then explains it, and did not provide any exercise.
I think the perfect programming book would be a mix of the Little Schemer and K&R : the quiz format for the theory coupled with challenging exercises. There is no greater reward and way to learn than solving problems by yourself.
I have seen most students prefer to presented with a whole working program and then expand on it in the challenges the book provides. The author of this article was expressing a desire for shorter books that give full code listings rather than code snippets and challenges that you seem to prefer.
SICP itself (http://mitpress.mit.edu/sicp/) is worth checking out, too. I doubt you would find the book itself to your taste, but there are programming exercises at the end of each section.
Also, for what it's worth, my favorite language for working Project Euler problems is Scheme, by far.
It was if those guys had used the language for a few years building a diversity of things with it; kept notes; and then really thought about the future reader. I'd have thought that it was a revolutionary approach, not a historical oddity.
I hope that's a joke. If you don't know who K and R are, and where they wrote the book, you should look it up.
It's sad really. I hope ePublishing fixes this.
Think of it- if publishers won't agree, bypass them and drum up support by getting enough pledgers to prove them wrong. Then self-publish and have the last laugh.
There are a number of self-publishing options out there, I believe. Let Over Lambda is a Lulu print, I believe.
I am sure that you could find someone to serve as editor for the book as well.
(there's a consulting idea: book editor! )
I liked most books from Addison Wesley's C++ In Depth Series edited by Stroustrup, they are all thin (around ~300 pages), esp. Exceptional C++.
The best of the humor is contained in sidebars dubbed "light relief"; I seem to remember a passage indicating the author was not invited to write a specification because the other authors "didn't want any light relief in it" or something to that effect.
Sadly, O'Reilly appears to have lost interest in this series; the Rails book dates to 2006 and is too far behind now to recommend. Look no farther than the #2 rated Amazon review ("28 of 29 people found the following review helpful") to find out why: "Given that this book is only 127 pages long without the Appendix, it's a pretty pricey little item.... a $29.99 retail price seems exorbitant... this little book would make a great introduction to a more comprehensive book on Rails. Stand-alone, it feels like a rip-off."
I was also going to recommend "Effective Perl Programming" -- but now I see that the second edition has been bulked up to 500 pages from the original ~200. Ugh.
Lately I have decided that I won't even buy computer books that are more than ~300 pages, and I would prefer if they were more in the 100 to 200 page range. I'll take a short, concise, highly target book over a thousand page monster any day. And I'm more than willing to pay "full price" for the short book.
Well written, covers pretty much everything you should use, good, clear examples.
Available free online: http://onyxneon.com/books/modern_perl/
Maybe also Graham Hutton's Programming in Haskell[2]. It's certainly wonderfully concise and dense (you meet a simple Haskell quicksort in the second chapter, as I recall), but I have to admit that I haven't had a chance to finish it.
One more: The AWK Programming Language[3] by Alfred V. Aho, Brian W. Kernighan, and Peter J. Weinberger, but that's almost cheating since one of the authors is K from K&R.
- NW: Algorithms and Datastructures. 179 pages. PDF: http://www-old.oberon.ethz.ch/WirthPubl/AD.pdf
- NW: Compiler Construction. 131 pages. PDF: http://www-old.oberon.ethz.ch/WirthPubl/CBEAll.pdf
Both books are really brilliant and it always fascinates me how much content he packs into the books. Highly recommended. (I like "Project Oberon" too, but it has probably too many pages for this category [>400].)
I also enjoyed the first edition of Learning Perl by Randall Schwartz (~200+ pages). This book introduced me to regular expressions.
Very slim, and very good - Javascript: The Good Parts http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockfor...
For a C reference, Harbison & Steele is excellent - http://www.amazon.com/Reference-Manual-Samuel-P-Harbison/dp/...
"Steele" is Guy Steele, btw - http://en.wikipedia.org/wiki/Guy_L._Steele,_Jr. (author of "Common Lisp, The Language", developer of Fortress, etc etc).
I did not use Lutz to learn python, for example, I used David Beazley's Python Essential Reference. He includes a brief tutorial of the implementation and basic language features and moves to a large selection of the python standard library. My favorite C book is the reference by Harbison and Steele, which is a careful, thorough, and detailed reference of the language features and some of the standard library.
It has been my experience that the books I get the most out of are the more concise ones. There appears to be a negative correlation between the size of a programming book and its actual usefulness.
All the ones I've seen either dumb things down way too much with cartoons and such until they're difficult to slog through and pick out the relevant info, or they assume the reader either already has a working knowledge of Haskell syntax or a working knowledge of group theory.
Addison Wesley
Appress
O'Reilly(cookbooks fare better)
How can I get in touch with Andrew Binstock? (The author of this wonderful article.)
I know O'Reilly has the llama and alpacas that are intended to be the actual tutorials, though I can't really speak for their quality (I actually did learn Perl via Camel Book + external projects).
Correct. Programming Perl is not meant to be a tutorial. That role is filed by the most excellent O'Reily Book "Learning Perl."*
* My first scripts were done using Learning Perl as my tutorial. It is still one of my favorite programming books.
Good thing that programmers are more often self-learned, which makes the problem relatively benign compared to say, economics books.
This is not true. Authors get paid by the number of books sold, period. For my book we had an approximate target length, but that was a precondition. Past that gate, all we saw was $x/copy.
I've never ordered or written a book myself, so I could very well be wrong.
The only thing that's important about page count is that there be enough pages that the book's title is visible on shelves and not so many that you need to reinforce those shelves.
This minimum page count, by the way, is why so many business books suck: they have an idea and examples that they could get across in 10-20 pages but have to stretch it to 300 generously-whitespaced repetitive pages in order to have a physical object on shelves to sell. For this reason alone, we should hail Kindle and other ebook platforms that let you make money from 20 pages. If I never again have to read the business equivalent of an ASCII table, I'll be a happy man.