How To Spy on Your Ruby Methods

Ruby has a built-in tracing system which you can access using the TracePoint class. Some of the things you can trace are method calls, new threads & exceptions. Why would you want to use this? Well, it could be useful if you want to trace the execution of a certain method. You will be able … Read more

9 New Features in Ruby 2.4

It has become a tradition to release new Ruby versions on Christmas. And in this post I want to cover some of the most interesting changes in Ruby 2.4 so you can keep up with the news 🙂 Float#round with keyword If you are using floats in your app I hope you use floor or … Read more

How to Write a Port Scanner in Ruby

Why would you want to write a port scanner? Writing a port scanner is a great way to learn the basics of the TCP protocol, which is the transport layer used by most internet protocols (including HTTP & SSH). It’s also a good exercise to learn more about how Ruby network programming works. Let’s gets … Read more

A Quick Analysis of How Minitest Works

What is Minitest? Minitest is a Ruby testing library, it allows you to write tests for your code TDD style. It’s the default testing framework for Rails & DHH’s favorite. Some people prefer it for its simplicity & how little code it has compared to its main alternative (RSpec). As you can see in this … Read more

Battle of Interpreters: MRI vs JRuby vs Rubinius

In this post, you’ll learn about the different Ruby interpreters available. Every popular programming language has multiple interpreters or compilers (in the case of compiled languages like C), but what’s an interpreter? An interpreter is a program that reads your source code, converts it into a series of executable instructions & then runs them. In … Read more