Fixing Thread-Safety Bugs with Nate Berkopec

Fixing Thread Safety Bugs With Nate Berkopec

Can you tell if a Ruby gem is really thread-safe or not? And how do you fix a seemingly thread-safety issue that can be something else entirely? We had no idea. So we asked Nate Berkopec to help us. Nate is an expert in Ruby performance. The verdict: nuking all shared global mutable state in your Ruby code is a bad idea if you don’t know what you’re doing! Listen to this episode to learn:...

38 min Â· Stefanni Brasil, Thiago Araujo
May the dead code R.I.P

4 Strategies To Remove Dead Code from your Ruby App

It’s easy to believe that just because a feature is available, it is going to be used someday. But let’s face it: some features in production will go completely unnoticed and unused forever, but you still have to maintain them. How much does it cost to carry all this dead code around? After all, to keep these pointless features running, the business has to spend time and money to: keep these features working (maintenance costs) test and deploy them adjust them so they can interact with other features and not cause bugs provide user support and documentation That’s why finding and deleting dead and redundant code is an important step to increasing the code quality of an application, according to M....

6 min Â· Stefanni Brasil, Thiago Araujo
hexdevs podcast episode: How to Open Source with Richard Schneeman

How to Open Source with Richard Schneeman (@schneems)

How to Open Source with Richard Schneeman What does lurking and flossing have to do with contributing to open source? It’s all about sustaining tiny habits. Be a lurker and start small. Read a PR, try to understand what’s going on. Leave a thumbs up 👍 if you like it. This is a very easy way to get started. And build a habit out of that. – schneems How to Open Source: Learn the secrets of successful contributors Recently, Richard published the book “How to Open Source: Learn the secrets of successful contributors"....

3 min Â· Stefanni Brasil, Thiago Araujo
How to RSpec a Rails JSON API responses with Jbuilder

How to RSpec a Jbuilder response from a Rails JSON API

For rspec-rails users, when testing a controller action that uses Jbuilder as a serializer, and you want to test that the response includes exactly what you expect from the Jbuilder serializer, you need to enable render_views in your specs. That’s because in RSpec, rendering the content of view templates is disabled by default. But when using Jbuilder, you do want to render views because that’s how Jbuilder serializes the response. And that’s what render_views does: it enables view rendering for controllers specs....

2 min Â· Stefanni Brasil
Open Source Thursdays event - Contributing to Ruby Faker with Vitor Oliveira

How does the Faker Ruby Gem Work?

How and when a new version of a Ruby gem is published to RubyGems? Do you know how Faker Ruby generates fake emails, fake phones, fake dates, and fake URLs? Did you ever wonder how a new release of a Ruby gem is published on RubyGems? Or are you interested in contributing to Open Source? If you said yes to any of these questions, then you’re in luck! Watch the recording of Open Source Thursdays and you’ll learn all about it....

2 min Â· Thiago Araujo
How to Contribute to Ruby on Rails: a Step by Step Guide

[Guide] How to Contribute to Ruby on Rails

Step 1: Decide to find one open-source project to contribute 😎 Step 2: Keep looking 👀 Step 3: They are all intimidating, is that normal? 😑 Step 4: What if I contributed to a project I have lots of experience with, like Ruby on Rails? I’d love to understand more about this tool I use every day đŸ€” Step 5: OMG, the code is huge and scary, Will this even run on my machine?...

3 min Â· Stefanni Brasil, Thiago Araujo
Waves black and white pattern

How to Write a Clean Order By Case Query with Arel on Rails

You’re working on a feature and someone tells you that one of your models needs to be ordered based on some complicated rule. You realize you’ll need to write a complex order by query
 Here’s how it usually goes: You think to yourself: “Should I write an order by case when statement? Maybe I’ll just add a little bit of SQL
” Two minutes later, you end up with a bunch of nested case when statements, subqueries, common table expressions, angry statements, shouting, and a whole lot of tears....

4 min Â· Thiago Araujo
Quickly Debug Ruby Gems with Pry, git bisect, and bundler

Guide: Quickly Debug a Ruby Gem with Pry and Git Bisect

Are you trying to debug a Ruby gem but not sure how? Here’s a quick way to debug any Ruby Project using Pry and Git Bisect. When triaging some open issues on Faker, an open-source Ruby gem, I came across Issue #2482. I was able to reproduce the problem. Turns out the bug was already fixed by this PR, but version v2.20.0 was released before that. I thought this would be a great opportunity to show you how I debugged this issue so you can learn some new tricks....

7 min Â· Thiago Araujo, Stefanni Brasil
Smart Ruby Developers Don't Ask for Advice

Smart Ruby Developers Don’t Ask for Advice. They Do This And Build A Reputation As a Result

If you could run a career quality tool to analyze your progress, would it say you’re moving in the right direction? What score would you get? Here’s the catch: how you think you’re doing and what your teammates think how you’re doing are not the same thing. Want to find out for sure whether you’re moving up the Engineering Ladder anytime soon or not? The only way is by asking for instructive feedback....

