Via Phil Larson’s Flexibility Is Bad Design:
In my opinion, good design is whatever results in a shipping product, using the least amount of code, in the least amount of time.
I’d only alter this slightly to read “…using the least amount of the simplest code possible…”, which Phil adds as a caveat later in the paragraph that sentence is abstracted from.
chris on June 30th 2008 in /dev/random
“Don’t bother the senior engineers for an hour when an hour of research would get you the same information: respect them. Do bother them when an hour of their time will save you all day: respect yourself. Bust your ass, and ask a lot of questions. Carry a notebook. Write everything down. Never, ever ask the same question twice.”
Common Denomination is not the Enemy
chris on June 28th 2008 in /dev/random
I have a class, it acts_as_tree. I want to be able to delete nodes from the tree and heal the rift between grandparent and children, joining them as parent-child afterwards.
Seems like it should be pretty obvious but nothing I was coming up with was doing the trick. The node was always deleting yet so were its children. Then I googled upon this forum and the solution was found. When executing a before_destroy filter on a class that acts_as_tree, put the before filter first:
class VettingStage < ActiveRecord::Base
before_destroy :extract_self_from_chain
acts_as_tree :foreign_key => "parent_id",
rder => "name"
...
end
That was easy.
chris on June 24th 2008 in /dev/rails, /dev/ruby
… but it isn’t, it’s real: Man gets Windows Vista to work with printer.
…
Original body redacted. In hindsight this post was snarkier than I’d intended and contributed not one whit to the discourse about beneficial software design. Thus I’ve removed it from the public sphere.
..
We owe the users a bit more than this, yeah?
chris on June 23rd 2008 in /dev/random
The solution to a little problem was was annoying the heck out of me. When SSHing into Linux machines from my OS X laptop the Delete key in nano would forward-delete instead of backwards-delete, meaning that it would not delete the typing mistake I just made, but rather whatever text came after that point.
The solution: open the preferences in Terminal, go to the Advanced tab, and check on Delete sends Ctrl-H.
Log back into the Linux machine and backward-delete should be working in nano again.
Update: This only works with a version that has an Advanced tab, which may be a Leopard-only thing.

chris on June 23rd 2008 in /dev/random
This is a thing of beauty: My Webapplication Firewall Tutorial.
Note that if you’re going to use it with a Rails app you’ll probably want to remove DELETE from line 5.
chris on June 20th 2008 in /dev/rails, /dev/random
We’ve found our project manager and now to compliment the dev team we need a PHP developer:
Can you dream big while keeping your feet on the ground?
DreamBank, a Vancouver-based 6-person web startup is seeking an intermediate-level LAMP developer to join our team. Working from our Yaletown office, you’ll join the senior developer in maintaining and growing our brand-new web service.
With a focus on making dreams come true, working with DreamBank will present opportunities to both brighten your portfolio and make the world a better, happier place. We’re a tight team that communicates well while working with passion and determination. DreamBank offers a basic renumeration package to start, and have a roadmap for significant growth that we want you to be a part of. Can you fill that seat? If you think so, contact us at info@dreambank.org with a letter of introduction and links to live, viewable projects you’ve worked on. No resumes, please.
Location: Yaletown, Vancouver
Compensation: 65-70k on contract, depending on experience.
This is a contract job.
The job posting on Craigslist.
chris on June 18th 2008 in /dev/random
In this very interesting interview with Blaine Cook (once of Twitter fame) Blaine provides the best analogy for describing “performance” vs. “scalability” I’ve yet to read:
Performance and scalability are very different things. Performance is like the speed limit; it’s a question of how quickly you can get from point A to point B. In this case, we’re talking about how quickly you can get a page rendered and delivered to the user.
Scalability is a question of how many users you can handle. Highways intrinsically don’t scale, for example, because when they’re full, you get traffic jams. In web architectures, what we aim to provide are systems that will expand (usually by adding more hardware) to handle more traffic.
Obviously they’re related – if you have a traffic jam, then the effective speed limit is lower than the theoretical limit. But increasing the speed limit won’t make traffic jams any better.
There are a whole bunch of ways to make traffic less congested – adding more lanes to the highway, encouraging people to use public transit, or better yet encouraging people to work closer to home.
Likewise, there are many techniques for making web sites more scalable, and most of them don’t involve making things much “faster”.
As an aside, I continue to be impressed by Blaine’s grace under the seemingly relentless “Tw/ails doesn’t scale and it’s your fault” onslaught. Good on you sir.
chris on June 17th 2008 in /dev/rails
Not only do the British build a global armed-services satellite system, they actually named it SkyNet:
The final satellite in the system was launched this week, and will allow high-bandwidth telecommunications between British forces located anywhere in the world. In addition to voice communications, it will allow data transfer and the remote control of robot airplanes, one of which is called “The Reaper.” One of the manufacturers was quoted by BBC News as saying:
So, computers can talk directly to computers.
Have they learned nothing from Hollywood??
If your name is Sarah Connor, you might want to hide.
chris on June 13th 2008 in /dev/random
With today’s availability of iTunes movie rentals in Canada the Apple TV might finally be worth buying up here now.
I guess I do have a reason to go down to Vancouver’s new Apple Store after all….
chris on June 4th 2008 in /dev/random