• Generic Task Manager: A generic rails application

    I built Generic Task Manager as an independent project to fulfill one of the requirements for the Learn-Verified curriculum. Basically, the requirements were that a rails app should leverage has_many relationships through join tables, nested resources with custom writer methods, and a nested route resource, too.

    GTM hits all the requirements.

    I set out with grand ideas for this application, but my day job, family, and other responsibilities really lead to me having to strip down my idea to make sure I could get it done in a reasonable time. It’s the sloppiest project I’ve submitted to the course so far, and it needs some refactoring to be certain, but after several weeks I just wanted to get it done and submitted.

    I’ve been doing some part-time rails consulting on the side and most of what I’ve been doing is creating all sorts of non trivial forms with multiple relationships and other unique requirements. This helped a lot when I sat down to solve the problems of GTM.

    Here’s how the app works.

    • Users sign up (devise)
    • Users can create projects
    • Users can give view and edit permissions to other users to access their projects
    • Users with permission can add Tasks to a project, like a todo list.
    • Users with permission can make tasks complete, incomplete, or delete them.
    • Only the owner can delete the Project.

    Other features:

    • You can sign up with a github account, and if you already signed up with your email the accounts will be linked automatically.

    I started out writing a lot of tests, but then in my consulting work had to do a lot of test writing as well. When I came back to the project, I decided to set aside the extreme TDD approach I was using at the beginning to instead just get the features written, working, and pushed to the server, as I had already been able to study and use rspec, cucumber, and other test suite tools in my consulting work.

    There were some interesting challenges with Devise in the beginning, as a User has_one Profile, and I wanted the user to be able to add profile data at sign up and also when editing their account information. Devise uses a very neat yield resource if block_given? line in some of the controller actions, which I could hook into with a super do |resource| block in my contorllers that inherited from Devise’s:

      def create
        super do |resource|
          user = User.find_by(email:
          if user && user.uid
            resource.errors[:base] << "This email has already registered using Github. Either login with Github or click 'Forgot Password' to reset password and login with your email."

    I had never seen super using a block and argument like that before. It seems like something that could be very useful.

    Most everything was pretty straightforward, the only other real snag was figuring out how users should add new users to a project. I decided to just had a list of users excluding current team members with radio buttons next to their usernames for permission granting: None, View, Edit. As I avoided using any JS, this was as elegant a solution as I could come up with.

    Below is a link to a video walkthrough of the app.

  • Deploying a Sinatra app to AWS Elastic Beanstalk using a Postgresql DB on Amazon RDS

    AWS Elastic Beanstalk is a PaaS built on top of AWS. I recently deployed a Sinatra application and while the documentation is pretty great, I did have to do a bit of troubleshooting and googling around to get everything running correctly. In this guide I’ll walk you through the process step by step.

  • Sinatra Babies - a sinatra application

    I built Sinatra Babies using the Sinatra framework. It’s a pretty simple and lightweight app with one purpose: let a user register their babies, and markdown whenever the baby sleeps, wakes up, poops, etc.

    The first weeks home from the hospital with a newborn are tough - and a big blur in timespace - so this app aims to make it as easy as possible to keep a log of events and get important information at a glance.

  • Sinatra Rspec tests with Capybara and Selenium - JS Alert popup issue

    I was setting up some pretty basic tests for my Sinatra project and one of them was an integration test for a delete method on a resource. I had some frustrating behavior from the test. Here’s what happened and how I got things to behave properly.

  • Minimax AI for TTT - Generating the Gametree - Part 1

    This is the first video in a 3 part series walking through the Minimax alogrithm for Tic Tac Toe. I visit the Flying Machine Studios blog An An Exhaustive Explanation of Minimax, a Staple AI Algorithm and walk through his ruby code and examples.

    Part one covers the building of the Gametree.

    Part two will cover how games are ranked and evaluated.

    Part three will discuss how this algorithm can be implenented in the Learn-Verfied lab TTT with AI.

  • Thoughts on Learn-Verified so far

  • $LOAD_PATH and require

    While finishing up my gem and packaging it for distribution, I ran into a lot of headaches. I was able to build the gem with an executable - so users could gem install my gem and then run football_now from the command line to start the app - but when I tried to run the app I had a bunch of errors fill my screen. My app was unable to load files I was requiring, even though it worked fine if I was inside of my gem working directory…

  • Football Now: My scraping gem

    Building a gem that scrapes data that can be manipulated via a CLI app was the capstone project at the end of the Learn-Verified course on Object Oriented Ruby. For my project I chose to do something with football and decided on having an app that could display results, standings and stats on the top teams from Europe’s big leagues (BPL, La Liga, Serie A, Bundesliga).

  • Dealing with non-ASCII whitespace with Nokogiri

    You’re having a grand old time parsing HTML within Nokogiri. You grab some .text from a node and you go to .strip it buy all is not well in the world. Alas, that stubborn whitespace remains!

  • Dynamically creating objects in Ruby with method_missing(), send() and const_get()

    While working through a lab in Learn the other day I saw an opportunity to abstract some code using #method_missing, #send and ::const_get, which are three very cool things I am only beginning to understand.

subscribe via RSS