Tagged: Ruby

Guard Your Spork

Guard Your Spork

Tests are great to have for any Rails application, but it can become inconvenient to have to run them repeatedly. Two utilities, Guard and Spork, can be used in conjunction to help streamline your test suite and speed up your tests. Guard is a utility which helps automate your tests. You can specify which files you want it to watch, and Guard...

What’s that you’re hearing? Oh, just your browser talking to you.

What’s that you’re hearing? Oh, just your browser talking to you.

Once you get an app online with Sinatra or Rails, it quickly becomes important to be able to talk to your browser, and listen to it. How else will you tell it what to do? You need to understand a little bit of what’s going on to really be able to control the browser and get input from the user. The key...

Building a Home for an App

Building a Home for an App

Before the holidays, we spent some time at Flatiron learning Sinatra. This week, we took the plunge into Rails. Both Sinatra and Rails are Ruby Frameworks, which let you get your Ruby apps online. But even though they serve the same purpose, they go about it very differently. Let’s say you have an ideal image in your mind of what you want...

Singing with Sinatra

Singing with Sinatra

Sinatra is a Ruby framework. It helps you take your app and get it online, complete with a front-end. I’ve spent the past week making various Sinatra apps, and it’s been a lot of fun. My first was Are You Still Sad?, an emergency compliment site. A Sinatra app has a few basic components. An app.rb file, a views directory, and a...

Skynet Is Still A Long Way Off

Skynet Is Still A Long Way Off

Over the weekend, I was fortunate enough to find myself in lovely Amelia Island for the first-ever RobotsConf! It was a two-day marathon, aimed at taking software developers and teaching them everything there is to know about the maker movement. It was amazing. I learned so much and met so many wonderful people, I already can’t wait for next year’s conference. The...

Embrace the Inevitable Change

Embrace the Inevitable Change

Over Thanksgiving break, we were asked to make a playlister app. For the playlister, we needed to create Song, Artist, and Genre classes, which were all highly dependent on each other. Songs included the artist and genre objects. Artists included the song object and an array of genres. Genres included an array of songs and an array of artists. Everything was dependent...

Inheritance and Pokemon

Inheritance and Pokemon

Last night we read two chapters on inheritance from Sandi Metz’s book, Practical Object-Oriented Design in Ruby. The concept of inheritance is fairly simple on the surface. You create a bare-bones super-class that only includes things that sub-classes, or different types of that class, will have in common. You link your sub-classes to your super-class so that they get all characteristics of...

TDD and RSpec or Why It’s Okay To Fail

TDD and RSpec or Why It’s Okay To Fail

We’ve been learning about test-driven-development and RSpec, and it’s been amazing at times, frustrating at others. The frustrations are usually brought about when there’s a test that I want to run, but I don’t yet know how to build that test. We’re going to be learning more over the next few days, and the theory is that our learning curves for Ruby...

Petting Kittens

Petting Kittens

Today we were asked to find a fun way to represent the each method. This method loops over an array and does something to each item in the array. There are so many ways this can be shown, but I figured what way is better than with kittens? (Sadly I am not currently a kitten owner. If I were, have faith that...

Languages and Loops

Languages and Loops

Before delving into Ruby I dabbled in a few other languages, the primary one being Javascript. In fact, Javascript is the first programming language that I got beyond the most basic syntax in, and so the expressiveness that Ruby has in trying to make things more human-readable wasn’t something that I looked for or expected, or even realized existed in programming to...