Menu

Articles

This is a collection of articles I wrote over the last couple of years. These days, I usually write about building and launching software products.

This article was published on Ruby Magic.

We hope you’ve got your stroopwafels warmed on top of your coffee because today we’re gluing things up with sticky stroop (the syrup that makes the two halves of a stroopwafel stick together). In the first two parts of our series, we baked a Lexer and a Parser and now, we’re adding the Interpreter and gluing things together by pouring stroop over them.

Read more

This article was published on Ruby Magic.

Today, we continue our journey into Ruby Templating. With the lexer in place, let’s move on to the next step: The parser.

Last time, we looked at string interpolation and subsequently, dived into creating our own templating language. We started by implementing a lexer that reads a template and converts it into a stream of tokens. Today, we’ll implement the accompanying parser. We will also dip...

Read more

This article was published on Ruby Magic.

Put on your scuba diving suite and pack your stencils, we’re diving into Templates today!

Most software that renders web pages or generates emails uses templating to embed variable data into text documents. The main structure of the document is often set up in a static template with placeholders for the data. The variable data, like user names or web page contents, replace the placeholders while...

Read more

This article was published on Ruby Magic.

In today’s post, we are going to implement a naive background processing system for fun! We might learn some things along the way as a peek into the the internals of popular background processing systems like Sidekiq. The product of this fun is by no means intended for production use.

Let’s imagine we have a task in our application that loads one or more websites and extracts their titles. As we...

Read more

This article was published on Ruby Magic.

In a previous Ruby Magic, we figured out how to reliably inject modules into classes by overwriting its .new method, allowing us to wrap methods with additional behavior.

This time, we’re taking it one step further by extracting that behaviour into a module of its own so we can reuse it. We’ll build a Wrappable module that handles the class extension for us, and we’ll learn all about class-level...

Read more