Posts Tagged “Ruby”

Guard Clauses vs. Nested Conditionals

Guard Rail

TLDR; a guard clause is a premature return (early exit) that “guards” against the rest of your code from executing if it’s not necessary (based on criteria you specify).

Soon after I started my career as a Ruby on Rails developer I learned about guard clauses and how they can improve code readability.

Read More

Ruby If, Unless, While and Until

Decisions, decisions

Ruby offers conventional control structures that are found in most common programming languages like if, else and while, however, Ruby also provides less common options like until and unless. These control structures may seem weird at first (“who talks like that?”), but they have their advantages.

Read More

Shelter Gifts - A Ruby on Rails Project

A representation of what Shelter Gifts is all about

For a working demo of the project, visit: https://shelter-gifts.herokuapp.com/

For my first Ruby on Rails project (my third project for Flatiron), I created Shelter Gifts. I came up with the idea for the app several months ago, well before reaching the Ruby on Rails section in the curriculum. I started following DHH on Twitter a while back because I was looking forward to learning Ruby on Rails and he created it! Well, in February he retweeted something from from Ryan Singer that stuck with me:

That got me thinking: what are some problem spaces that I could address? What areas could I help in and where? That changed from what and where to who. Who are the people in problem spaces? Who are some people with problems? Everyone has problems. Who are the people with some of the biggest problems? People that are homeless.

Read More

Developer Journal Sinatra App

A screenshot of the Developer Journal app with sample data. I am a huge The Walking Dead fan by the way!

For a working demo of the project, visit: https://developer-journal.herokuapp.com

For my Sinatra project, I chose to build an app that I’ve wanted to use but haven’t quite found. Since I’ve been in Flatiron’s Full Stack Developer Program I’ve wanted to keep track of what I’m learning, view my learning/coding “streaks” and set goals for myself.

I’ve used a combination of DayOne for journaling, Quiver for organizing my notes and different goal tracking iOS apps. Individually, these apps worked for their specific purposes, but together they were too cumbersome for what I wanted; so I decided to make an app with the features I was looking for.

Read More

Developer News CLI App

sample code from the Developer News CLI App

I’ve learned a lot so far in my coding journey but I’ve learned more by starting and finishing my first project than I have at any other point so far. This project was a lot of fun and challenging!

I wanted to scrape data from some technology-focused websites that I visit and aggregate them. I wasn’t exactly sure how I would do it but I knew enough to get started and would take it one step at a time.

To make the project more manageable I separated it into two major areas, the CLI and scrapping the websites.

Read More