Lessons Learned in Customer Development

Note: This post originally appeared on GreenhornConnect.com on September 9, 2010. I’m organizing all my customer development posts from GHC on here for easy reference (see the Lean Startups tab).

“Customers live outside the building.” Every startup is well served to remember this and make sure they’re reaching out to their customers/users to understand them.  As customer development manager at oneforty, I’m on the front lines of that effort and our overall goal of implementing Lean Startups methodologies.  I’d like to share a few things I’ve learned along the way.

Lessons Learned in Customer Development

1) Ask the right questions the right way.

One of the key tools in customer development is the user interview.  At its heart, you’re trying to understand what problems your users have and how your startup may solve some of them.  The greatest challenge in these interviews is keeping the discussion focused on user problems and frustrations instead of features and their ideas for solutions; users are notoriously bad at suggesting features they need or would actually use, so you absolutely need to focus on what problems are behind those feature requests.

There are some great contributions in the blogosphere to help guide you in preparing your interview questions:

2) You manage what you measure.

In addition to interviews, metrics are the other big piece of customer development. You have to understand what’s happening on your site and decide what aspects you will work to improve and in what order.

The best way we’ve found to track this is to consider everything under Dave McClure’s AARRR model.  There are all kinds of numbers we can measure on oneforty, but by grouping them into categories of Acquisition, Activation, Retention, Referral and Revenue, a clearer picture of the meaning of all the numbers is formed.  We then take those numbers and focus our engineering sprints on improvements in one of those categories at a time.  This helps engineering understand what they’re building while also making it easier for us to measure for improvements based on those efforts.

3) Communication is key…inside and out!

While Jeremy and I dive into the metrics on oneforty each week in great detail and I interview many users to understand their problems, that’s just the beginning of the work for customer development.  It is essential that what is discovered is shared with the team in a concise and clear fashion; they need the information to act on what we’re seeing and understand the reasoning behind development decisions.  At oneforty, we go over key metrics results with the entire team for 5-10 minutes each week and have a monitor on the wall in the office that displays 3 core metrics we’re focused on right now.

In addition to communicating within the team, it’s important to also communicate outside.  First, you always want to be tweaking your interview questions based on how your site or product is changing; if you’re considering adding a new feature it is important to understand if it solves a significant problem or is particularly compelling for users before you devote significant engineering time.  The best way to do this is through full interviews, but with tools like KissInsights and SurveyMonkey available, you have easy ways to ask large groups of people questions as well.

The other form of outward communication that’s important is with others doing customer development.  Often, it is hard to tell what is a good number for a metric and if you don’t know, you may be trying to improve something that’s already well optimized.

Recently, I discovered two key figures from asking others:

  • A 10% response rate on email requests to do a customer development interview is actually good.
  • For email newsletters, a 30% open rate and a 20-30% click through are solid and standard across most industries.

To learn these numbers I didn’t do anything special; I simply talked to one of Laura’s mentors, Tweeted a question, tried AskDart and asked some friends.  It didn’t take very long, but saved me a lot of time in the long run.

4) Pattern recognition is your most important skill

In the end, I think customer development is all about recognizing patterns.  You don’t memorize everything a user says in an interview; you’re merely looking for commonalities across many interviews. You should be asking yourself, “Are similar users mentioning the same frustrations or questions?”   These patterns are how you identify your “earlyvangelists” and identify the most important issues to work on.

You can also look at metrics the same way.  The goal is not to have to measure every single activity on your site. Rather, you should be searching for a few specific activities that can lead to the needle moving on many things on your site.

Customer development is an essential part of an early startup’s life as they search for product market fit. It’s a challenging job, but fortunately there are tons of great resources out there and an open community sharing their knowledge.  If you’re looking to learn more, search for content from Steve Blank and Eric Ries, look for the hashtag #LeanStartups on Twitter and look for Meetups around you on this topic.

What have you learned by doing your startup’s customer development?

5 Lessons Learned in a Lean Startup

