
Blunt and necessary review of programming language books. - thewonggei
http://drdobbs.com/tools/229700183
======
GeneralMaximus
I'd been meaning to pick up a new language, and a few weeks ago I pared down
my list of choices to two languages: Scala and Go. Then I went looking for
"official" tutorials/references. For Scala I found _Scala by Example_ , a 145
page PDF that comes with the Scala docs. For Go, I found the Go tutorial -- a
very short tutorial with a bunch of examples.

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."

~~~
msie
Every time I try to learn Scala I get the feeling that it's too big.

~~~
andrewcooke
It struck me the other day that I would _love_ a "Scala: The Good Parts".
Wouldn't it be great if there was a small, powerful kernel in there,
somewhere, and someone explained it...

~~~
msie
Even if there were such a book, you'd have to deal with other people's code
that used the "Bad Parts" of Scala. I dread deciphering clever Scala one-
liners.

------
peterb
I agree 100%. K&R is the standard all authors should strive for. The length of
these books is also our fault. Bigger books sell better. I hope there is a
backlash brewing. K&R, Little Schemer, Smalltalk Best Practice Patterns, were
all great small books.

~~~
fogus

        Bigger books sell better.
    

Is this true? I was always under the impression that bigness was used to
justify a higher price point.

~~~
ChuckMcM
Its absolutely true. The exact same effect occurs in restaurants and floral
arrangements.

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.

~~~
fogus
Wow, great answer. I would love to read more about the psychology of this.
Does it differ across cultures?

------
Rickasaurus
I've been begging publishers to let me have a go at a ~100 page F# tutorial
book, but they've told me again and again that books without a wide enough
profile on the shelf just won't sell.

It's sad really. I hope ePublishing fixes this.

~~~
InclinedPlane
It's not worth the trouble to go through a publisher anymore. You're not going
to make any money on a tech book no matter how popular it is. The smart move
in the modern age is to work on the book in the open with a blog and then self
publish an ebook. If you like you can even sell it or ask for donations.

~~~
Apocryphon
I'm starting to think that the ransom model is the wave of the future for
self-publishing. If it can work for small-time written works publicized online
like role-playing games, what about other kinds of books:
<http://en.wikipedia.org/wiki/Threshold_pledge_system>

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.

~~~
InclinedPlane
The combination of kickstarter-like funding models complemented by transparent
incremental development models (i.e. blog as you go to increase interest,
release the finished product later, or construct a finished product from
organic blog posts) certainly lowers the threshold substantially. More so, it
increases the strength of monetary feedback to a degree that it becomes much
more financially viable for writers to make a living off their works,
especially for technical non-fiction. I'm very excited to see the
tranformation of the writing profession that is upon us.

------
100k
Part of this stems from a pre-internet mentality. "Of course I need a full
function reference! Where else would I find it?" Now you just Google it. A
thinner book can leave the reference to the search engines, but for some
reason this older way has become entrenched.

~~~
gaius
Yes, but that attitude is not dead: how many projects have you come across
where the _only_ documentation is the JavaDoc or equivalent? It allows someone
to tick the box that yes the documentation is done, with minimal effort, but
it's not that useful to the next programmer, who really needs sample code, oh,
I get this from that, and this from there, then I feed them both to the
function...

~~~
akronim
JavaDoc _can_ be good, there's nothing to stop you including short usage
examples for a class. Not that it's that common...

