small medium large xlarge

Headshot_pragsmall
30 Nov 2011, 17:10
Brian Tarbox (41 posts)

I know that the Pragmatic crew are huge fans of Ruby but this is a book about databases and so I think you would do far better to use a more mainstream language like Java for your examples. I’m a Scala fan but Java examples don’t turn me off. I think a lot of people who might otherwise be interested in this book will skip it due to the focus on Ruby.

Me-new-3_pragsmall
05 Dec 2011, 17:49
Aston J (18 posts)

I’d have to disagree with you there Brian. I’d argue that Ruby’s “natural” syntax is easy enough to decipher even if you don’t know Ruby - far more than other languages, such as Java.

Headshot_pragsmall
06 Dec 2011, 16:58
Brian Tarbox (41 posts)

Respectfully, do you see the irony of being a Rubyist telling me as a non-Rubyist that non-Rubyists will find Ruby easier to read than Java? :-)

In asking around, every Java person I’ve spoken to have said that this book being in Ruby is off putting to them.

Pete_head_pragsmall
06 Dec 2011, 23:32
Peter Brown (2 posts)

Brian, I think you may be misled as to how much Ruby is actually in the book. I haven’t read the entire book yet, but from what I can tell, there’s only a handful of examples that are actually written in Ruby and probably more are in JavaScript. It seems like they’ve done most of the examples using the native CLI for when available and tried to limit the amount of scripting required. Neo4j examples are done in Java and Groovy.

25233_377319146748_591736748_3799641_97127_n_pragsmall
12 Dec 2011, 23:05
Eric Redmond (21 posts)

We don’t focus on Ruby. I’d guess there is only 4-5 pages of Ruby code in the whole book, and maybe 9-10 pages of Javascript. We avoided programming languages whenever possible, but only use Ruby and Javascript because a) they’re easy to read, b) lots of people already know them, c) a lot of NoSQL implementations support Javascript. Most of this book is sticking with whatever language is natural to the database–but not all DBs actually support a DSL at all.

There are dozens of popular programming languages (too many to cover and keep the book short). We fully suggest anyone with an interest in one, download a driver and poke around. The concepts will be the same, which is the point of this book.

Here’s a language breakdown:

PostgreSQL (SQL), Riak (curl and a little Ruby data populater), HBase (shell is jruby), Mongo (shell is Javascript), Couch (Javascript/node.js), Neo4j (Gremlin shell which is a Groovy DSL), Redis (redis command shell, Ruby for clustering, Node.js for final project).

I hope this helps!

Headshot_pragsmall
12 Dec 2011, 15:21
Brian Tarbox (41 posts)

Thanks! I’m getting the beta book today (for reading on a long flight tomorrow)!

Avatar_pragsmall
12 Dec 2011, 15:35
Jim R. Wilson (85 posts)

Thanks for taking the time to comment! We welcome your feedback :)

One of our design goals was to reduce the total number of presented languages when it didn’t conflict with learning the material. JavaScript features prominently since it’s the native communication language of two of our databases (MongoDB and CouchDB), and JSON is present as a data storage and transfer protocol across many of them.

HBase’s shell is in JRuby, so since it would be needed there we tendend to use Ruby when JavaScript or another language wasn’t the obvious best choice (in our opinions). Gremlin is the most suitable language for interacting with Neo4j, so even though other languages (like Ruby and Java) were possible, Gremlin was the most sensible choice. Likewise, even though it would have been possible to use Java and JDBC to communicate with PostgreSQL, SQL was the obvious best choice.

We understand that we can’t please everybody, and we appreciate you taking the time to consider the book in any case. Cheers!

Generic-user-small
20 May 2012, 11:10
Sean Carmody (2 posts)

As someone who has barely a passing acquaintance with both Ruby and Java, I’d have been more put off by lots of Java! Loving the book so far.

You must be logged in to comment