website/content/blog/please-keep-using-ruby.md
James Harton 68d297ef61
All checks were successful
continuous-integration/drone/push Build is passing
feat: import contents of dev.to blog.
2023-08-16 14:53:37 +12:00

46 lines
5.8 KiB
Markdown

---
title: Please keep using Ruby
published: true
description: This programmers plea for you learn some good OO
date: 2018-09-19
tags: ruby, healthydebate
---
There was a lot of mixed response to my [last post about Ruby](@/blog/please-stop-using-ruby.md) - and rightly so. Although I still don't think that any of my arguments are wrong, I talked only about the technical reasons why Ruby isn't a good fit for modern development. In this post I want to talk about why Ruby can still be a good choice for you.
## Rails is not Ruby
A lot of people who consider themselves Rubyists are really Railsists. I have worked with a number of developers who whilst able to play the role of an intermediate developer (ie consistently deliver unsurprising results) on a Rails project needed to be taught basic programming skills like opening a file or calculating the rolling average of an infinite stream. This isn't bad per se; these developers are more than able to handle most of the day-to-day tasks they're confronted with and rely on more experienced developers for assistance where needed.
Last year I took the [Ruby Association Certified Ruby Programmer Silver exam](https://www.ruby.or.jp/en/certification/examination/) as a way of assessing it's use as a training tool. Whilst there were [not many surprises](https://gitlab.com/snippets/1755403) for me it was an extremely valuable (and cost effective) way to level up our less experienced developers and although they found it challenging the feedback from those that have sat the exam was very positive. If you're stuck in the rut of just putting code in the same three folders over and over again I suggest you broaden your horizons and write some Ruby.
## Ruby wears it's blemishes with pride
As I said in my last post, Ruby's DNA comes from [Perl](https://www.perl.org/) and [Smalltalk](https://en.wikipedia.org/wiki/Smalltalk). It also has a 23 year history of adds, moves and changes to it's standard library. As a consequence the standard library API's are all over the place. Some of them [are obviously wrappers around libc](http://ruby-doc.org/core-2.5.1/Process.html#method-c-getpgid), some of them are [beautifully functional](http://ruby-doc.org/core-2.5.1/Enumerable.html) and some of them are [ill-advised Perlisms](http://ruby-doc.org/core-2.5.1/doc/globals_rdoc.html#label-Pre-defined+variables). Learning the Ruby standard library well exposes you to number of different programming styles and concepts and regardless of whether you or I think they're good or not you're definitely going to learn something.
## Ruby can be beautiful
When written well, Ruby can be some of the most expressive and easiest to understand code I've ever seen. When the developer keeps principals like [SOLID](https://en.wikipedia.org/wiki/SOLID) and [tell don't ask](https://martinfowler.com/bliki/TellDontAsk.html) in mind they can achieve truly marvelous solutions which will be functional, beautiful and easier for the next programmer to change.
## Resources for learning
Since the explosion of Rails made the Ruby programming language so popular outside of Japan the number of resources to learn and master Ruby has exploded. There are so many [books](https://pragprog.com/categories/all?f[sort_by]=pubdate&f[category]=ruby_and_rails&f[skill_level]=All&f[title_contains]=), [videos](https://confreaks.tv/tags/5) and [blog posts](https://dev.to/t/ruby) about Ruby that you could probably read and watch them until the heat death of the universe. What a way to go.
I want to point out some of the truly exceptional Ruby books that have materially improved my programming abilities; not just in Ruby but in every language I interact with.
- Sandi Metz' [POODR](http://www.poodr.com/) is an amazing book for those who want to level up their OO design skills. She helps you figure out how to spot the edges of abstractions that are missing in your programs.
- Tom Stuart's [Understanding Computation](http://computationbook.com/) is an excellent learning resource to understand how computers really work with clear understandable examples in Ruby. If you're like me and never studied computer science, then this book will give you a better understanding of the fundamentals of computing that we often forget when working in higher level languages.
## The C word
I'm certainly not the first person to point out how truly phenomenal the Ruby community is. I have served on the committee of [Ruby NZ](https://ruby.nz/), organised a [Rails Camp](https://rails.camp/) and attended a number of conferences around the world. I am always blown away by the inclusiveness of the Ruby community.
Ruby events (like Rails Camp) were some of the first to push for the adoption of [codes of conduct](https://ruby.nz/code-of-conduct/) at our events and online spaces. This behaviour has since become commonplace at lots of technology events, but it was the Ruby community's willingness to listen to and learn from it's members that led to these safe guards being commonplace.
I encourage you to engage with your local user groups and attend conferences, especially if you are a member of a minority or traditionally maginalised community.
Technically the Ruby community has been on a quite a journey also. We've seen many techniques come and go over the years. The current trend towards composition over inheritance and command/query object separation seems like the right direction to me, but I'm sure we'll all be doing something else in two years time.
## Thanks
Thanks for taking the time to read this post, I know some of you were not particularly happy with the last one. I've outlined just a few of the many reasons why learning and practicing Ruby is still worth doing even if it's not as cool as [Node](https://nodejs.org/) or [Haskell](https://www.haskell.org/), as fast as [Rust](https://www.rust-lang.org/en-US/) or as concurrent as [Elixir](https://elixir-lang.org/). Go forth and punch a duck!