In my previous posts, I examined how to enable data persistence in Sinatra using only the params hash and query parameters.
params
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 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…
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…
erb
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…
I have created a functional version of a console Battleships game in Ruby, where each ‘round’ you are asked to pick coordinates on a 10x10 grid to try to hit hidden boats. In the current formulation, you have 20 or so guesses to…
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…
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.
My main story this week was to present a grid of ‘X’s to a web user — the first step in creating a web version of my console Battleships game. The user should be able to select a point on the grid…
Git is a distributed version control system. If a document is under version control, this simply means that a record is kept of all changes made to it — enabling the user to return to a previous state of the document (or entire program) with ease.