Unit testing is an integral part of Test-Driven Development (TDD) which is the process of defining the desired actions of a function and what we expect it to do (or not do) before we begin work on the actual function. Approaching software development in this fashion serves a number of purposes:
Since I have begun exploring the world of Javascript and React in recent weeks, one of the things I have missed from the world of Ruby has been the `.send` method. Being able to call a method by way of a string or symbol argument (that could be stored in a variable) opens many doors for abstraction.
For those who are unfamiliar with Ruby’s `send` method, I discuss it more in this blog post, but the gist of it can be seen below…(get it?)
While the amazingness of this may not be immediately apparent, I’ll quickly reuse one of…
Thank you to edh_developer from the Dev Community for helping me to identify an issue with multiple possible boards being generated. The gist code has been updated.
Puzzle games like Sudoku have always fascinated me, and Sudoku in particular has helped me get through many long waits. It is a quite popular game, but for those unfamiliar with the rules here is a quick synopsis, or you can see the Wikipedia entry here.
A Sudoku game begins with a 9x9 grid partially filled with values from 1 to 9. The goal for the player, is to fill all of the…
Recently I was pair-programming on a Ruby CLI app to help manage subscription services for my phase 1 project at Flatiron School. After building out the models and schema utilizing ActiveRecord my partner and I began writing out the primary app file that would run and manage the app interface. After getting through just the user login control, we quickly realized that this file was about to become incredibly large, and search through hundreds of lines of code to find specific methods or for debugging was going to be a pain.
From our previous experience with incorporating modules (described in…
Hello World
to the world!As a beginner in Ruby working primarily in a text editor, Terminal, and interacting with an app through CLI, it’s natural to itch for something “bigger” and to want to give your basic app a greater reach. It’s exciting to see “Hello World” pop up on your screen for the first time, but after the 100th (or even 3rd) time it loses a little magic. What if we could instead send that message out to the users in the world via a text message? Or, in more advanced cases, what if you wanted to incorporate Two-factor Authorization for user logins…
Fullstack Dev w/ experience in JS/React and Rails