Software Engineering discussion

18 views

Comments Showing 1-5 of 5 (5 new)    post a comment »
dateDown arrow    newest »

message 1: by Brad (new)

Brad (bradrubin) | 264 comments Mod
I view languages as tools, and it is difficult to assess a tool without knowing the task. A saw is good if you need to cut wood, and bad if you need to pound nails. Language preferences are a highly personal, almost religious, topic. So, the following (and my comments for all the future languages) are more first impression and thought, and less dogmatic pronouncement.

Installation on my Mac: None, it is built in!

Overall, my impression of Ruby is that is "OK", but I didn't fall in love like many (including the book author) have. I wonder how much of the love is based on the freedom and low overhead of dynamic languages (hence would also apply to Python), as well as the Rails framework that uses this language?

This chapter (and book) tended to focus on the corners of the language, to differentiate it from the others and highlight unique concepts and features. This skewed my experience (and opinion). For example, I am not a fan of Domain Specific Languages (DSL) in most cases because they require the reader to learn both the base language and the metalanguage. There are valid exceptions, such as persistence and object server frameworks, but I think that metaprogramming should be used sparingly.

The two most interesting and important language features in this chapter, for me, are Modules (especially as used for mixins as an alternative to implementation and interface inheritance) and Blocks (because of the growing use in other languages like C and Objective-C and their impact on concurrent and mutli-core programming).

I don't think that dynamic languages, like Ruby, scale up well for large projects where strong typing is more benefit than overhead and drudgery.

I did all the exercises. I think that doing so is a crucial, but time consuming, part of reading this book. The Day 2 Tree initialization exercise took me some time to get working, as did the Day 3 CSV exercise (mainly because I think that the text description of the various ActsAsCsv alternatives is a mess). I would suggest adding another line to the test case for this exercise, such as "bears, ohmy", before you think that you have solved it!


message 2: by Aleksander (new)

Aleksander Shtuk | 84 comments Having working program in Ruby felt like an achievement :) Though I should, probably, figure out how to use a debugger or find IDE if I ever decide to come back to it.

I've completed all of the assignments:

Day 1 I spent some time figuring out that I misspelled “elsif” in bonus problem. I was getting different errors, but not that one…

Day 2 I spent most of the time figuring out HOW to solve Tree problem – hash, blocks, Ruby API. After that implementation was simple. Same thing with grep utility, but less time consuming.

Day 3 CSV application was most the interesting problem. I would suggest adding rows and columns – one, two, three to make it more interesting. I got stuck on def self.method_missing in CsvRow. The other problem I had was with csv file – I missed a space in “one,two”, so my headers array had only one element, which caused few problems with program flow.

I will keep Ruby in mind if I need scripting language, though Perl seems to be more straight forward language…


message 3: by Erik (new)

Erik | 165 comments I'm glad I read about Ruby. This seems to be a very popular language.

This chapter left me wanting to know more about the Rails framework.


message 4: by Julius (new)

Julius (shadow_of_life_89) I have been working on ruby on rails for like half a year. It is an enjoyable experience to work with ruby. When it comes to readability, nothing beats it. I love the consistency in ruby, everything is object, unlike in python, you can still find functions like len(),str(). In ruby, everything is object! what's more interesting is the on-the-fly class changes, which adds incredible flexibility to the code. Awesome language all in all. I am one of those who used ruby and fell in love with it.


message 5: by Aleksander (new)

Aleksander Shtuk | 84 comments It was interesting to find that Ruby was used for algorithms examples in Clever Algorithms book (Artificial Intelligence, http://www.cleveralgorithms.com/). Seeing how Ruby is used in this kind of material really inspires to learn the language. Unfortunately Seven Languages in Seven Weeks didn't do that for me.


back to top