DEV Community

Cover image for Learning Ruby
Kenta Takeuchi
Kenta Takeuchi

Posted on • Originally published at bmf-tech.com

Learning Ruby

This article was originally published on bmf-tech.com.

Overview

This post discusses what someone who has experience with PHP and Go did to learn Ruby.

Approach

Official Documentation

First and foremost, start with the official documentation.

Books

Picked up some classic ones.

I also picked up some books related to object-oriented programming, but haven't had the time to read them.

Ruby Tips

Read through articles related to tips.

Blog

Learned about language specifications that caught my interest and summarized them in a blog.

Coding Quizzes

Solved coding quizzes for practice.

I intended to solve some problems on LeetCode but skipped it due to time constraints.

Data Structures and Algorithms

Practicing data structures and algorithms is a good way to learn how to use the language.

Converted what I wrote in Go to Ruby. ChatGPT and Copilot provided significant support.

Design Patterns

Since Ruby is an object-oriented language, I practiced some patterns.

Referred to davidgf/design-patterns-in-ruby and transcribed a few.

Impressions

I was able to grasp the unique language specifications of Ruby, so now it's just a matter of writing code.

After learning, I felt that the verbosity of code can vary greatly depending on proficiency. While this is also true for PHP, it wasn't something I felt much with Go, so I might struggle a bit when reading code.

On the other hand, I got the impression that the simplicity in appearance and writing style is appealing.

Having been away from object-oriented languages for a while, I felt unfamiliar with handling classes, so I want to practice more.

Looking at the environment surrounding Ruby, being a domestic language, there are many Japanese committers, and the level of RubyKaigi is high, giving a sense of the community's enthusiasm. I expect there will be much to learn, so I want to continue improving.

The cultural aspect of different community atmospheres by language is quite fascinating.

Top comments (1)

Collapse
 
universetwisters profile image
Jeroen Boers

Nice write-up. I’d probably recommend a slightly softer entry path than starting with the official docs, especially for people new to Ruby.

For getting moving fast, I think The Odin Project is a great place to start:
theodinproject.com/paths/full-stac...

And for seeing how Ruby code can be structured in practice, especially around OOP, this is really useful: refactoring.guru/design-patterns/ruby

The docs are great once you already have some context, but for beginners they can be a bit dense. Ruby gets much easier once you see real examples of blocks, objects, modules, and common patterns in actual code.