Project Ramon

A learning journey from a Ruby noob perspective

Picks of the week: YARD and Clean Ruby

potw_12-28-13_header_img

Since the end of 2013 is fast approaching, I thought it fitting to share some resources of great interest to me while perusing the web.

YARD

potw_12-28-13_img1

Ever since I started using PullReview, to provide feedback on some of my Github repositories, I’ve come to realize little by little that documenting Ruby code isn’t necessarily the horrible idea I perceived it to be when I first picked up the language. I have a desire to someday write a gem and can see, at least in that case, where adding documentation would be beneficial.

Here’s a description of this documentation generation tool from the YARD site.

YARD is a documentation generation tool for the Ruby programming language. It enables the user to generate consistent, usable documentation that can be exported to a number of formats very easily, and also supports extending for custom Ruby constructs such as custom class level definitions. Above is a highlight of the some of YARD’s notable features.

And of course YARD comes with much more functionality, including the ability to serve documentation for gems, the ability to group methods into logical sections, and much more. You can read about all of the new features in YARD 0.6 in the What’s Newdocument.

I haven’t had an opportunity to add documentation to any projects as of yet, but when the need does arise, I’ll be thinking gem install yard.

Clean Ruby

potw_12-28-13_img2

I’ve been on a bit of a hunt lately in my Ruby learning journey. At first, the challenge was “How do I get this composition thing to work?” I have stumbled on and around that answer for the past few months, and recently gained a little insight into that arena. Now I’m in the process understanding the cases when using a constructor to initialize objects of different types into my classes makes sense.

The process has been full of the typical ups and downs of learning something new. But I have an AirPair scheduled for Monday, and I know for sure that things will make much more sense to me after an hour with Edward Anderson.

During all of the google searching on the topic of sharing information between classes, I’ve stumbled upon some resources that explain the importance of creating flexible interfaces. I’m not sure if these sorts of topics are meant for more advanced programmers, but the topic interested me greatly and I figured why not learn a little more about it.

This talk by Jim Gay briefly covers interface building and the DCI paradigm. I can’t tell you how exciting this talk was to watch! I’ve spent nearly 4 years trying to learn to program on my own, and to watch how well organized code ‘can be’ is definitely something I’m looking forward to producing consistently.

I plan on purchasing his book Clean Ruby tonight.

Enjoy the video!

Advertisements

Categories: AirPair, Newbie, Ruby

Tags: , , ,

2 replies

  1. Project Ramon!

    Thank you for this – I, too, am just barely getting my feet wet in learning to code in Ruby. I look forward to reading through your blog and seeing how your journey has been treating you…

    Thanks again,

    Randy

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