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

RSpec Ruby Testing: Shared Examples and Shared Context

Basic Rspec testing is extremely intuitive, but it’s very easy for code to get repetitive and start violating the DRY principle. Very often we can find ourselves copy and pasting example after example and subject after subject. Luckily, RSpec gives us the ability to DRY up our code by...
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

Quicksort in Ruby

In a previous blog post, I went over how to implement a merge sort in Ruby. We’re just going to keep the merge train rolling. Next stop: Quicksort! Like merge sort, quicksort is recursive and uses divide & conquer. Its worst case run time is O(n^2), which is on...
Read More

Merge Sort in Ruby

Sorting is a basic and extremely key component of algorithm study. Many other/higher algorithms rely on sorted lists to work better, so placing things in the correct order creates the foundation for a lot of problem-solving. We’re going to skip over the more direct insertion and selection sorts to...
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

Implementing Stripe in a React app with a Rails API Backend

I know why you’re here. You’re working on a React app for your portfolio or bootcamp project, and want to add some form of payment processing to impress people. But the PayPal API looks daunting. Luckily, Stripe is very intuitive and implementing a basic credit card payment framework is...
Read More