Whenever you need to use some if / elsif statements you could consider using a Ruby case statement instead. In this post, you will learn a few different use cases and how it all really works under the hood. Note: In other programming languages this is known as a switch statement. Ruby Case & Ranges […]
APIs are great because they let you interact with other applications, but they can be a bit intimidating if you never used one before. In this post I will show you how to get started using your favorite APIs with Ruby. A simple API To use an API you will need some form of HTTP […]
What would you do if you are given a big collection of text and you want to extract some meaning out of it? A good start is to break up your text into n-grams. In the fields of computational linguistics and probability, an n-gram is a contiguous sequence of n items from a given sequence […]
Have you ever wondered if there is an alternative to iteration? Well I have good news for you: there is, and it’s called recursion. Recursive functions are those that keep calling themselves until they hit an end goal (also known as the base case). The idea is that after each function call we make some […]
If you want to know something about your source code, like the name and line number of all your methods, what do you do? Your first idea might be to write a regexp for it, but what if I told you there is a better way? Static analysis is a technique you can use when […]