------
Apocryphon
His point about JavaScript is great. Based on Amazon reviews, I couldn't find
a single concise tutorial book for beginners from any of the major publishers.
I finally bit the bullet and bought the paperback version of Eloquent
Javascript (<http://eloquentjavascript.net/>) which is not only updated
compared to the site, but looks to be very promising in terms of brevity and
emphasizing hands-on portions. If I wanted a reference guide I have my copy of
JavaScript: The Good Parts.

------
notsosmart
So aside from K&R, what are some of the best small books?

~~~
mapgrep
I really enjoyed O'Reilly's compact "Up and Running with Rails," which I
bought because I could never remember the basics after two reads through the
default (monster) rails book, "Agile Web Development with Rails."

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.

~~~
jleader
"Modern Perl".

Well written, covers pretty much everything you should use, good, clear
examples.

Available free online: <http://onyxneon.com/books/modern_perl/>

------
bartonfink
A further point is that digital distribution does NOT relieve the author of
the responsibility to pare down a book. An 1800 page PDF is just as bulky and
opaque as an 1800 page book, even though I don't have to lug the PDF around
with me.

------
Goladus
In the long run (and often even in the beginning) I find well-written, well-
organized reference material to be more useful than a tutorial guide.

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.

~~~
adambyrtek
I never understood why would anybody want a bulky reference book describing
the standard library, when they same information – only more up-to-date and
searchable – can be found online.

------
revscat
I have the Java book -- tome -- he talks about, and completely agree. I
purchased it years ago when I was first learning the language, and after
attempting to slough through it I wound up giving up.

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.

------
drblast
It might be better now than since I last looked, but the one language I
haven't found a good tutorial for is Haskell.

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.

~~~
Confusion
I found 'Learn you a Haskell for great good' (<http://learnyouahaskell.com/>)
excellent. It does not depend on the cutesy cartoons and nothing is dumbed
down. I think it does not suffer from the criticism levelled in this article:
it has plenty of code in the introductory chapters. Not 20 lines, but that's
because fewer lines are needed.

------
cypherpunks
Anyone know of the equivalent of Stroustrup for Python? If anyone's not
familiar with Stroustrup, his book on C++ explains the language in-depth, and
gives clear rationales for the design decisions made, so you understand not
just the hows but also the whys. It's not a reference manual -- it emphasizes
depth over breadth -- but it's also not a tutorial.

------
tehjones
Publishers that I have learnt to avoid (overly verbose, code snippets instead
of working programs.

Addison Wesley

Appress

O'Reilly(cookbooks fare better)

------
ramy_d
just dropping my two cents, I did not enjoy the pick axe, and when I turned to
learn erlang I was essentially weighing two options: Pragmatic Bookshelf's
erlang book and O'Reilly Media's erlang book. I chose O'Reilly's because I
didn't want a long winded tutorial, I want the feature list gradually shown to
me in order of complexity so I can jump into my own project without having to
build the outlined in a book. The C++ langauge tutorial on cplusplus.com is
also written this way, it presents the language's funtionalities in order of
complexity.

~~~
kanak
I found it worthwhile to read the erlang books concurrently. Other than a few
misalignments, they present topics in roughly the same order, but the way they
explained the different topics were different enough that I found myself
learning something new.

~~~
ramy_d
how ironic that you would read 2 erlang books concurrently.

------
johnzabroski
EDIT: Duh! His email is at the bottom of the article. Oof.

How can I get in touch with Andrew Binstock? (The author of this wonderful
article.)

------
qntm
Programming Perl is definitely guilty of this.

~~~
masterzora
Is it supposed to be a tutorial book? I always thought that it was trying (and
epically succeeding) to be a massive reference.

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).

~~~
qntm
I learned Perl by reading Learning Perl, but even trying to use Programming
Perl as a reference since then has been difficult for me. The book is
conversational and humorous in its tone, which makes it _extremely_ verbose
and irritating to read when I'm actually trying to get information out of it.
There's too much raw text and not enough examples, particularly when it comes
to syntax. I also find that because the book attempts to be a complete
reference, and because Perl at its core is insanely complicated, Programming
Perl (like the Perl online documentation) spends far too much time dwelling on
minor technical details and edge cases which no sane coder should ever be
thinking about using.

------
zyfo
Too bad authors get paid by publishers by the number of pages, and publishers
push the books to education, where the attention economy takes care of the
rest.

Good thing that programmers are more often self-learned, which makes the
problem relatively benign compared to say, economics books.

~~~
CWuestefeld
_Too bad authors get paid by publishers by the number of pages_

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.

~~~
zyfo
I've heard it independently from people working at my economics and finance
department. Are you sure it applies to all textbooks?

I've never ordered or written a book myself, so I could very well be wrong.

~~~
gnat
I worked as editor for O'Reilly and am an author for O'Reilly, and there's no
page count juju in our royalty payments. You get paid 10% of what we get for
books that sell. End of story (for print, things get weirder in ebooks but not
so weird that pages enter into the picture).

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.

------
timepilot
Completely agree!!

