RubyTapas – Free Episode Trial

Just watched a couple of screencasts in the above. Nice. There’re just too many useful resources around there, and I need more time to check them around!

Some notes are,

This episode talks about changing variable scopes without affecting the code which refers to the variable. In ruby, signatures of method and instance variables are identical. If variables are reffered through accessors, it becomes flexible and easily extended. It would be a good example for showing the advantage of using “var_name” accessors instead @var_name.

[Command-Query Separation (CQS)]
This episode talks about CQS which is a practice to seperate command methods (change states) and query methods (get states). Having a method with these two aspects makes the code complex, and it’s good practice to separate them out.
The concept is understandable, and maybe this episode shows an good example that mixing these 2 makes it difficult to test each aspect separately. But, in ruby world, there’re many methods that do both, as every method returns value. I’m yet having difficulty to judge what’s good and what’s not. I may need more learning on this point.


Posted on February 28, 2013, in Ruby. Bookmark the permalink. Leave a comment.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: