Naildrivin' ❺

➠ Website of David Bryant Copeland

❺➠ Introduction to GLI

Sitepoint recently published Introduction to Thor and, to be honest, I don’t think Thor is a great tool for writing command-line apps. Thor is a great for writing Rails generators (likely the only reasonable tool), but I wrote GLI specifically because I wanted a tool tailor-made to write awesome command-line apps.

With the re-release of my book, which uses GLI to demonstrate how to build amazing command-line apps in Ruby, I thought I’d mimic Sitepoint’s post with a GLI version, and let you decide for yourself.

❺➠ Square Wallet Is Almost Awesome

If you’ve ever been on a vacation where you don’t have perfectly fast network access, and tried to use popular social-networking apps, you can probably identify with my tweet:

I use a lot of applications from companies that present themselves as developer-friendly, agile, forward-thinking, and product-focused. Despite that, these products have very obvious flaws that, to my thinking, reduce the value to both the company and its users (unlike, say, Google Ads, which only reduce value to users).

Tearing apart the three apps I mention above will be an undertaking, so I’d like to start with an app I really, really like, and use almost every day: Square Wallet.

❺➠ Self vs Professional Publishing

I get asked occasionally about the self-publishing process and how it compares to the “professional” publishing process, since I have done both. I thought it might be interesting to compare and contrast these two approaches. The professional approach is regimented, organized, and carries many advantages, while self-publishing allows total freedom, at the cost of doing a lot more work for a lot less money.

† an Introvert Goes to Dinner

I’m trying out Medium as a place to do non-technical writing, mostly to keep this blog’s topic focused on technology. I won’t cross-post everything here, but this is my first one, An Introvert Goes to Dinner. Excerpt:

I actually enjoy solo trips like this. It’s a chance to be as alone as possible: I’m in a city were I don’t know anyone, typically with a lot of free time outside of whatever reason brings me to said city. I know I won’t have to talk to anyone.

Chromebook Keyboard Slightly Innovative

Brief follow up to my A real keyboard for programmers post, I got a Chromebook yesterday and the keyboard, while sporting the same layout as most other computers, actually is better designed for what the Chromebook does.

Namely, it has no function keys, instead using them for browser navigation, window management, and hardware controls. Most amazingly, though, it has no Caps Lock, instead making it a Search key, which makes sense. It’s a big key in a very prominent spot and Search is what Google wants you to do.

A Real Keyboard for Programmers?

Jeff Atwood (AKA codinghorror), introduced a new computer keyboard, produced by WASD, called the CODE keyboard:

I told him that the state of keyboards was unacceptable to me as a geek, and I proposed a partnership wherein I was willing to work with him to do whatever it takes to produce a truly great mechanical keyboard.

Jeff is heralding this as a “truly great mechanical keyboard”. I was very eager to see what such a beast looked like. Here it is:

Oh wait, sorry, that’s the original 101-key version of the IBM PC Keyboard, introduced in 1985. How’d that get there? It’s been almost thirty years, so the CODE keyboard must be awesome, right?

❺➠ Inconsistent Architecture

Quick, which is better: MiniTest or RSpec? HAML or ERB? SASS or LESS?

If you are building your first Rails app at your company, it doesn’t matter. They all work more or less the same, so just pick one and go. Take a vote or declare by fiat, but get on with your life. No project ever failed because they picked HAML over ERB.

If, on the other hand, you are building a new Rails application that runs in an existing technical infrastructure (which is far more likely), then these are the absolute wrong questions to be asking. Use what your team already uses unless there’s a good technical reason not to. Why?

Because consistency is far more important than most other factors.

❺➠ Responsible Refactoring

Emboldened by tests, and with the words “ruthless refactoring” in my head, I used to “improve” the codebase I was maintaining at a previous job. One day, my “cleanup” caused production to break. How could this be? I was being Agile. I was Testing. I was Merciless in my Refactoring. I had found Code Smells, dammit!

I was being irresponsible.

† Manual vs Automatic Continuous Deployment

My ex-colleague from LivingSocial, Dan Mayer posted a great read about continuous deployment, and the tradeoffs when doing an automatic deploy:

After considering some of the real world implications of automated continuous deployment, I didn’t feel it was right for our team on most of our projects at the moment. Both because we would need a bit of additional tooling around deployment and dashboards, and because our tests are far to slow.

It’s a good (and quick) read. Having worked on at least one of the apps that Dan’s talking about, I would agree he’s making the right call and that if your test suite is slow, automatic deployment can be a killer. I also think there’s a relationship between the size of the contributor group and the speed of the test suite - the more devs pushing stuff in, the faster it has to be.

In my book, there’s a chapter on bootstrapping new applications, and my recommendation is to set up automatic continuous deployment from the start. I stand by that, because it basically turns the problem Dan identifies around: slow tests slow your deployment which should thus motivate keeping tests slow (and applications lean). We’ll see how it works out at Stitch Fix. We have one app with a somewhat slow test suite, and three with relatively fast ones. Automatic deploys work really well so far.