RSS
 

Archive for the ‘general’ Category

Just closed more funding? My condolences.

02 Oct

When a popular company announces a new round of funding, the Hacker News comment threads are usually overwhelmingly congratulatory. This attitude is horribly misguided. In my eyes, announcing post-seed funding is a BAD thing, and should be close to a PR disaster. The HN threads should be full of condolences. Here’s why.

The company hasn’t figured out how to pay its bills

At the end of the day, a company exists to make money. Every round of funding (past, maybe, a seed round) is an admission that you still haven’t figured out a business model that will keep the damn lights on. Every startup should want each round of funding to be its last.

The founders have ceded control

Companies in very strong positions are sometimes able to take funding without losing much control of the company, but this is rare. In general, founders are turning over substantial control to professional gamblers with horrible succes rates. A VC will never love your company like you do; he’s there only to get paid. This will forever taint your relationship.

Part of the company was sold prematurely

People seem to forget that “getting funded” really means “selling part of the store”. If you think your company is going to be worth more in the future, why are you selling part of it now?

Here’s an announcement I’d love to congratulate: “we’ve recently reached profitability and know we can keep the lights on. We think we can make even more money in the future, so we’re going to hang on to as much precious equity as we can. Offers for outside funding are flattering but unnecessary.”

 
No Comments

Posted in general

 

Let’s read some Rails code: with_options

05 Jun

Did you know you can refactor this:

# Duplicated :dependent => :destroy option.
class Account < ActiveRecord::Base
  has_many :customers, :dependent => :destroy
  has_many :products,  :dependent => :destroy
  has_many :invoices,  :dependent => :destroy
  has_many :expenses,  :dependent => :destroy
end

into this?

# Nice and DRY!
class Account < ActiveRecord::Base
  with_options :dependent => :destroy do |assoc|
    assoc.has_many :customers
    assoc.has_many :products
    assoc.has_many :invoices
    assoc.has_many :expenses
  end
end

The with_options method is a really cool chunk of code that lets you DRY up duplication that sometimes appear when passing the same options to a series of methods.

But the point of this post is how it works behind the scenes, so check out this 11-minute code walkthrough:

By the way, this is an excerpt of a longer screencast I’m working on about ActiveSupport internals. If you’d like to be notified when the full screencast is released, drop your email in this form. (One email, ever.)

You can also check out the other Rails-related screencasts I’ve already done.

 
No Comments

Posted in general

 

Video: write code faster — expert-level vim

30 May

In May of 2010 I gave a one-hour talk to the Boston Ruby Group titled ‘Write Code Faster: Expert-level Vim’.

I’d volunteered to give it as a test-run before delivering the same talk at RailsConf a month later.

Little did I know, someone recorded the Boston.rb talk and it recently surfaced on the presentations page.

If the title sounds interesting, go watch the talk!