Note: This post originally appeared on GreenhornConnect.com on February 23, 2011. I’m organizing all my customer development posts from GHC on here for easy reference (see the Lean Startups tab).

In honor of both the Lean Startup Circle Meetup on Thursday and the Lean Startup Machine coming this weekend, I’d like to share a few lessons I’ve learned in the past year as I’ve served as Customer Development Manager at oneforty and been actively learning the Lean Startups methodology.

5 Lessons Learned in a Lean Startup

1) Don’t ask what people would pay for. They lie.

Yes that’s right. Even Honest Abe wouldn’t have told you what he’d really pay for if you showed him a web app and asked what he’d pay for on top of what you showed.

Customers are terrible at explaining their problems and understanding the root issue. As the saying goes, the one certainty for a patient seeing a psychiatrist is that what the patient says is cause of their problems is never the actual problem.

Even I have lied. I was talking with Chris Keller about his awesome tool Followup.cc, which is an email reminder system, and I said, “I would pay to be able export all of my reminders to my Google calendar.”  Chris wisely also looked at engagement and based much of his pricing system on number of reminders, but he also put the calendar export in his paid version.  I am now a paying customer of Followup.cc but have yet to actually use the Google calendar system.

Did I intend to lie? Of course not. But it just goes to show the mindset you can get in and how far from the truth it can be. Don’t ask people what they’d pay for.

2) Nothing beats getting a customer to actually pay for something.

There is no better validation for your business than getting a user to actually pay for something.  Despite the true value of your time, few people actually account for this. That means they are actually quite likely to be willing to use your free product, while having no intention of ever paying for it.

Paying also moves you beyond the realm of being a favor; friends, acquaintances or just nice guys, no one will pay for your product unless it really solves a pain or strongly interests them.

As an added bonus, once someone pays for something, they have expectations. That means that their feedback will be stronger, because they gave you their money and now expect that you will deliver on what they hoped they were buying. This feedback is priceless, as building something that satisfies them can be built into the repeatable process that goes into a sales funnel.

3) You have to learn the customer’s language.

You may call your product anything you want but if it and the language you use to describe it doesn’t resonate with your customer, you’re unlikely to move forward.  You need to understand your customer’s language and make your product speak that language.

The best way to do this is to look at what words your customer uses to search for the problem you’re solving and, of course, the customer development interview. Remember, your customers should be doing 70-80% of the talking in your interviews.

4) A customer’s stating a problem is more valuable than a customer agreeing with a problem you present.

One of the key tenants of Lean Startups is that you’re solving a customer’s pain.  Often the question is if what you are building is a so called “Vitamin,” which is nice to have, or you’ve created a “Pain Pill,” which they definitely need.

One indicator of which side of the Vitamin/Pain Pill coin your product is on is how the problem that your product solves is surfaced. If in the middle of your interview (before you pitch your solution) the customer talks specifically about the problem you’re trying to solve, you have a much stronger indicator of pain than if you ask them if they are experiencing pain in the area you believe is a problem.

Now, this does not mean that someone who doesn’t come right out and say your problem isn’t a potentially valuable customer. However, when you’re looking for those early adopters (aka- earlyvangelists) you should be thinking about who most desperately needs your solution and that is likely people who have the problem you’re trying to solve on top of mind.

5) Be precise in your Hypotheses.

So you think you have a product solution that is the greatest thing since sliced bread? Great. But who is it for and how does it solve a key pain for them?

One of the risks in creating your lean startup is that you forget to get specific on your hypothesis. Don’t say “this is for doctors”; say “this is for pediatricians in suburban environments that have small, private practices.”

The reason you need to be specific is to avoid false indicators. If you don’t make your hypothesis specific, than you are very likely to talk to a wide range of people. When talking to this wide range, you may not find the interest you would otherwise if you specifically went after a specific group.  You could end up talking to a bunch of chiropractors and surgeons and never realize that the reason there was no interest in your product wasn’t that it’s not a great idea solving a problem; no one was interested because you weren’t talking to the right people.

