Category: Coding

RSpec Ruby Testing: Normal Doubles

Decoupling unit tests in larger apps can get pretty hairy, especially for newer developers whose classes probably call each other 19 times a millisecond. Not calling anyone out; we all know the struggle. In TDD mocks are a strategy to create doubles of actual objects in the program to...
Read More

Setting Up a Basic Unit Test with RSpec

RSpec is probably the most widely used testing tool for Ruby. I think at one point in time it was the most-used Ruby gem in the world, and it might still be. It even supports Rails and other frameworks. Its syntax is incredibly easy to understand, and anyone trying...
Read More

The Ruby File Class

I recently completed a take home code challenge that involved picking a random word from a .txt file. My first reaction upon reading the requirements was, ‘ok, that’ll be easy.’ I started doing some Ruby stuff, created a class, initialized some variables, and then I got to the part...
Read More

Bucket Sort in Ruby

Next up on the sorting train: Bucket Sort! I like the name; I like the visuals; it’s a fun sort. And in plenty of cases it can be oh, so efficient. The main idea behind bucket sort, also called bin sort, is to take a list of data and...
Read More

Heap Sort in Ruby

Following up on my quicksort and merge sort blog posts, I’m now going dive into the heap sort. I found the heap sort to be a tad more obtuse than the other basic sorts, and I think the main reason is we’re moving on from just using arrays and...
Read More

How to Deploy a React Front End/Rails Back End Project to Heroku

Deploying apps is a great sort-of-final step to setting up your portfolio project. Github links and video demos are truly nice, but actually interacting with your site is where the fun really is. If you’re just finishing up your software bootcamp experience, and if you’re looking for info on...
Read More

Basic Webscraping with Nokogiri

The Nokogiri gem is an incredible open-source tool that parses HTML and XML data. It is one of the most widely used gems available, and it can really take your Ruby app to another level for data with its ability to help you intuitively scrape websites. The Nokogiri documentation...
Read More

Lost in Transmission: Error Correction Code

Binary code has served as the basic communication language for computers and digital data for a long time. The trusty 1’s and 0’s provide ease of coding and lower computational errors. The key word there is “low.” The problem with binary is that in order to express more and...
Read More

Getting Started with Algorithms

My coding bootcamp hosted an AMA event with recent graduates. Most of the questions centered around how much the alumni were earning and how they got their current jobs, which was not too surprising. In terms of interviewing and the how-to-get-a-job aspect, everyone agreed on one major point: practice...
Read More

SOLID Design Principles in Ruby

The first phase of my Flatiron School coding bootcamp was Ruby. Given the pace of the program, I often felt like larger concepts were pushed somewhat to the side, and focus was placed on just coding and getting practice in. I don’t mean this as a criticism; it’s just...
Read More