Subscribe to Jack of all Languages        RSS Feed
-----

Ruby in Seven Languages in Seven Weeks

Icon 3 Comments
You couldn't find a book title that aligns more perfectly with my blog's mission statement: Seven Languages in Seven Weeks by Bruce A. Tate. It's a whistle stop tour of seven programming languages. Each one is chosen for an aspect of its programming model.

The languages are Ruby, Io, Prolog, Scala, Erlang, Clojure and Haskell. I've met four of them before but Ruby is the only one I've really used outside an introductory tutorial. I'm quite excited that Prolog is on the list. I've heard some good things about it and quite fancy trying it out.

Tate doesn't claim to be able to teach seven languages in less than two months. (The introduction begs you not to buy the book if this is what you are after.) Instead, he offers an introduction to the basics of each language: just enough to let him explore the programming model. The reader is expected do some independent research to progress through the book as there is no space for installation instructions or explanations for common programming concepts.

First Up is Ruby

The Ruby section starts with a little history and a brief interview with Ruby's creator, Matz. Day one covers some language basics including duck typing. Day two is functions, collections, classes and mixins. Day three is open classes, writing DSLs, macros and meta programming with modules.

Let that sink in for a moment: Domain Specific Languages on day 3 of a new language. That kind of stuff is usually left to a chapter near the end of a weighty tome.

I've used Ruby before so the early exercises were nothing new. I was glad of the refresher because day 3 was entirely new. In Java land we just don't have tools to do most of those things, at least not without spending a few weeks writing a framework first. In Ruby they were so quick and easy.

Of course, in such a lightning quick tour, Tate can only skim the surface of meta programming which must be an incredibly rich topic. I feel that working through the book has given me a little insight. I understand what some of the tools are and I can see where some of them would make my programming life easier (mixins in particular).

However, others techniques are still a bit opaque to me. Meta programming with modules is one such area and although the example in the book explains how all the parts work, it doesn't demonstrate why they are useful. After commenting out a bunch of lines in the book's example, I was left with a simple mixin, It did the same job as the original (although it went about it a different way) so I can't help wondering if a better example could have been given: something that couldn't have been solved more easily with another technique.

There is obviously something I am not seeing and the book's introduction excuses Tate from explaining it to me in detail. He's given me a starting point for independent research and that's good enough. The difficult decision is choosing between doing that research now or pushing on to Io in the next chapter.

3 Comments On This Entry

Page 1 of 1

jon.kiparsky Icon

22 September 2014 - 11:12 PM
Sounds like fun! I've got a few things on my plate right now or I'd want to run out and pick up a copy... but the next time I have seven weeks clear to play with, this is definitely what I'll be doing! :)


Quote

He's given me a starting point for independent research and that's good enough. The difficult decision is choosing between doing that research now or pushing on to Io in the next chapter.


Push on! Don't kill your momentum!
0

cfoley Icon

22 September 2014 - 11:53 PM
Each week only has three days. The chapters are short and the exercises are not overwhelming. It's like the author knows that his readers will be trying to squeeze it into their already busy lives.

I have pushed on. I had a chat with a colleague and I'm happy enough with meta programming, at least for now.
1

xclite Icon

20 October 2014 - 10:51 AM

jon.kiparsky, on 23 September 2014 - 02:12 AM, said:

Sounds like fun! I've got a few things on my plate right now or I'd want to run out and pick up a copy... but the next time I have seven weeks clear to play with, this is definitely what I'll be doing! :)/>


Quote

He's given me a starting point for independent research and that's good enough. The difficult decision is choosing between doing that research now or pushing on to Io in the next chapter.


Push on! Don't kill your momentum!


I've got a copy you can borrow if you find that seven weeks.
0
Page 1 of 1

Trackbacks for this entry [ Trackback URL ]

There are no Trackbacks for this entry

October 2017

S M T W T F S
1234567
891011121314
151617181920 21
22232425262728
293031    

Tags

    Recent Entries

    Recent Comments

    Search My Blog

    0 user(s) viewing

    0 Guests
    0 member(s)
    0 anonymous member(s)

    Categories