... wherein I bloviate discursively

Brian Clapper,

Rails Local Configuration

| Comments

The problem

I needed to fire up the Rails 3 server to listen on a port other than the default port 3000. Obviously, I could simply run it like this:

rails server -p 1234

However, for simplicity (and so I wouldn’t forget), I wanted to be able to configure the alternate port. It seems that the easiest way to accomplish that goal is by metaprogramming Rails::Server in config/boot.rb, as described in this StackOverflow answer.

However, I didn’t want to hack the port for everyone; I wanted a solution that would be specific to a RAILS_ENV setting.

The Candidates, Part 2

| Comments

A follow-up to my previous cartoon.

Click the image for a larger view.
Click me.

The comic book typeface is called Unmasked, and it’s available, free for non-commercial use, from Blambot.

The Candidates

| Comments

A temporary departure from technical topics, for an amusing cartoon. Well, amusing to me, anyway…

Update: I posted a follow-up cartoon here.

Click the image for a larger view.
Click me.

The comic book typeface is called Unmasked, and it’s available, free for non-commercial use, from Blambot.

R.I.P., Dennis Ritchie

| Comments

While the world was loudly eulogizing Steve Jobs’ death, we lost another computer science luminary over the weekend. On October 8th, 2011, Dennis Ritchie died at his home. He was 70.

Ritchie’s celebrity and status within computer circles was well-established. But, unlike Jobs, Ritchie was largely unknown outside our industry. More’s the pity, since his impact on this industry cannot possibly be overstated.

R.I.P., Steve Jobs

| Comments

While I can’t say I’m overly fond of the hyper-controlled walled garden Apple is building, I will never have anything but admiration and respect for Steve Jobs. His singular drive, his strong sense of design, and his anal-retentive need to make Apple’s machines both beautiful and easy to use transformed computers from confusing tools that made the average person swear, into tiny, wondrous and sleek have-to-haves that are as familiar and comfortable as the morning newspaper they helped to bury.

I own an aging MacBook Pro, which I will be replacing soon, with a brand new MacBook Pro. I own an iPad, and I can honestly say I am in love with that device. In our family, iPods abound. I am not an exclusive Apple geek; I have an Android phone, and I spend as much time on Linux as I do on my Mac. But Apple’s technology stands apart, and Jobs’ manic dedication is the reason.

I still remember the Apple ][ machines that showed up in a special, new lab in Temple’s computer science building, back in 1982, when I was an undergraduate. A few of us student consultants, including Rob Keiser, Stan Spotts and me, were tapped to staff the lab. Naturally, as geeks, we took the opportunity to play with the machines in the lab. I spent way more time on the Apples than on the IBMs. Even then, Jobs and Wozniak had a knack for making their computers seem more fun.

It’s been amazing to watch where that humble machine, and garage-built company, have gone.

Rest in peace, Steve Jobs.

Jasmine and Coffee

| Comments


While writing some CoffeeScript field validation functions for a client, I realized that I really needed a way to test the functions outside of the browser. Initially, I just hacked together my own simple test framework, which got the job done. However, I decided it’d be better to use a more full-featured framework. I settled on Jasmine, a behavior-driven development (BDD) testing framework for Javascript.

The remainder of this article describes how I am currently using Jasmine. There are loads of other ways to use this excellent tool; this is just what I am doing with it. I’m using Jasmine with node.js, at the command line. Jasmine also supports integration with Ruby, Rails, Django, and Java, among others.

Why I dislike Maven

| Comments


A few nights ago, I converted one of my long-running, open source, Java libraries from its horrid, old-style Ant build to Maven, largely because of several advantages Maven provides:

  • It manages third-party dependencies cleanly and simply.
  • It allows me to publish my library in a Maven repository, so that others who use Maven can easily depend on my library.
  • It’s the defacto standard Java build environment.

Those are powerful advantages. The dependency management, alone, is an incredible time saver.

Nevertheless, one day after making the Maven switch, I ditched Maven for Apache Buildr.

Mac OS X Lion has ruined my MacBook Pro

| Comments

Updated: It’s all about the RAM. See below.

About a month ago, I upgraded my vintage 2006 MacBook Pro to Mac OS X Lion. It was only $29.95, so, why not?

That decisions turns out to have been a bad one. Lion seems to have been designed to force me to buy a bright, shiny, expensive, new Mac.

See, my old MacBook Pro tops out at 3Gb of RAM, and Lion seems to be a memory pig. After moving from Snow Leopard to Lion, I see far more spinning beach balls of death than before, and my laptop is sluggish to the point of unusability.

Trademark Scams

| Comments

Late in 2010, I decided to register a formal service mark for my company, ArdenTex, Inc. Registering a trademark or service mark is simple enough these days: You go to the appropriate web page of the United States Patent and Trademark Office, fill out some occasionally puzzling forms, send them in, pay the fee ($275.00 for filing electronically, as of this writing), and wait. Then wait some more.

If you’re willing to spend some time, you don’t need to hire a lawyer; you can do the job yourself. (I did.)