There’s a seemingly endless amount to learn about Lean Startups, so no matter what stage you’re at just remember: Stick with it, Be patient and Don’t be afraid to ask for help.

There’s a great community on Twitter (look for hashtags #LeanStartups and #CustDev), many awesome blogs (Eric Ries, Ash Maruya, Dan Martell, David Cancel and many others) and of course great events (Lean Startups Circle) to help.

How to Structure (and get the most out of) Customer Development Interviews

Running a startup puts a ton of responsibilities on your plate. From marketing to sales, ghetto-HR to accounting, development to project management, you’re wearing a million hats.  We all know that Lean Startups methodology and customer development are important, but *actually practicing* it can be hard (if you’re not familiar run to CustDev.com *right now* and get Brant and Patrick‘s book The Entrepreneur’s Guide to Customer Development ASAP!).

As you commit yourself to “getting outside the building” to talk to your customers and truly quest for Product-Market Fit, it’s essential you make the most of those discussions. One of the hardest things for newcomers to customer development is structuring their questions for customer development, so I’d like share how I structure interviews to maximize their effectiveness.

————————————————————————————————————————–

I’m writing a book on Building Customer Driven Products.

You can sign up for updates, early access to chapters and help shape the topics I cover by signing up here.

————————————————————————————————————————–

How to Structure (and get the most out of) Customer Development Interviews

A few others have written about how they do interviews, so definitely check out Cindy Alvarez and Sachin Aggarwal’s thoughts on the subject. 

I structure my custdev interviews in 3 parts – People, Problems, and Your Solution. Depending on the person, this question flow generally takes me 30-45 minutes to go through. (Note: This structure is best suited to B2B customer development, but with a little creativity, you can definitely adapt this for B2C interviews)

1) People – Aka – Who Are You?

Before you get into anything about problems or your solution, you need to figure out who you’re actually talking to. This both warms up your interviewee with some softball questions and gives you an opportunity to build some rapport with them.

Some example questions you could ask:

  • What is your name and role at your company?
  • How do you fit into your company’s department structure? Overall in the company?
  • What is your budget like? Who has to approve your purchases?
  • How do you discover new products for work? Do you need any approval to try them?
  • Have you tried anything new recently?
  • What is a typical day like on your job?
  • How much time do you spend doing [task X]? (Task X being anything they mentioned in their typical day that stood out)

Do not shortchange this opening section of questions! You don’t need a novel on their daily life, but you *do need* enough to be able to understand their role within their company, who key players are and a general baseline of their sophistication. All of this will help you later pattern match who the user type that is most receptive to the problem you’re solving and the solution you offer.

2) Problems – Aka – What are your greatest pains?

This section is where you try to find out whether the person has the problem you believe you’re solving.  Your goal is to not lead them to your problem. The less you lead them while still hearing your problem being mentioned the more validation you have!

Some sample questions you could ask:

  • What are your top 3 challenges you face in your job?
  • What are your top 3 challenges you face in your job related to [industry X]? (Industry X being the one your startup is in)
  • If you could wave a magic wand and instantly have a solution to any of those problems…what would the solution be?
  • Dig deeper into their typical day on anything that sounds painful or expensive. (You can add some hyperbole here to get them to rant a bit by saying things like “that sounds inefficient…” or “that sounds expensive…”)
  • How have you dealt with or solved [Problem X]? (You’re looking to find out if they’ve hacked a solution together themselves. If they have…ask for a copy of it!)

People love to talk about themselves, so let them go nuts here and really rant about their problems (i.e.- Shut up and listen!).  Generally, people are terrible at proposing solutions, but you want to hear generally what they envision as solutions or see what they’ve cobbled together themselves.

Notice, you haven’t mentioned your solution or problem yet. If they don’t mention your problem specifically, then as you finish this section of questioning, you should directly ask them if what you think is a problem is a problem for them. Whether they agree it’s a problem or not, you want to then probe why it wasn’t one of their top problems.

3) Your Solution – Aka – See if your idea survives customer interaction

