Dreaming of Code

Traversing Trees for Rubyists

March 08, 2017

Learning to Traverse a Tree

For those of you who live in Colorado like I do, I'm sure that you most certainly understand one meaning of a 'Tree', but I would like to show you another meaning in the world of computer science and software development...


Write One Query

June 07, 2016

Sometimes is easier to write some Ruby to tackle a problem, but may result in a performance hit. For example, looping through a set of ActiveRecord objects and doing some processing on each object, or even performing an SQL query on every iteration...


Vue.js vs React.js

May 03, 2016

I recently published two posts, one was a tutorial for using Vue.js and Rails, and the other about using React.js and Rails. Evan You has published a good post that compares the higher level concepts of various JavaScript frameworks including React...


React.js and Rails

April 11, 2016

Getting up and running with React.js and Rails

I'm sure there are arleady plenty of tutorials out there on using React with Rails, but I'm posting this tutorial in response to my last blog post about using Vue.js and Rails. I'm going to follow the...


Vue.js and Rails

March 09, 2016

Getting up and running with Vue.js and Rails

Vue.js has been widely adopted by the Laravel community, but I haven't seen much adoption in the Rails community. I have experimented with Vue.js in a couple different Rails applications and have had a...


Would you hire a Convict?

November 02, 2015

A proposed solution to the Mass Incarceration problem

I've been hearing a lot about the mass incarceration problem in the news recently and have been doing a bit of thinking about a solution to this problem. As a software engineer, that's what I...


Informix Database with Ruby on Rails

September 03, 2015

Step-by-step guide for getting up and running with Ruby and Informix

God forbid that anyone ever needs to use an Informix database with their Ruby on Rails application. In you case you do, here's how I did it for getting up and running with Ruby and...


How to Parse an HTML Table with Nokogiri

August 17, 2015

Here's a simple way to parse an html table into a ruby hash using nokogiri

<!-- table.html -->
<table>
  <thead>
    <tr>
      <th>Foo</th>
      <th>Bar</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>foofoo</td>
      <td>barbar</td>
   ...

How to Update the WordPress Table Prefix

May 13, 2015

The default table prefix used for WordPress is wp_, and I've noticed a few WordPress developers mention that it is more secure to use a random table prefix for your WordPress installation. It's easy to set the table prefix variable in your wp-config...


Urge to Learn More

May 10, 2015

Ever since I wrote my first HTML 'Hello World' app a few years ago, I've gained this urge to learn more about web development. I quickly realized that developing websites and applications involves a lot more than just knowing a little bit of HTML...


Page 1 of 2