SOLID Principles With Simple Examples — Part 2

In my first blog post on SOLID, I examined the Single Responsibility Principle and Open-Closed Principle and related them to examples from my own coding background. Here I will cover the remaining 3 principles.


Sinatra Data Persistence Using Sessions and Cookies— Sinatra Battleships Project Part 6

In my previous posts, I examined how to enable data persistence in Sinatra using only the params hash and query parameters.


Sinatra Data Persistence Using Only Params 1 — Sinatra Battleships Project Part 4

In my previous post, I explained the basics of Sinatra — how to set up your first GET route, making use of embedded Ruby templates and the erb Sinatra method, and how to start a local server…


Introduction to Sinatra — Sinatra Battleships Project Part 3

In my previous post, we created a very simple Sinatra application to demonstrate how embedded Ruby works, and now we will delve much deeper into Sinatra itself. In my internet travels, I found precious few tutorials on…


Embedded Ruby Explained — Sinatra Battleships Project Part 2

In the first part of this series on my first Sinatra web project, I explained on a general level the different tools we would be using to create a web application using Ruby. In this post, we’ll take an in-depth look at how…


Pry for Ruby— Beginner’s Guide as a REPL and Debugger

What Is Pry?

Pry is a multi-purpose REPL (Read-Evaluate-Print-Loop) tool for Ruby. In other words, it is an alternate, much richer equivalent to IRB which enables you not only to evaluate expressions…


Ruby Package and Version Management

One of my stories this week was to begin using simplecov. simplecov is a test coverage tool in Ruby, which creates neat HTML reports informing you how much of the testable lines of your source code (ignoring non-substantive lines that don’t need to be tested, in…