Object-Oriented Design in Ruby – Reading 1. Reusable Code

http://www.amazon.com/dp/0321721330

I started reading the highly-praised ruby book – Practical Object-Oriented Design in Ruby: An Agile Primer. It’s pretty much nicely organized with concise examples. Though I haven’t been able to finish it, I wanted to put some notes on it.

Reusable Code

This book repeatedly talks about reusable code as good example. Reusable would mean that each module has clear responsibility and appopriate dependency to other modules. Also, it means stable code, and less required changes on extending the modules.

There’re a lot of metrics to the good coding, but the “reusability” would be a easier concept to think in mind when implementing a module rather than thinking about the coding techniques.

Impression

This book uses a simple bicycle topic as coding example. Through the course of the content, it gradually being enhanced. Each time the code is enhanced, it reveals the glitch in the previous implementation, and then tries to refactor it. This process is very helpful understanding the important factors maintaining a code in the actual word, rather than keep posting a ideal solution from the beginning.

Advertisements

Posted on January 21, 2013, in Ruby. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: