Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Feedback on my first project?

So I've been moving along nicely with Ruby for a little over a month now, and I'm at the point where I would love any kind of critique of my coding. My first project is a pretty well commented CSV converter hosted on GitHub.

Any kind takers that could help me out? Would be much appreciated!

1 Answer

Hi Eric,

This looks like a great start.

Parts that are good:

  • Great documentation and README!
  • The code is pretty well structured.

Parts that could be improved:

  • Most of you're class names are verbs. In general, your classes should be nouns and the methods should be the verbs. Maybe you could change the VerifyFile class to a Verifier that takes a file as an argument and has a verify_file method instead. Once you start thinking about it this way, you're objects should fall into place a lot easier.
  • You named a most of your files with a prefix (e.g. cli_). You could namespace these files with a module (e.g. cli). If you look at other gems, you'll see this convention.

Go ahead and push this up to RubyGems. There's no harm in doing so, and it should simplfy the install process.

Thanks tremendously for the feedback! The goal of the tool has now changed quite a bit (much more specific to FrontAccounting; lots of oddly specific formatting that had to be dealt with), but your advice definitely still applies.