If in your discussions in part 2 your problem you think you’re solving comes up naturally from your interviewee you’re on the right track! Bonus points if the way they describe solving it with their “magic wand” remotely resembles what you’re doing.

No matter what happens in part 2 you should discuss with them what you thought the problem was and what your solution is. Getting validation that they wouldn’t be interested in the idea is just as helpful as finding out they love it; either they’re not a customer or you are learning what your customers want instead of it.

Some sample questions you could ask:

  • Walk them through the problems you believe your solution solves. Do they agree?
  • Does [your solution] solve any of their problems?
  • Would you be willing to pay for our solution? How much? (Don’t be afraid to probe for the pricing you know you want…”Would [X] be reasonable?”)
  • If they’re willing to pay your price and like the idea then…”Would you be willing to start right away?”

If all goes well and you really are solving a pain, then your customer should want access to the product right away. More likely, you’re going to learn a ton about what they do and do not want and your idea will begin evolving.

This basic structure can carry you a long way towards some great validated learning about your idea and the market’s desire for it.

A few last things to remember:

1) Take Good Notes or Record Everything!

- Once you’ve interviewed 8-10 people, you should be going back over all of your notes and look for patterns. This includes especially looking for patterns in the Part 1 section to see what all the people that agree you are solving their problem have in common. You should summarize your notes then and share with your team.

2) Have other team members sit in on some interviews

- A good customer development focused company will have everyone involved in the process. Performable, pre-HubSpot acquisition, had their engineers spending 30% of their time on the phone with customers. Nothing helps someone do their job better like understanding who they’re building/selling/marketing for.

3) Be conversational

- It shouldn’t feel like an interview! They should feel like they’re just having a conversation with a friend about their problems at work. The more comfortable they feel with you, the more they will open up.

4) Go off script

- The best stuff comes when you dig a little deeper on something that strikes a chord in the discussion.  The script is there to be your roadmap, but there’s no reason you can’t return to it after a 5 minute digression about a specific pain or discovery about how the company operates.

5) If they’ve made an MVP…ask to see it!

- Nothing gives you more insight to a customer than what they’ve hacked together themselves to solve a problem. The best thing you can do is ask to see it, which will give you an idea of what they’re hoping a solution will provide. These people are also the strongest candidates to be great, helpful early adopters of your product.

6) Always follow up

- It’s just common courtesy to thank people for their time and help, but it also opens the door to follow up with them in the future if your product changes and is a fit for them or to invite them to your beta.

7) End with an ask

- Always end your interviews by thanking them and asking them for something. It may be to get a copy of their MVP or even better, ask for an intro to someone they know that might be interested in what you’re working on. In my experience, these intros have an 80-90% success rate in becoming new customer development interviews, whereas cold emails only have a 10% success rate.

8) Be open to new problems! That’s how great products are born.

- As Steve Blank has said, “No idea survives first interaction with a customer.” Don’t be afraid to shift your focus from your first idea to what you’re actually hearing customers want.  If you probe in part 2 and find a burning problem…find out how they currently solve it and what they’d pay to solve it.

In the end, you want to find a “hair on fire” problem, not a “nice to have problem.”  Think about it this way: If my hair is on fire (literally), and you’re selling buckets of water, I’m definitely going to buy your product. But if I’m cold and wet, I’m not likely to buy your bucket of water right now, but would consider it in the future.

Find customer pain and a solution they desire and will pay for. Rinse. Repeat.

What advice do you have for entrepreneurs doing customer development interviews?

————————————————————————————————————————–

Don’t build that feature! How to use the 5 Why’s to learn what your customer really is saying

This post originally appeared on Greenhorn Connect here; I’m housing posts on my blog here as well for easy reference.

Whether you interview customers regularly, watch support requests on HelpScout or use a GetSatisfaction or UserVoice – like tool, your startup is inundated with feature requests from your customers.  It’s great to have them engaging, but can lead to the dreaded “feature creep” that leads to a bloated, unusable product. What’s a startup to do? The answer may surprise you in its simplicity: use the 5 Why’s.

Don’t build that feature! How to use the 5 Why’s to learn what your customer really is saying

