Bundler Bulkheads for Rails on Docker 13 Nov 2015
As part of my exploration of a minimum set of devops tools, I’ve been learning
how to stack containers full of Rails apps onto the Docker. There are plenty of
examples of how to get started with Rails and Postgres on Docker, even one from
the whale’s mouth, as it were. Working
from this example, it was pretty clear to me that one of Docker’s major
strengths is that it makes it really, really easy to get something running
with a minimum of fuss; it took all of about a half day to learn enough Docker
to hoist anchor, and even tweak a few things to my liking. One thing kept
nagging me about the Docker example, though, and that was a warning from
bundler
when running docker-compose
.
Emulate Default Scope with Around Filter and Scoping 21 Aug 2015
We all know that default_scope
is
evil.
But sometimes, you really do want to make sure that a condition is almost
always applied to the queries for a particular model. Draft vs. published posts,
approved vs. unapproved content, soft deletes, cat videos vs. not-cat videos,
etc., etc. What’s a well-behaved Rails developer to do? Recently, I
encountered this exact issue on a project I was working on, and was not
satisfied with the choice between Being Evil à la default_scope
or
being repetitive and scattering where(whatever: true)
conditions throughout
the code. After some searching, I came across a combination of methods that
accomplishes essentially the same goal without all of the bizarre side effects
of default_scope
.
Keeping Your App from Flying Off of the Rails with BDD - Part 1 of Question Mark 16 Aug 2015
The following blarg assumes working knowledge of user story mapping, user stories, and other such techniques of Le Méthode Agile.
Through a nigh omniscient understanding of the needs of The Cash Cat, your product team has painstakingly produced a sublime list of User Stories, seemingly from thin air. Trusting the Wisdom of the Ancients, the development team has chosen to ride the Rails of Ruby forward into user-acquisition glory. How can we ensure that their vision of the app is executed flawlessly?
Read MoreDrinking The Koolixir (Part 2) - EPERs Creepers, The Erlang Toolkit! 4 Mar 2015
To get a better handle on Erlang’s behavior, I decided to install a popular set of tools for debugging and performance profiling: EPER. I think it stands for “Erlang PERformance tools”, but it could also mean “Everything Proves Erlang Rules” or “Egrets Prefer to Eat Robots” or really anything for that matter. One thing is for certain, however: getting these tools built and running on Mac OS X was fraught with danger and build errors. .
Read MoreDrinking The Koolixir (Part 1) 7 Feb 2015
In case you haven’t yet heard of it yet, Elixir is a functional programming language (technically, a collection of macros) written in Erlang. I have been persuaded to add it to my technical repertoire due to a good amount of recent buzz in the blogosphere (as well as some points I’ll get to later). To make sure I have a strong foundation for my Elixir learning experience, I am starting my adventure with a foray into the underlying syntax of Erlang.
Read MoreEmber Rails CSRF Handling 27 Jan 2015
To get some more practice with my new Vim + Tmux setup (a topic unto itself, I might add), I ran back through the Ember JS “Getting Started” guide and wired it to a simple Rails back-end. However, I wanted to adhere to a strict SPA/API architecture, and ran into some CSRF issues as a result.
Read MoreLEDs and 303s Static Page on Divshot 24 Nov 2014
Took some time to spin up a home page for my music project this weekend, and decided it would be a great opportunity to not only level up my Middleman and design chops, but also try out a new (to me anyway) static hosting service called Divshot.
Read MoreStarting From the Middle(Man) 23 Mar 2014
Decided to give Middleman a try for the new blog, after trying out about a dozen static site generators (and a handful of CMS’s). The rundown went a little like this:
Read More