Give Yourself Constraints
Recently, I had a hernia and surgery to fix it. This knocked me out of the game and onto the couch for a couple weeks. During my recovery, I had a lot of time to think. I also had a lot of time to miss what I do every day.
This was the longest period in several years for me without creating. Once I felt good enough to get back at it, even if only for a few hours, I decided to focus all this pent up energy on something new.
What I wanted to do, was to think through a problem different than I ever have. I have been creating applications pretty much the same way for quite some time. Sure, MongoDB changed my methods a bit, but I knew I had not used it to its full potential, as I typically start all new Mongo projects with MongoMapper.
What to Build
First, I thought about what to build. I have a plethora of “someday” ideas that have never made it out of that stage. One of those ideas was to build a simple analytics program.
Sure, there are a crap ton of analytics apps out there, including Google Analytics, but not a one thus far has hit the sweet spot I am looking for.
The Old Constraint
Back in the day, I would entertain every whim I had. This is great for learning a lot of new things, but I never really focused and finished anything. What I had was a project directory full of half (or less) finished ideas.
When I actually forced myself to work on only a project or two (I chose MongoMapper and Harmony), I noticed that I actually finished things and had something to show for myself.
Important: The constraint of what I could work on made me more productive than working on whatever I was inspired to work on.
That said, rules are made to be broken, right? Plus, this new project was not entirely misguided. Harmony manages websites. Websites need analytics. There is definitely a benefit to Harmony in building an analytics system that can be deeply integrated, so I began work.
The New Constraints
Since I was bending the rules a bit, I decided to give myself different constraints this time. Rather than what I would work on, I focused on what tools I could use to do the work. The thought was that forcing myself to avoid my comfort tools would lead to thinking outside of my usual box.
The first constraint I made was that I could only use the Mongo Ruby driver. No ActiveRecord, MongoMapper or any other object mapper.
Second, no aggregate querying for reports. All of the analytics had to be built on the fly as each hit came in. I told myself I could not even store the individual hit data that was generated each time a page was tracked.
Third, no signup or authentication. I wanted to focus on the core functionality (tracking views) instead of spending my time authenticating users and all that crap.
Fourth, I cannot remember, so lets move on.
Within a few hours, using Sinatra and the MongoDB Ruby driver, I had a little prototype working. Each hit was a single MongoDB operation, an upsert based on the host, with year, month, day, and hour information stored in nested hashes. The nested hashes were updated in the operation using $inc. It did not do much, but it was pretty cool.
I am aware, especially now, how simple that first prototype was, but it felt great to create again. Next, I threw the app up on Heroku and MongoHQ, so I could try it out tracking this site you are reading.
Both are free to try, so it cost me nothing to get something up that I and others could react to. I showed it to the rest of the Ordered List team and every one shared the excitement.
I am amazed at what we have come up with in such a short amount of time (4 weeks using occasional evenings/weekends). In fact, the constraint of time is why Gauges is where it is today. We were really productive in the hours we snatched to work on it, because they were few and far between.
Steve came up with a great name, found a matching domain (which is a miracle these days) and Gaug.es was born.
Note: Holy crap did Steve (@orderedlist on Twitter) knock the design out of the park. Dude has skills!
The last 4 weeks working on Gauges has made me feel, at times, like a kid again. It is almost like we were racing to the next fence post (sue me, I grew up on a farm). Sure, I broke the original constraints I set, but without them, I would never have started.
I actually stuck with constraint number two. All of the tracking code uses upserts with MongoDB modifiers to create and update reports on the fly.
Constraint number three also fell to the wayside. You cannot very well make money on a service that requires no signup (or at least it is increasingly difficult), so you do in fact have to sign up and in to use Gauges. That said, right now we are just testing things out, so we are controlling things with a code.
Whether it be the tools that you use, the projects that you work on, or the people you work with, give yourself constraints. Create something that you have always wanted. Get other people excited about it. Work cannot always be “work”.
P.S. If Gauges is something you are interested in and you would like to be an early tester, let me know. The main goals right now are hosted (no setup/servers), easy sharing with other people, how much traffic, where was it from and where was it to.
Plus, we have a few great ideas for down the road, once we get the basics ironed out. Thus far, Gauges is really scratching an itch I have had for a while and I am stoked.