In case you’re not familiar, the concept of 5 Why’s is that by asking a person a series of “why” questions, you can get to the real root cause of an issue. Commonly, the issue can be used to do analysis of technical failures as outlined in a great post by Eric Ries found here. However, this can be just as powerful when you apply it to discussions with customers about features.  The power comes from saving you from building things customers actually don’t want or need and surfacing what is really important.

This concept really crystallized for me when I had an experience talking to Chris Keller, the founder of email reminder tool, Followup.cc. I was an active user, but Chris hadn’t decided how to monetize yet. I told him I’d pay for Followup if he provided a calendar to see all my Followup reminders.

There’s just one problem – despite the fact that Chris built that feature not long after our discussion, I’ve never used the calendar even though I am a paying customer because of the core product.

Chris could have avoided building the feature if he had used the 5 Why’s. Here’s how it may have gone.

Me: I’d pay for Followup if you provided a calendar to see all my Followup reminders.

WHY #1: Chris: Why would that make you pay for it?

Me: Because I could then see all the Reminders I’ve set up.

WHY #2: Chris: Why do you want to see all the reminders you’ve set up?

Me: So that I know when I have reminders coming up.

WHY #3: Chris: Why do you want to know when you have reminders coming up?

Me: So I’m sure I know when I should expect a bunch of reminders.

WHY #4: Chris: Why do you need to know when you should expect reminders?

Me: (long pause) …So I’m sure I get all my reminders.

WHY #5: Chris: Why wouldn’t you get all your reminders?

Me: Good question. I guess I’m worried about it not always working.

Chris: Don’t worry. I’ve built Followup to be robust and reliable. Are you sure you need that calendar?

Me: Maybe not.

Your results may vary, but the point is, customers are terrible at coming up with solutions. What they are good at is sharing their problems, which you can solve. The key is to interact with them in a methodical way to get to the heart of what they really need.  Next time you hear from a customer that you need to build a new feature…ask them the 5 Why’s first!

The Lean Product Life Cycle

See my previous post to understand how I got here. The hypothesis is that product development is messy except for the most disciplined. After talking to a number of great product people, I have a theory for how great product can be developed while being customer centric (aka lean).

The Virtuous Cycle of Lean Product Development

The Product Management Funnel

I think of product management as a funnel. At the top are all of the ideas your team generates. If you’re a lean startup, that’s hopefully driven by customer interviews, website and landing page behaviors and support interactions and of course the occasional green space wild idea.

As product manager, this is the most dangerous step. Once you have more than a few employees, it’s easy to have these ideas overflowing and interfering with the whole product process. Multiple teams I spoke with have been using their project management tools to capture these ideas which leads to a huge mess (one such company had over 4,000 stories in their icebox!) and a major time suck (one vp of engineering is spending an hour + each day managing these ideas).

The problem is project management != product management. The only thing that should be in your project management tool are key bugs to fix and what you’re building now or in the very near future (ie next sprint). Everything should be clearly defined and in a language and structure preferred by your engineers. All the evolution of the product from idea to customer validation to final prioritization should be done outside the project management tool.

The Rest of the Funnel

The Full Product Funnel

Going back to the beginning, you need discipline at the top of the funnel; the best product people I spoke with are requiring a shred of data tied to an idea to make it into their coveted ideas list. They also often expect a disciplined approach to what goes in by having people state, “Feature X will move Metric Y by Amount Z” so it’s clear why the feature needs added. In earlier stages that may be in a “Hypothesis vs. Metric to Invalidate” format instead.

The key of this step is effectively managing the signal to noise ratio; for every 5-10 ideas that come in, you may only make 1 or 2. Even the less disciplined product managers I spoke with have some type of hot-lukewarm-cold system for trying to rank ideas. To avoid the 4,000 stories in your icebox (or anywhere else) you have to be disciplined on dropping stale ideas and focusing on what matters now. When you’re a growing startup, where you were 3 months ago is dramatically different from where you are now so why keep those stories cluttering your system now?

