fhwang.net

profitably

Hiring hiring hiring

You may have heard that a few weeks ago, we officially hired Eric Richmond as Profitably’s 2nd full-time software engineer. He’s been kicking ass over here, but if you’d be wrong to think that that’s all the ass-kicking we need. Profitably is still hiring.

We are looking for both a front-end engineer and another Ruby engineer. Obviously a talented engineer has lots of options, so our pitch boils down to something like this: Profitably handles complex analytical problems in an environment that is agile and results-oriented. We turn small businesses’ messy data sets into actionable financial analysis, which we believe is a big challenge and an even bigger opportunity. We also believe it’s hard enough that most people won’t be able to do it right.

So if you feel like your perfectionism is being wasted on YASA (Yet Another Social App) then maybe you should check out our job listings, and get in touch.

Profitably financing war stories, and investor advice

From the Department of Oversharing: Since we love being candid about ourselves at Profitably, Adam decided to write up a warts-and-all account of the things we’ve learned from the time spent fundraising over the past year. Well, mostly what he’s learned, because during most of this he’s worked hard to bear the brunt of the stress and the time-sink while leaving the rest of the team relatively insulated so we can trucking on the product. It’s long and detailed and worth a read if you think you’ll ever have to raise an investment round, especially if you’ll have to do it in NYC:

A Tale of Two Financings

One smallish side point that re-occurred to me as I was reviewing this is on the value of advice from investors. The best investors are the ones who figure out how to be open about their doubts, even if they can’t be bothered to be diplomatic about it. And I know, speaking for myself, it was very difficult to not get defensive about any advice that would result from those doubts. It’s easy to think “screw you, you’ve thought about my company for all of ten minutes, I quit my last gig and I’ve been doing this full-time for months now”, and use that position to dismiss the difficult advice you may have received.

But in the past year, there have been multiple times when we started to hear the same advice from multiple investors or advisors—whether on product or market or people—and we resisted, and then after a little while we realized, “Damn it, those guys are right.” This is just my banal point about the whole smart money vs. dumb money thing: The best investors don’t just have cash, they have experience and perspective that can be helpful in more profound ways than just paying for your salary. Unfortunately, some investors are actually just jackasses. But the good advice is out there, and it’s far more plentiful than investment cash—and if you can figure out how to get good advice, that’s just as valuable to your company as anything else.

Round 2

Once again, Venture Beat:

Profitably, a provider of online business analytics software, has raised a funding round worth $1.1 million led by White Owl Capital….

“We launched a very early product, and there are just a ton of features that people want to see,” said Adam Neary, the company’s chief executive. “We just can’t write these things fast enough, so we needed to raise funds to keep this party going.”

Profitably still isn’t targeting the mom and pop stores — it’s geared toward small- and mid-sized businesses that actually need more in-depth analytics. The company is going after the problems a chief financial officer at a 40-person firm has, not the kind of problems a local delicatessen or retail store has, Neary said.

Obviously, I’m psyched. It’s great to have the runway, and to be able to tune up the code as we continue to refine our understanding of the strange software hybrid we’re building. It will also be great to build up the engineering team a bit.

And, of course, if you’re interested, we’re hiring in New York.

The nuts-and-bolts of configuring Resque and resque-web for a production Rails app

At Profitably, we’ve been using Resque for a few months now, and we’re loving it. Resque’s web interface is a great way to get a high-level understanding of your background workers, and its pluggable design has made it easy for others to contribute a number of really useful plugins. For Profitably, getting control of our background jobs is critical. Our software doesn’t have a ton of public-facing controllers & actions yet, but under the water line it’s already a large system built around mapping and aggregating financial data. (If you’re a Rubyist, and this sounds interesting to you, you should check out our jobs page.)

From a code perspective, it’s not that hard to move to Resque—you write Job classes and you just run them. But I found that I had a few speedbumps in setting it up for production, not least because configuration is not my strong suit. So I decided to describe how we configured Resque to run in production. There are a lot of duct-tapey parts to our setup, and it’s quite likely you’ll make some different choices, but what I describe below has worked well for us so far.

Build a resque-web directory in your Rails app

Continue reading “The nuts-and-bolts of configuring Resque and resque-web for a production Rails app” »

View from the Profitably office

This is what it looks like when I turn left. Did I mention we’re hiring Rubyists? You, too, could have this view. Well, not exactly this one but a very similar one from a few feet away.

Profitably is looking for a VP of Data

