1. Time for a Talk

    One thing I like to do is teach and share. I help organize our lunch and learns at work. I’ve presented a few times but I haven’t done any outside of work. As a regular attendee of the Dallas Ruby Brigade (DRB) I figured it was time for me to present to the group. I decided to extend a previous presentation I had given called “It’s About Time”.

    Read More
  2. Building Identicons and Playing with Clojure

    I’ve been playing with Clojure on and off for a little while now. I’ve worked through problems on 4 Clojure and Exercism.io but I’ve been looking for a small project to take on. Last Wednesday when GitHub announced identicons for users without avatars and I found my project. My goal was to take a string and output an identicon for it. For identicons a particular input should always generate the same identicon. Also, the identicons should be unique for each input.

    Read More
  3. Fun with Elixir

    Most of the code I write is written in Ruby. I work with it during the day and I play with it at night. I’m a full stack web developer so I get to cavort with JavaScript and CoffeeScript regularly. But every now and then I like to pick a language and take it for a spin. I haven’t done it as often as I would like but when I do it’s always interesting. Recently, I decided to take some time and toy around with José Valim’s new language Elixir1. I’ll skip to the end and tell you this: I’m having a lot of fun.

    1. Version 0.10.1

    Read More
  4. Private and Protected: They Might Not Mean What You Think They Mean

    Ruby1, like many other languages, provides a built-in way to change method visibility. Used properly it can help create a roadmap for others developers to follow. The problem is that markers of the same name can vary in meaning between languages. If you’ve taken up Ruby after learning another language like C++ or Java and you haven’t reexamined the meaning of “private” and “protected” then you’re almost certainly not using them the right way. Let’s spend a minute investigating their use in Ruby.

    1. Version 1.9.3

    Read More
  5. Time to Donate: My Experience With Rails Girls

    dumplings

    During a lunch discussion over some dumplings, Shufen mentioned that she was going to start a Rails Girls in Dallas. Several of us immediately volunteered. I have an affinity for teaching so this struck me as a great opportunity to do something I love. Additionally, an event like this might help a teenager pick a future. It could motivate a mother to reenter the work force after years of staying home with her children. It might help a small business launch or provide an existing one with a much needed boost. The decision to help was quick and easy.

    Read More
  6. Battery Life in the Land of Tmux

    The code for this can be found on GitHub.

    From time to time I find myself immersed in my terminal. Bouncing around in Tmux1 between vim, console and whatever else I’m doing. With my terminal in fullscreen mode I don’t notice the power draining from my battery.

    OSX Battery Warning

    This is a fixable problem.

    1. Version 1.7

    Read More
  7. Tooling Around: MySQL's Client Config File

    There are several good GUI options out there for working with MySQL. For the CLI fans or those forced to use a machine with no GUI it’s possible to have a good experience using the default MySQL1 client.

    1. Version 5.5.25a

    Read More
  8. Faster ActiveRecord Migrations Using change_table :bulk

    Instead of individual alter statements we combine them inside change_table with :bulk => true. Read More
  9. Have you lost a second of data?

    Based on some good Reddit discussions I've revised the "Only use ranges." section to use a range with an exclusive end.

    One of the gems I’m working on limits a range of data based on a datetime field. I use a SQLite1 database in my automated testing, but ultimately it’s going to run on MySQL2 and possibly others. The ease of SQLite makes this a fairly common setup. ActiveRecord3 helps alleviate cross database issues but it doesn’t cover all cases. You see MySQL stores datetimes to a resolution of one second. Databases like SQLite and PostgreSQL store down to the microsecond (.999999). This leads to a problem.

    1. Version 3.7.7

    2. Version 5.5.19

    3. Version 3.2.1

    Read More
  10. Explaining Include and Extend

    All Rubyists should be familiar with the common definitions for include and extend. You include a module to add instance methods to a class and extend to add class methods. Unfortunately, this common definition isn’t entirely accurate. It fails to explain why we use instance.extend(Module) to add methods to an instance. Shouldn’t it be instance.include(Module)? To figure this out we’re going to start by discussing where methods are stored.

    Read More