Object Orientation in Ruby and Elixir
When talking about mainstream programming languages, we often put them into two major buckets: object oriented programming and functional programming. But th...
When talking about mainstream programming languages, we often put them into two major buckets: object oriented programming and functional programming. But th...
There’s an antipattern I see in a lot of codebases. This antipattern obstructs our vision and makes code more difficult to reason about. It’s everywhere, and...
For years, I didn’t understand protected methods. Not because I didn’t care to, but because I couldn’t see the practicality. I’d been writing what I thought ...
Traditional Japanese craftspeople believe in the spirit of the shokunin. This is the essence of pure dedication to the intricacies of a skill or craft. Sword...
Have you heard of page objects? They’re awesome. I’ll refer to them as POs. They were conceived as a set of guidelines for organizing the actions a user take...
At Ello, we were blindsided by the amount of traffic we were receiving. Right time, right place, I guess. One week, we’re seeing a few thousand daily session...
High-low testing has changed the way I build software. When I first started using Rails five years ago, the paradigm of choice was fat model, skinny controll...
A Culture of Credit
In the United States, and worldwide, we love credit. Why? Credit allows us to accomplish things that would otherwise be unachievable. Take for example, buyin...
Is it actually important that you learn real things? Of course it is. But real things, especially in software engineering, tend to change hyper-regularly. Th...
It’s good to be opinionated. It means you’ve collected enough auxiliary details to formulate a stance. It doesn’t so much matter the stance you take as long ...
Some years ago, I had my first and only client fallout. It’s unfortunate that the client also happened to be my uncle and the project was compelling (a story...
When building apps and libraries, I tend to be overly pessimistic about dependency versions. I define as much granularity as possible. For apps, this usually...
No one would pay developers over $100/hour if they didn’t have a sense the developers could produce quality work. But characterizing quality is difficult. On...
The advice “live where you work/play” doesn’t quite cut it for me. If I have to choose to live where I work, then I’m sacrificing play time. If I have to liv...
One of Larry Wall’s three great virtues of a programmer is laziness. While I generally don’t confer that laziness is a desirable attribute, when it comes to ...
I have recently been through an unfortunate situation. A situation for which I had very little control. A situation where an executive VP needed to make some...
In the world of consulting, it can be difficult to find time to incorporate elements outside your comfort zone. Businesses pay consultants to produce work in...
I’m continually astonished by the world of open source. As a community of programmers, hackers, engineers, scientists, and more, we manage to come together o...
As I grow as a software engineer, I’m finding it more and more important to practice daily. I’m also discovering that, contrary to the popular proverb, pract...
The single responsibility principle (SRP) is one of the most widely followed ideals in object oriented programming. For decades, developers have been strivin...
The open/closed principle (OCP) is a fundamental “run of thumb” in object-oriented languages. It has hands in proper inheritance, polymorphism, and encapsula...
Design patterns are awesome. The more we build software with them in mind, the better off we’ll be as a community. They can help us elegantly construct solut...
TL;DR - Have your cake and eat it too. Ruby refinements, currently in 2.0 trunk, can cleanly convey DCI role injection and performs right on par with #includ...
Recently on the object-composition mailing list, Trygve Reenskaug, creator of MVC and co-creator of DCI, posted a short reiteration of the MVC pattern. I’m r...
The exhibit pattern was recently introduced by Avdi Grimm in his book Objects on Rails. During its introduction, he spent a respectable amount of time laying...
I just posted an article on RubySource.com titled Flexible Searching with Solr and Sunspot. It covers working Solr into a Rails app and massaging Solr to mat...
There’s not any great info out there about stubbing constants. In fact, you can’t stub constants. What you can do is reinitialize them.
My article titled “SOA for the Little Guys” was just published on RubySource. It covers breaking apart a monolithic app into services with testing and Sinatr...
Injecting Roles into objects in Ruby has been a hot topic in the DCI community. What’s the correct approach when augmenting an object at runtime? I want to e...
Many articles found in the Ruby community largely oversimplify the use of DCI. These articles, including my own, highlight how DCI injects Roles into objects...
I’ve recently become quite intrigued with the concepts behind DCI (Data Context and Interaction). I won’t go too in depth about what DCI is or why you might ...
Many applications rely on seed data as a basic set of information to get their app off the ground and functional. Seed data to an application is like wheels ...
I just released an RSpec formatter to make you feel all warm inside. Like hot chocolate. It’s called snowday.
One of my favorite new features of Sunspot 1.3 is the ability to conditionally index an instance of a model based on anything that returns a boolean.
Occasionally, times arise where you would like to unit test the inner workings of a method. As a disclaimer, I don’t recommend it because tests should genera...
Call me a stickler, but I think there should be two pages that load quickest in any web app: The home page (for people not logged in) and the initial page yo...
There’s a lot of ugly solutions out there regarding this problem and rightfully so, it’s a pain in the ass. I’ve gone through a good number of options and fo...
This is just a friendly reminder that Time.now on Heroku will give you server time, ie: PDT/PST, and not the local time for your app.
When it comes to processing Excel files in Ruby, your options are slim. A quick Google or Github search might reveal roo. roo is an interesting beast. It app...
CanCan is awesome. It lets you manage user abilities easily and provides ways to define complex scenarios. I highly recommend using it for anyone who has mor...
Hate typing redundant regular expressions? Me too. How often have you typed the regex [a-zA-Z0-9]?
Every web app should have a mobile version and every mobile version should be tested. Testing mobile web apps shouldn’t be any more painful than testing desk...
One frequent problem when developing in Object Oriented JavaScript is how to handle the removal of the new keyword when creating an instance of a class. It’s...
Timers in JavaScript can be either very simple or become very difficult. In most cases, timers are very simple, such as polling a resource to update content ...
In Part One of this series, we constructed a “hello world” Rack app. In Part Two of this series, we brought our app to life with the ruby-freshbooks library....
In Ruby, the * (asterisk) token is often referred to as the “splat operator”. It’s purpose is to turn a group of arguments into an array. This can be useful ...
In Part One of this series, we constructed a “hello world” Rack app, so to speak. In this part, we’ll dive right into using the ruby-freshbooks gem and a lit...
New in Ruby 1.9 is the ability to name capture groups so you don’t have to use $1, $2…$n. First a demonstration:
I love FreshBooks. It makes my time tracking incredibly easy and my invoicing hassle free. That’s not all; their website is extremely powerful but feels ligh...
One of the major benefits of dynamically requesting the Facebook permissions is the increased rate of users who will allow you to access their account. Faceb...