We are a four-person, seed-funded startup in NYC looking for a Vice President of Data to take our analytics to the next level. Business intelligence is core to our product: We provide strategic financial insights for companies that don’t have the time or money for a traditional BI consulting engagement. As our second engineer, you will take ownership of the analytics functions in our system architecture, and you will collaborate on the vision for a data-centric product.

More here.

sample_models 1.0

I’ve just released version 1.0 of sample_models. This release has been a long time coming: I’ve been developing sample_models for more than two years as I’ve been trying to figure out the best interface for it. I use it now in a lot of projects, most notably Profitably, so I’m finally able to stabilize the interface and document how this thing works.

sample_models makes it extremely fast for Rails developers to set up and save ActiveRecord instances when writing test cases. It aims to:

  • meet all your validations automatically
  • only make you specify the attributes you care about
  • give you a rich set of features so you can specify associations as concisely as possible
  • do this with as little configuration as possible

Let’s say you’ve got a set of models that look like this:

  class BlogPost < ActiveRecord::Base
    has_many   :blog_post_tags
    has_many   :tags, :through => :blog_post_tags
    belongs_to :user

    validates_presence_of :title, :user_id
  end

  class BlogPostTag < ActiveRecord::Base
    belongs_to :blog_post
    belongs_to :tag
  end

  class Tag < ActiveRecord::Base
    validates_uniqueness_of :tag

    has_many :blog_post_tags
    has_many :blog_posts, :through => :blog_post_tags
  end 

  class User < ActiveRecord::Base
    has_many :blog_posts

    validates_inclusion_of    :gender, :in => %w(f m)
    validates_uniqueness_of   :email, :login
    # from http://github.com/alexdunae/validates_email_format_of
    validates_email_format_of :email
  end

You can get a valid instance of a BlogPost by calling BlogPost.sample in a test environment:

  blog_post1 = BlogPost.sample
  puts blog_post1.title             # => some non-empty string
  puts blog_post1.user.is_a?(User)  # => true

  user1 = User.sample
  puts user1.email                  # => will be a valid email 
  puts user1.gender                 # => will be either 'f' or 'm'

Since SampleModels figures out validations and associations from your ActiveRecord class definitions, it can usually fill in the required values without any configuration at all.

If you care about specific fields, you can specify them like so:

  blog_post2 = BlogPost.sample(:title => 'What I ate for lunch')
  puts blog_post2.title             # => 'What I ate for lunch'
  puts blog_post2.user.is_a?(User)  # => true

You can specify associated records in the sample call:

  bill = User.sample(:first_name => 'Bill')
  bills_post = BlogPost.sample(:user => bill)

  funny = Tag.sample(:tag => 'funny')
  sad = Tag.sample(:tag => 'sad')
  funny_yet_sad = BlogPost.sample(:tags => [funny, sad])

You can also specify associated records by passing in hashes or arrays:

  bills_post2 = BlogPost.sample(:user => {:first_name => 'Bill'})
  puts bills_post2.user.first_name  # => 'Bill'

  funny_yet_sad2 = BlogPost.sample(
    :tags => [{:tag => 'funny'}, {:tag => 'sad'}]
  )
  puts funny_yet_sad2.tags.size     # => 2

You can also specify associated records by passing them in at the beginning of the argument list, if there’s only one association that would work with the record’s class:

  jane = User.sample(:first_name => 'Jane')
  BlogPost.sample(jane, :title => 'What I ate for lunch')

For more documentation, see the README.

Testing Rails against a running Redis instance (and doing it with Hydra to boot)

Profitably has been running Redis since very early on. And as I’m planning to lean on Redis even more heavily going forward, particularly for Resque, I decided to beef up how Redis is tested in the Rails app. Since not a lot of people are talking about what this takes, here are my notes about my initial setup:

Testing approaches

If your Rails app uses Redis, there are basically three approaches you can take for when the code under test hits Redis.

Continue reading “Testing Rails against a running Redis instance (and doing it with Hydra to boot)” »

Profitably is one of VentureBeat’s 5 favorite DEMO companies

Thanks Anthony!

http://venturebeat.com/2010/09/17/venturebeats-5-favorite-demo-companies/

Incidentally, Card 2.0 from Dynamics, which won the People’s Choice award and is featured in that post, was a pretty remarkable product that could have a huge impact on the payments infrastructure industry. It’s the sort of hard tech you certainly don’t see enough of in NYC, but in fact Dynamics isn’t from Silicon Valley: They hail from Pittsburgh, having built a company around Carnegie-Mellon grads. It’s an inspiring East Coast story, and I’m looking forward to seeing Jeff Mullen everywhere in the next few years.