Hard-and-fast, black-and-white rules for getting started with Object-Oriented Programming

No object should have more than three public methods Objects should not have getters or setters Everything else must be private If three private methods are doing something similar, then maybe those are the public methods of another class Never inherit Always compose Changeability is the most important thing A "good" variable name is a name that describes unambiguously what the variable contains, without describing the implementation If you don’t use good variable names, I will look for you.

Hear no evil. See no evil. Speak no evil.

I had an epiphany tonight about something that just about everyone knows: the three monkeys. And I wanted to share it with you. The three monkeys are accompanied by the words: "See no evil. Hear no evil. Speak no evil." The funny thing is that one monkey is covering his eyes, one monkey is covering his ears, and one monkey is covering his mouth! Let's examine that for a second.

The schism in martial training paradigms

<h2>You're training wrong! No, YOU're training wrong!</h2> A recent set of conversations have led me to examine the major difference in martial training. I'm going to start by separating training in two categories, making an imperfect black-and-white model of the martial world: <ul> <li>Traditional eastern training</li> <li>Jeet Kune Do-like training</li> </ul> Now, let's start to talk about the <em><strong>PURPOSE</strong></em><strong><em> </em></strong>of each, in a fairly roundabout way. Let's talk about the traditional drill which has become sort of a standard: "Grab my wrist".

Devise + rspec error: undefined method 'name'

If you're using Devise and rspec on Rails 3, and you want to override a controller, and you end up with an error that makes no sense whatsoever: 1 Undefined method 'name' for nil:NilClass well then, you probably want to add the following line to your tests: 1 @request.env["devise.mapping"] = Devise.mappings[:admin] Yeah… That took me way longer than expected. On a COMPLETELY UNRELATED SIDE NOTE, pry is pretty cool when you end up having to step through code…