5 min Â· Stefanni Brasil, Thiago Araujo
No Idea How to Build a New Feature? 216+ Ruby on Rails Application Examples To Have as a Reference

216+ Ruby on Rails Open Source Applications You Can Use as a Reference

Not sure how to implement a new Ruby on Rails feature? A proper model, controller, migration? Or how to write a test for the code you’re writing? What if you could easily access a massive library of full-blown Ruby on Rails Applications used in the wild and have them as a reference? real-world-rails gives you a list of (173 apps + 43 engines) = 216 Rails Applications you can learn from 💣...

6 min Â· Thiago Araujo
Ruby Code Quality with Ernesto Tagwerker on the hexdevs podcast

Ruby Code Quality with Ernesto Tagwerker

Are you working on Ruby on Rails Applications that are constantly on fire, overwhelmed by technical debt? Instead of being a firefighter, what if you could be a happy programmer again and “Escape the tar pit”? Learn exactly how to measure tech debt and take the right steps to immediately improve code quality. Listen to our conversation with Ernesto Tagwerker (@etagwerker). Apple Podcasts | Spotify About our guest Ernesto Tagwerker is the founder & CTO at FastRuby....

44 min Â· Stefanni Brasil, Thiago Araujo
Just Enough Hotwire for Rails Developers with Chris Oliver Open Source Thursdays

Just Enough Hotwire with Chris Oliver

Chris Oliver is the founder of GoRails, JumpStart Rails, Hatchbox and RailsBytes. He is also one of the hosts of the Remote Ruby podcast. Chris showed us how to get started with Hotwire, how to inspect turbo streams. He also answered some questions from the audience, including how to migrate from Webpacker to jsbundling-rails, Websockets performance, and security. Do you want to know how Chris Oliver got so good at building products?...

2 min Â· Stefanni Brasil, Thiago Araujo
Green Leafed Trees Below Rainbow

How to Improve Code Quality on a Ruby on Rails Application

Does it take forever to ship even small features on the codebase you’re working on? Is the code hard to understand and maintain? Are projects always running over budget? Are you constantly sacrificing code quality and not paying down technical debt? When you change one feature, does another completely unrelated part of your app stop working? New bugs appear, even though tests never break? đŸ„” Those are signs that you are suffering from working on a codebase with low code quality....

7 min Â· Stefanni Brasil, Thiago Araujo
Photo by Olha Ruskykh from Pexels

International Pricing for Ruby and Rails Books and Courses

Are you looking for courses, training, and resources to improve your Ruby and Ruby on Rails skills, but you are not being paid in US dollars? Most Ruby and Ruby on Rails books and courses are priced in US dollars. When you can’t afford them just because the country you live in has an undervalued currency compared to the dollar, it makes it difficult to invest in your education. There are many free options you probably already know about, and you’re already using them....

5 min Â· Stefanni Brasil, Thiago Araujo
Red lego blocks

How to Learn the Syntax of a Programming Language When You Know How to Code

Are you having a hard time picking up the syntax of a new programming language, even though you know how to code? You’re new to Ruby, and people say it’s an easy language, but you find the syntax difficult to understand. You know a bit of Javascript, Python, Java, or any other language. But Ruby seems like alien technology to you. By the end of this post, you’ll have a tool to help you transfer your knowledge of [INSERT PROGRAMMING LANGUAGE HERE] to Ruby....

4 min Â· Thiago Araujo
A bowl of spaghetti.

Learn Ruby on Rails Best Practices With One Exercise

You want to write smooth professional-looking code. You’re craving some squeaky-clean code. But all you have for lunch every day is a big bowl of legacy spaghetti code. You consider yourself a decent developer, but you’re never sure how to organize a project. How to name things. Where some piece of business logic should live. How can you become a Ruby on Rails expert if the code you read every day stinks?...

6 min Â· Thiago Araujo
How to contribute to Ruby on Rails

How to Contribute to Ruby on Rails

Are you looking for an opportunity to get more experience as a Ruby on Rails developer? Make meaningful connections with the community? Learn the best practices on how to maintain a large codebase? What if you could get that experience by contributing to an open source project like Ruby on Rails? If that sounds scary, don’t worry! We can help you! By the end of this post, you’ll learn 5 ways to become a new Rails contributor, even if you are a beginner in Ruby....

6 min Â· Stefanni Brasil, Thiago Araujo
Bug in a leaf

Getting Started with Pry Debug in 5 minutes

When you’re banging your head against the wall trying to fix a bug, the last thing you want is having to stop and learn how to use the debugging tool. You might even have added require 'pry' on a Ruby file but quickly realized you couldn’t remember all the available commands. If only there was a way for you to quickly learn how to use Pry and focus on solving the problem
 Well, there is now!...

4 min Â· Stefanni Brasil, Thiago Araujo