RoRrr your contribution and become stronger

Alexandre Overtus
3 min readJan 30, 2018

--

At time of writing, there are 9111 published gems available on https://rubygems.org. Have you ever contributed to one of these ? Or even consider it ?

Why should you bother writing a new gem when you stumble upon the complex part of a project ? You’re probably thinking there’s already something available, written by someone else.

And maybe, there is. But not everyone has come across your use case or has taken the time to write an open source solution.

More importantly, your goal should be … to learn, obviously ! Rails is one of the easiest framework which provide quick results. And these results are just the tip of the iceberg.

When you start digging a little bit in the core of a gem, even Rails itself (remember, it’s a gem), you start facing metaprogamming.

During the first hours you’ll go back and forth through the git repository trying to understand how the gem works.

Read the code like a story book, each function being its own chapter. Understand how the chapter starts, its conclusion and move on to the next one.

Then, after a lot of coffee and a little less hair, you will finally figure out what the line is doing. This little line doing so much dark magic.

Plus, not only have you understood what a specific line is doing but also how to explore and learn through a gem repository.

This new skill acquired you can now continue your journey writing your own piece of metaprogramming code, your own dark formula.

Include, Extend, class_eval, send are not words coming right out of a spell book anymore but tools you can use to improve your code, write more efficient and powerful ruby for your project.

Maybe you ever wonder why your Gemfile.lock is so huge with only 3 gems installed. Writing a gem also means starting to understand dependencies and versioning. How all these gems are connected to each others. How changing one can affect the others …

It’s like Russian dolls. When you install a gem you have to bring everything included inside with it.

Imagine you are running out of time, you want to access this amazing new function. Understanding how gems work and how they are written allows you to extract this function and monkey patch your own. That’s one example among many.

After publishing your first gem, you will get the greatest of all rewards… accomplishment and wisdom.

It will be the start of a new journey for you and the end of my story.

So go on my fellow coders, dig through some repos, take the time to understand, learn and write some black magic of your own!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response