After wrangling the initial feeder of ideas under control, you need to effectively refine the ideas that make it into your system and allow the most important ones to rise to the top of your list. As planning for your next sprint begins, you need to prioritize these ideas and balance with other existing projects, bugs and other demands.

Once you’ve settled on what you’re going to have engineering build next, you need to engage your team on the ideas you want to implement; you may need copy from marketing, stories from support to describe customer complaints, links or screenshots from analytics to show present activity and relevant customer development notes. All of this feeds into the project management tool you have, but now it’s uncluttered and your engineers are much happier and efficient. Unless you’re github or heroku, chances are your engineers don’t understand the customer they’re building for perfectly so all this structure makes it easier for them to see what’s going on and then adapt it to fit the project management tool they’re using to track building.

As an added bonus, there’s transparency for your other employees as they engage in more than just the initial ideation process. It also means sprint planning no longer needs to have all hands at it as they’re already well aware of what’s going on and have had opportunities to contribute as needed to the stories now being generated in the project management tool.

Completing the Virtuous Cycle

We all know this image so well as the core of what lean startups is all about, but how often is this cycle cleanly implemented? The project management tools out today all do a great job on the build aspect, but what about measure and learn?

The funnel process I described above captures the learn aspect as you engage your team for ideas and validation. All that’s left now is to measure.

After you build something new in your project management tool, your engineers will submit it for some form of approval. Once approved, it universally ends up disappearing into the ether, because the project management tool is built to track what you are building or about to build. After building isn’t part of their process.

To close the lean loop, you need to look back and see if that feature actually moved the needle. This needs to happen within 2-4 weeks of building it; sooner wouldn’t be enough data and longer would be distorted due to other things you’ve likely built by then. This last step of learning should help you refine your instincts and feed back into what you build. This is one of the biggest challenges as Eric discusses his principle of Innovation Accounting in his book.

The amazing thing I discovered in so many of my interviews was how rare it was to do this measure step; how can you improve your accuracy without seeing if you hit the target?

The Product – Lean Opportunity

What started as an investigation of lean startup opportunities has broadened to helping teams close the loop in managing a product lifecycle. I believe there is tremendous opportunity to build a platform to aide on both sides of the project management tool and much wider than those adopting lean concepts officially (as we all know, being customer centric is not a new concept).

 

Using Customer Development on the Customer Development Process

Earlier in November, I started out on a journey to see if there was an opportunity to build a product that would help companies in being a lean startup. The thought was that with Eric Ries’s book flying off the shelves and the lean startup community exploding, there would be new problems to be solved. Thanks to a nudge from Sim Simeonov and a few consulting opportunities brought my way, I felt like there was definitely something there. Like any startup, once I got outside the building, I learned some harsh realities:

1) Most people only pay lip service to lean.

Painful, but true. In both casual conversations in our community and full blown custdev interviews I found the full spectrum from strict implementers like John Prendergast and Matt Mamet (coincidentally co organizers of the local Lean Startup Circle Boston) to people who claim to be lean and think it has anything to do with how little money they spend (names withheld to protect the innocent).

2) Lean is a hands on activity.

The key to lean really is the human interaction; knowing when to ask an interviewee “tell me more” or deciding what analytics to deep dive to match up against your anecdotal discussions can’t be productized directly. It’s also risky to outsource since it’s so core to the future of your business; no amount of meetings, notes and summaries can compare to being there and doing it yourself. There’s huge opportunities to teach companies how to become lean, but I’m passionate about building a product, not a services business and I’m not sure most companies are ready to invest in lean (see 1).

3) Small startups are more likely to be lean and less likely to need process.

Part of the challenge of the adoption curve of lean is that it has most strongly permeated the zero stage entrepreneurs; they’re the ones with time and motivation to watch the videos, read the books and stay up on all the blogs (which has come a long way in the last year or two since all we had was the Four Steps to the Epiphany to go on).

