Learning the Ruby Way – It’s Different

Ruby

I've been working with a co-worker on some code for the project I'm on, and I'm learning a lot about the Ruby way of doing things. It's a lot different from the typical Java/C++ coding I've been used to over the years. In short - things are meant to be simple, but there can be a lot of them. So if you have a class that holds Requests, and queries them and loads them, that's really three classes in Ruby. You want to isolate the roles and responsibilities to one per thing.

This is very different from C++ where the overhead of a class is 50 lines, and then there's the implementation file as well. It'd end up being more boilerplate than functional code if it was written with the guidelines of methods less than 10 lines and classes less than a page. It's just an entirely different world.

And I'm enjoying learning this process and style very much. I can see the goals, and the reasons for it. It's pretty simple, really. But it's hard to do in a lot of other languages. Hard because of the overhead or boilerplate needed for those languages. Ruby is nice in that regard, and I'm excited about learning more.

It's a process, and I'm happy to be on the path.