Our First Customer

ManToday Patrick and I demoed our web application to a potential customer. He agreed to participate in our free private beta, which is bigger than it sounds, because he will actually be running a large aspect of his business’s marketing on our product.

(I know I’m still being really, really vague, but I promise details will come…in November.)

A Demonstration to Remember

A went to Ruby East a little over a week ago with Patrick. We heard several good talks about Ruby and Rails and thought the conference was well-worth the money we spent to attend it. The most valuable presentation for me really wasn’t a presentation at all; it was a demonstration.

Giles Bowkett didn’t put us through an hour of slides. Instead, he spent the time walking us through and demonstrating his .irbrc–his Rails debugging tool set. For those unfamiliar with or new to Rails, Rails has an interactive Ruby shell console called script/console where you can execute arbitrary lines of Ruby code to debug Rails applications. Each time the console is launched, initial settings and functions are defined by one’s .irbrc. His contained many useful tools and hacks, the details of which I will leave to the reader to discover. I just wanted to publish something referencing it since it is so good.

(You can read Giles’s thoughts on his own talk too.)

Self-Inflicted Punishment

I will not reinvent the wheel. I will not reinvent the wheel. I will not reinvent the wheel. I will not reinvent the wheel…

Yesterday I wasted nearly five hours trying to implement something someone else had already coded. This isn’t the first time I have tried developing something from scratch without first checking to see what others have done to solve the exact same problem. I need to break this habit.

…I will not reinvent the wheel. I will not reinvent the wheel. I will not reinvent the wheel. I will not reinvent the wheel. I will not reinvent the wheel. I will not reinvent the wheel…

CSS Selectors: Use Classes

I have refactored a lot of web pages the past thirteen years. When CSS came out, I was ecstatic; my mark-up was much cleaner; style changes were simpler; life was more enjoyable. However, I have also refactored a lot of CSS. Changes to styles are a given and are simple to make–that’s the beauty behind it. The pain comes in when mark-up changes. Mark-up changes often lead to changes in selectors.

Pain is at its worst when selectors are anonymous, whether as inline styles or ones that are dependent on element ordering and hierarchy, such as:

div > p > a > span
div > p img

The mark-up they style is highly susceptible to change as a site evolves. It is prudent to construct base element selectors (body, p, img, etc.) after starting from a clean CSS slate, but anonymous ones should be avoided.

The second is the use of id selectors over classes. Although not anonymous, they lock you into styling just one thing on the page or complicate styles by prefacing them with numerous selectors:

#warning, #attention, #exception { color: red; }

The minute you decide to add an #error element to your page, you’re refactoring your CSS again. Even though you may just want to style just one element on the page when you first define it, it doesn’t have to be selected by id; you can select it by a CSS class:

.attention { color: red; }

If you add a #warning or #error element later on, which you want to style the same, you can simply use the class you’ve already defined and not have to add yet another selector to the list.

I am now at a place where I have largely abandoned anonymous and id selectors and have stuck to just base element and class selectors. Styling is easier and simplicity, readability, and consistency come as added benefits. Of course there are exceptions to this way of thinking–that’s why id and anonymous selectors exist. They just shouldn’t be the default way of thinking.

Day Fourteen

Patrick and I went to an expo yesterday. We met a conference speaker who pointed us out several times during two different presentations (without us even asking). And we had a few business owners give us their contact information, asking us to get in touch with them.

Exciting.

(Real information to follow, when deemed appropriate.)