37signals did when they released ta-da list back in 2005. You read that right, not 60K or 600K but instead a commercial project in <600 lines of Ruby code. When I first saw this number I was incredulous – I’ve written stored procedures that are longer than that. My current project has more lines of configuration (and maybe even more configuration files..OK, maybe not) than that number. I’ve even written console apps in notepad, and compiled from the command line with more lines than that, because I thought they were so small they didn’t need a whole .sln and .proj file, and yet here are 37signals going live with a product that is just 579 lines of Ruby.
They had a number of things in their favour, which presumably allowed them to do this:
- They wrote the rails framework, and thus presumably knew how to get the most out of it. The equivalent in the .NET world would be Scott Guthrie and Nikhil Kothari getting together to write an ASP.NET task tracking application.
- They situated their product squarely in terms of the solution technology domain. They didn’t need (or more likely chose not to use) any custom widgets. Spitting out simple HTML is not hard. Building large and complicated controls that have to maintain state between requests, render differently on different browsers and handle complex validation is.
- This number is just the Ruby code, not the associated CSS, JS etc.
Even considering these caveats, I think this is still an amazing accomplishment, which takes minimalism in “production” code to a whole new level. This got me thinking – I have a few interesting product ideas from time-to-time. What is the absolute minimum amount of code I could write that would make that work? If I’m prepared to operate within the constraints of the platform (whatever that is) how much effort would that save me? How many more “interesting ideas” could I turn into working products if I was prepared to follow these constraints? How many more cool/useful things could you build if you promised yourself that each one would only be 600 lines of code?