• Null Object Pattern

    Today I watched the Nothing is Something talk by Sandi Metz. During the first half of her talk she goes into the Null Object Pattern. This pattern specifically handles how to deal with nil or null values in your program. When over looked they can cause majors errors in your...


  • Github Syncing

    Commonly used git commands are git fetch and git pull. Here’s a bit more about how these commands work. git fetch After running this command, git will fetch all the commits from the remote repo to your local repo. But it will not make any changes to local working repository....


  • Enumerable Module in Ruby

    The Enumerable Module is a mixin. The methods from the module are used in the Array and Hash classes. You can actually use the Enumerable module in any of your classes as long as you have #each defined. All the methods in the module create a new data structure -...


  • Liskov Substitution Principle

    Liskov Substitution Principle is the “L” in the SOLID Principles. It states if you have a parent class and a child class, any instance of the child class should be able to replace any instance of the parent class without having unexpected behaviors. This is a classic example of a...


  • Loading Code in Ruby

    You may have seen $LOAD_PATH written out in Ruby programs. $LOAD_PATH is an array where each element in the array represents a file directory where files live. Each time you run a Ruby file $LOAD_PATH requires all the files in those directories even if $LOAD_PATH is not explicitly written out...


  • Open and Closed Principle

    This is the “O” in the SOLID Principles of the five basic principles of object orientated design. The official definition is “software entities (classes, modules, functions, etc.) should be open for extension, but closed for modification.” This means that a developer should be able to make changes to a program...