Unfortunately, those people have little to no budget and because of only having a few people on their team, there isn’t much of a need for tools. Everything can be done ad hoc when you’re that small. The most common behavior when you have 5 or less people is to remove your headphones during the work day and share your findings immediately with everyone on your team.  This is effective until you grow to the point that everyone doesn’t know everything that everyone is doing (usually around 8-15 people).

So all that meant to me was time to pivot:

I’ve known all along that customer development feeds into product management. Fittingly, this is where I did find pain:

  • Managing product while being a growing, lean startup requires significant discipline. Not all companies have product leaders with this strength.
  • Many companies build up product management debt as they grow and fail to adapt to the demands of a team that passes the “take off your headphones and talk” phase.
  • Multiple challenges arise in engaging all members of a company at the right times in the right way.

My next post explains what I’ve found. Read on to see the big picture potential for a lean focused product life cycle.

Continuous Deployment: Possibility or Pipe Dream?

For those in the Lean Startup world, the utopian version of product development is continuous deployment.  It means every engineer is deploying code multiple times a day, often even on someone’s first day of work.  It’s also exceptionally test driven, reducing risks of bugs taking down the entire system.  While many startups aspire to this, few have succeeded, which is why it was so exciting to have Brett Durrett of IMVU come and speak to the Lean Startup Circle Boston Thursday night.  Brett is VP of Engineering at IMVU, which coincidentally happens to be Lean Startup Guru, Eric Ries’s startup he spent many years helping build before becoming the movement’s biggest evangelist.

{Note: Brett’s presentation was awesome but hasn’t been posted yet. I’m embedding his Lean LA version as a reference until it can be posted.}

Continuous Deployment at Lean LA

View more presentations from Brett Durrett

In a nutshell, continuous deployment breaks down into 3 steps:

  1. Develop a feature
  2. Test it
  3. Deploy it

But why would you do continuous deployment?

The reason for using continuous deployment hits the core of lean startups: more iterations. Whether funded or bootstrapped, there’s a limited amount of time to iterate and nothing speeds iteration like getting new features, site tweaks and updates out faster. Continuous deployment forces you to break down all your features into bite size chunks which can save you building massive features when you can confirm it with much smaller steps. It also minimizes version control issues if no one is working on a long term project based on old code.

It also makes your engineers more efficient. Is it easier to find the problem with freshly deployed code that has 10,000 lines in it or 10 lines? Is it easier to get engineers up to speed on a system that expects them to write a micro feature or build a major piece of the system?  If everyone writes their own test code, you have greater accountability across the entire engineering team (you have to fix what you break) and you don’t have to hire a QA team stuck cleaning up everyone else’s mess.

The Continuous Deployment Process for Engineers at IMVU

After convincing us why it matters, Brett walked us through the process for an IMVU engineer.  Once an engineer has finished building their bite size feature, they walk through all of the following in less than 15 minutes!

1) Engineer runs the test in their sandbox.

To keep from clogging the deployment and testing systems everyone shares, engineers first run some basic PHP tests on their own system to ensure the code is ready.  (Note: they don’t do branches in the repository; the brand in the code instead.)

2) Engineer runs testing on main system

After passing the tests on their computers, they enter the queue for the main testing system for all over IMVU called Buildbot. They have tons of tests so you tag your code based on what parts of the system it affects and what it’s for. This optimizes the right tests to run and which can be avoided. (Running every test would take over 8 hours.)

On average, it takes about 8 minutes to run all the tests needed.  They’ve achieved this speed because they have 40-50 instances running just for testing.  They’ve also discovered that 12 minutes or less is the optimal time to have testing take and keep your engineers happy.

The most common slip at this stage is a missing tag, which means a needed test isn’t run.

3A) If all tests pass, the engineer now deploys the code. 

3B) If any of the tests fail, the engineer reverses their commit.

With the rate the whole team is deploying and testing, their’s no time to have people fixing while they’re in the system. Therefore, regardless of the issue, the engineer will reverse their commit and go back to fixing the problem on their machine and starting the test and deploy process from the beginning.

4) Deployment occurs in pieces

