Why You Should Open-Source Your Startup

Why You Should Open-Source Your Startup

When we open-sourced everything a month ago, we were nervous. What if no one contributes?, we worried. We had spent a week writing documentation, automating the developer setup, filing easy issues, paring down the repository, and preparing licenses. We wanted to demonstrate that open source should be the default choice for many startups and games, but if we failed, then we would have done the opposite.

We needn't have worried. The CodeCombat Archmages swarmed the GitHub gates, breached the dev setup bug barricade, and presented a plethora of pull requests. Here are the first month stats:

  • 2275 stars
  • 537 forks
  • 223 watchers
  • 50 contributors
  • 711 commits
  • 139 pull requests
  • #1 trending repo on GitHub for the day we launched
  • #6 trending repo over the first month

"Okay, sure, that's a lot of contributors, but are they really helping? Those pull requests are probably tiny changes like centering some div. I bet the CodeCombat team is still doing almost all the real work and the open source thing is just for show."

Not convinced by a list of numbers? Good; I wouldn't be, either. Let's dig in and see how much the Archmages have really contributed. Here are the top five open source contributors with links to their commits:

  • GlenDC vastly upgraded our i18n tags, fixed numerous bugs, did some much-needed refactorings, upgraded and automated our Windows dev environment, and started helping out with issues and pull requests.
  • smoratinos fixed all of our server tests, added new tests, reorganized all of the server modules, and performed several refactorings.
  • TomSteinbrecher upgraded us from Bootstrap 2 to Bootstrap 3, made all our items bob, added contribute pages for each character class, and fixed several bugs.
  • devast8a has found, patched, and added tests for two transpiler security vulnerabilities that even I could barely follow.
  • deepak1556 is almost done adding CoffeeScript support to our transpiler, and has also updated our Karma config.

After that, there is a long tail of contributors who each contributed minor bugfixes and features. We've also been able to move our i18n process from a Google spreadsheet to GitHub, which immediately launched us from 17 languages to 32 with the help of a squad of Diplomats.

Many of the pull request contributions are tiny, because they come from newcomers either to open source or to programming in general. We probably lost net time on a few of them, but that's okay. It's our mission to teach the world to code, and part of that is spending time helping beginners learn how to be effective in a large project. Overall, if we haven't yet made back the time we've spent preparing and coordinating CodeCombat as an open source project, I'd say we're getting close–and it's only the first month.

"Yeah, all right, you can make open source work because you're a programming game, but what about if you're not CodeCombat? No one will care if the project isn't something sexy like a game."

Just for fun, because LightTable is another startup who open-sourced everything (the day after we did), I thought I'd compare their contribution numbers: 4858 stars, 393 forks, 389 watchers, 32 contributors, 194 commits, 48 pull requests, #1 trending GitHub repo for their launch day and week and #2 for the month.

Now, LightTable's commits tend to be bigger and fewer than ours, but if you look at the contributor numbers (excluding some of ours which are coming from Diplomats doing i18n), then you can see that they've had results similar to ours, if not better.

"Really, LightTable? LightTable is even sexier than CodeCombat; look at all that Clojure. Doesn't count. What about some legacy PHP codebase?"

Okay, okay. I don't have any ready examples of startups or games who open-sourced everything–who really welcomed contributors, not who just put some code out there–and failed to attract a developer community. Most startups, especially those whose users aren't developers, don't even think about open-sourcing. I know of one non-profit in our Y Combinator batch, though, who is considering going open source: Zidisha, a peer-to-peer microlending platform.

The founder, Julia, has amassed a lot of PHP from a firm in India and is now relying on volunteers to help her clean it up and improve the site. The code isn't great, and it's neither sexy nor used directly by developers, but it's a great cause and should make for a great open source project to contribute to. Several CodeCombat Archmages and Gridmancer players are already lending a hand. Microlending is just about the best way to fight poverty, so if you're looking to make a difference with your code, let us know and let's get you involved.

"I wish you luck, but I still don't want to open-source my startup. There have to be reasons why most people keep their source closed."

Before we open-sourced, we asked everyone why we might not want to open-source. Advisors were okay with it, but thought game developers might have reasons why we shouldn't. Game developers liked the idea, but were concerned it would scare investors. Investors were excited about it, but wondered what lawyers might think. Lawyers didn't see any problems and just told us to run it by our advisors. You can see the pattern here: there's no real reason to keep it closed, but everyone assumes there is. (It's kind of like how no one personally had a problem with the cartoon blood the game used to have, but everyone had a proxy concern that teachers / students / parents / kids / girls wouldn't like it.)

Commenters on Hacker News and reddit supported it, but were cynical that either we'd actually do it or that the overhead of managing an open source project would outweigh the benefits. Some were nervous that other game studies would clone CodeCombat and compete with us, but others countered with reassurances about the value of the brand and community and with that old quote:

Don't worry about people stealing your ideas. If your ideas are any good, you'll have to ram them down people's throats

Now, your particular project may have a good reason why it needs to be closed source. It might even have some strong indicators that no one would care if you open-sourced it–maybe your users and audience are all non-technical. I'm not saying that everything should be open source, just that everyone should at least consider it.

"I guess we could go open source, but I'm still not convinced."

If you've ever had to hire, consider that a work-sample test is by far the best way to screen candidates. CodeCombat already knows who to hire to hack on CodeCombat (hint: their GitHub usernames are on this page). Furthermore, programmers prefer to work on open source, not just because it's cool, but also because they can show off their work.

Not hiring? Well, do you use web services? Many of them, like GitHub, Balsamiq, and Travis CI, are free for open source projects. We're thinking of running an open source challenge to add new programming languages to the CodeCombat transpiler on ChallengePost–normally $1500/mo, but also free for open source. And although we may be too young to get in, we're applying to Google Summer of Code to fund student developers to hack on CodeCombat summer projects.

Everyone wants open source projects to succeed, because the world benefits. Get everyone cheering for you. Do you think our last four blog posts got tens of thousands of views each because A) our blog has great SEO, B) I'm a great writer, C) the internet is fascinated by K-12 education, programming challenges, GitHub, and rectilinear dissection algorithm, or D) people like what CodeCombat is doing and tend to upvote it on Hacker News and reddit? ... It's D. By the way, the biggest blog post hit came from open-sourcing (64K), three times bigger than the post where we got into Y Combinator on stage (21K).

You don't have to open-source, but at least think about it. Everyone goes closed source by default, but we believe the convention should be reversed.

Disclaimer: although I have no beard and don't run Linux, I still may be overly biased in thinking open source is cool. When I was a kid, my dad started MisterHouse, an open-source home automation platform which grew to 400 contributors and let random people on the internet do things like chat with ELIZA over the house intercom and turn on our dishwasher. I didn't give programming a second thought back then, but now I'm proud to continue the open source tradition.

Thank You, CodeCombat Archmages

As a token of our appreciation to our wonderful open source contributors, we've started making illustrated avatars for everyone who makes a significant contribution to our GitHub. Here's the first batch. We'll be in touch with high res versions you can use as profile pictures.

Thanks for reading another long post. Have fun playing CodeCombat, and check the /contribute page if you want to help out.

Follow this blog for news on our upcoming head-to-head multiplayer challenge.

Nick Winter

Nick Winter

San Francisco