News for hackers. Stuff that matters.
Re:Blunt and necessary review of programming language books. by GeneralMaximus on Wednesday June 01, 2011 @01:25PM (#2608284)
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."

Re:Blunt and necessary review of programming language books. by tehjones on Wednesday June 01, 2011 @02:11PM (#2608527)
The first chapter of K&R is a tutorial introduction, it explains the entire workings of the C language for someone familiar to programming in a small number of pages(It misses pointers, but it covers a lot).

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.

Re:Blunt and necessary review of programming language books. by geoffreyvanwyk on Wednesday June 01, 2011 @04:23PM (#2609159)
<quote>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.</quote> You must be referring to Think Python: http://www.greenteapress.com/thinkpython/thinkpython.html
Re:Blunt and necessary review of programming language books. by pash on Wednesday June 01, 2011 @11:12PM (#2610499)
Think Python is a fantastic intro-programming text. After mucking about with bits of code for a couple of years, I picked up Downey's previous version of the book, and that's when I became a programmer.

I highly recommend it to the handful of HN readers who are in need of an intro text.

Re:Blunt and necessary review of programming language books. by anthonyb on Thursday June 02, 2011 @02:27AM (#2610968)
It's a model that I followed when I wrote Hello Python. The theory being that the way that most of the good programmers that I know learned was by extending their knowledge, not by inhaling massive chunks of information.

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.

Re:Blunt and necessary review of programming language books. by msie on Wednesday June 01, 2011 @02:14PM (#2608546)
Every time I try to learn Scala I get the feeling that it's too big.
Re:Blunt and necessary review of programming language books. by dkarl on Wednesday June 01, 2011 @06:02PM (#2609571)
It's definitely not the kind of language that you spend a few weeks or months with to learn a few new concepts. It's a language you learn because you can see yourself doing a lot of real programming in it. I call it the C++ of the Java world, meaning that Scala is to Java as C++ is to C: a more complex and expressive language that piggybacks on top of a hugely successful ecosystem and is a powerful tool for those who invest the time to learn it well. I'm learning it because I think it has a bright future in commercial software development, and it's nicer to work with than most languages that can say that.
Re:Blunt and necessary review of programming language books. by andrewcooke on Wednesday June 01, 2011 @07:35PM (#2609884)
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...
Re:Blunt and necessary review of programming language books. by msie on Wednesday June 01, 2011 @10:37PM (#2610390)
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.
Re:Blunt and necessary review of programming language books. by defroost on Wednesday June 01, 2011 @10:10PM (#2610316)
While definitely not small, the stairway book, "Programming in Scala" by Odersky, mentioned in the article, is an excellent tutorial style book. The second edition was just released in January.
Re:Blunt and necessary review of programming language books. by hackinthebochs on Wednesday June 01, 2011 @09:52PM (#2610268)
I'm the exact opposite. I hate to "tinker" around with languages or frameworks. I hate the feeling of not knowing what I'm doing and have to google for every bit of progress.

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.

Re:Blunt and necessary review of programming language books. by timtadh on Wednesday June 01, 2011 @08:04PM (#2609964)
+1 to Go. I am not aware of any books on it. But between the spec, Effective Go, and the tutorial you can learn the entire language in a matter of days if you have serious project you want to work on.
Re:Blunt and necessary review of programming language books. by CCs on Wednesday June 01, 2011 @05:33PM (#2609456)
Had the same issue, same two languages. Google Go still feels far from prime time, so I settled on Scala.

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.

Re:Blunt and necessary review of programming language books. by CCs on Saturday June 04, 2011 @08:26PM (#2620854)
Google research got to the same conclusion: http://www.theregister.co.uk/2011/06/03/google_paper_on_cplu...
Re:Blunt and necessary review of programming language books. by StavrosK on Thursday June 02, 2011 @05:33AM (#2611276)
I also didn't like the verbosity of intro-level books/tutorials and decided to write my own for Python:

http://www.korokithakis.net/tutorials/python/

It introduces most features of the language over 10ish pages, but assumes that you're familiar with programming.

Re:Blunt and necessary review of programming language books. by dlo on Thursday June 02, 2011 @12:16AM (#2610655)
> I picked Go because, seriously, I don't have time to read 145 pages just to get started.

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!

Re:Blunt and necessary review of programming language books. by dlo on Thursday June 02, 2011 @12:22AM (#2610677)
IMO, Scala is a tasteful collection of the best features from a bunch of different languages, including ML, Haskell, Smalltalk, and Clojure. [1] If I taught a survey course of programming language features, such as Stanford's CS 242, Scala is the language I would use to teach it.

[1] And they are not transplanted unmodified; often, since Scala has the advantage of hindsight, they are often modified to be even better!