Currently, IMVU (with over 50 Million registered members) has 800 servers in use.  When they deploy new code, it starts out on just 35 servers. This ensures that if something goes wrong, it doesn’t take the entire site down.

5) Testing continues after deployment thanks to the Cluster Immune System

Even after deployment, they’re still testing, just in a different fashion. They’ve developed their own tool called the “Cluster Immune System” which monitors key site (speed, system performance, etc) and customer metrics (revenue, registrations, etc) to make sure there hasn’t been a dramatic change.  Even the best tests won’t notice an engineer accidentally made a blue button on a blue page; the tests will see the button is still there and works, but won’t realize a user can’t see the critical sign up button.

This system runs on those 35 servers they use as a live test bed. If anything goes wrong there, they prevent it from deploying to the rest of the system. If not, it’s deployed system wide to all 800 servers.

An audience member asked about “what if you don’t have massive traffic you can segment to test a new deploy?” Brett said it’s an advantage when you’re bigger, but until then, you may just run at Cluster Immune System to monitor a system-wide deploy.

The best news of all of this?  IMVU plans to open source the Cluster Immune System (CIS) soon.

6) If all CIS testing is passed, deploy to all servers, but continue monitoring

Even after deploying to all servers, they still monitor for anything unexpected. If they see anything alarming, they’ll roll back and remove the feature.

This entire process takes only 10-12 minutes.  Only one engineer can be in the Buildbot testing phase at a time, but as soon as you enter deployment (step 4, above) someone else can enter buildbot.

This process sounds great, right? But it seems so sophisticated…how do you get started? Brett covered that too..

Getting Started – How do you actually do this?!?

Getting started is a different process depending on if you’re an established company or just an infant startup with limited traffic, but either way, there’s great ways to get started:

  1. If you’re a small startup - Start with a sandbox for each of your engineers and just focus on pushing code quickly and in small chunks.  You can develop your testing as things break; that’s how IMVU built their system.
  2. If you’re an established company - Start with production (ie- the last step before deploying code) and automate that process. Start building tests for whether something should be deployed or not.  Work to get the automated tests as good as the human part of the process. Once you’ve accomplished this, keep working backward to continue to remove humans from the deployment flow.  At first, you should err on the side of preventing problems then clean up your tests to be efficient.

Whether big or small, the same key rule applies: Anything can break once. Then you have to make it so the same thing can’t happen again by writing a test for your mistake. This builds both accountability and builds only the tests you really need…one step at a time.

Pitfalls

Like any system, this isn’t perfect. There are challenges both with getting personnel buy in and in scaling this:

1) Philosophy- Blameless systems

It’s not “Ned broke this!” it’s “How did we let that fail get through our system.”  Brett really emphasized this important difference. It’s a philosophical buy in required to really make this work best.

At IMVU, they hold regular “Blameless Post Mortems” to discuss issues that slipped through.

2) Optimize your testing

As you grow, more tests will be required. You should optimize for which tests actually need to be run for a specific line of code (as they did with tagging) and purchase sufficient hardward to make tests fast. IMVU also found they could save a tremendous amount of time simply by optimizing the order the tests run, by running the slower ones first (a 22% time saving).  They also then built in dependency in the testing (ie- if Test B requires you pass Test A to work…make sure Test B runs second).  Finally, sandbox testing of high level issues kept a lot of code from entering their “1 engineer at a time” test system by having everyone be able to test it on their own machines first.

3) Outsourcing doesn’t work well

This sort of system requires a cultural buy in that IMVU found couldn’t be instilled well remotely. It also proved difficult to manage the testing system whenever some engineers were in a different time zone.

4) Complex fails are harder to find

Brett still occasionally finds issues don’t fail during the work day…and being VP of engineering it means he gets the 3am calls about such issues.  They also struggle with MySQL and memcached issues, which has led to separate systems being developed to deal with them.

The key principle in all of this is that continuous deployment is a constantly evolving system. It is not perfect. However, taking it one step at a time will help you build a formidable engineering process that allows your company to move faster than you ever thought possible.

Ready to try to bring continuous deployment to your startup?