Follow the Mario Principle

If you want people to use your .NET project or any open source project for that matter, you must follow the Mario principle. Do you recall the first time you played Mario? If you are like me, then you can still here the music in your head and you could map out most of the first level. Anyone can pick up Mario and start playing. You learn most of the games mechanics on the first screen but you don't learn how they apply and or how to master them until you have played for quite some time. Test driving a software project has to be dead simple to get going if you want adoption. It must be easy to pickup and the learning curve must never be too large to move to the next level of mastery. I could of called this the Pacman principle or the Donkey Kong principle and it is one of the core principles behind every video game made by Shigeru Miyamoto.

NHibernate, a very popular ORM, suffered from not following the Mario principle early on. It was hard to get going with it. Search for NHibernate on Google and your first choice is an old website and not the real NHibernate website, NHForge. The xml table to entity mappings aren't easy to write by hand and were the only initial option. Many of the keywords were borrowed from Java and that was confusing as the Java borrowed nomenclature blows. I still get confused about whether I want the Inverse relationship to be set to true or false in a mapping. Back in 2008 you had to scour blogs to find out how to do advanced scenarios. NHibernate's documentation has come along way and the project is far more organized now. Looking back, had it been easier to get started with NHibernate in say 2008, how many thousands or tens of thousands of developers would be using it today.

Let's take one of the most successful open source projects to date, jQuery! jQuery is a rock star open source project. 20% of the top million websites use jQuery. jQuery is used by over 19 million websites according to built With. One key component to jQuery's success is how easy it is to start using. You go to the website and you immediately see the Download link and you can even run some jQuery code by clicking the Run Code button. There are tons of tutorials and links to books. jQuery, being simply a single text file and the very nature of javascript, makes it inherently simple to pickup and start using but they did follow the Mario principle.

Even complex .NET projects can follow the Mario principle. It's 9:31PM and I'm going to the RavenDB.NET website. Tick Tock... It's 9:35PM and I downloaded RavenDB, unzipped it, started the server, browsed to a local website at port 8080, created a document, and saw the document persisted in my browser. Phew! This took all of 4 minutes! I ran into 2 small issues though where the Mario principle wasn't completely followed. You cannot download RavenDB from the main page and instead you have to click on the Download link in the menu bar. Minus 1 point! After unzipping the file I opened the readme. The comment, ...You can start the Raven Service by executing /server/raven.server.exe, you can then visit http://localhost:8080 for looking at the UI.“ is at the end of the README file. The README file is only a page so I'm deducting half a point for not having this at the top of the page. In short though, you can get up and running with a very complex piece of development software, as compared to jQuery being a single text file, in under 5 minutes!

Follow the Mario principle when you create software to be used by others… The principle of making the learning curve less steep in the beginning isn't anything ground breaking but it's surprising how often this principle isn't followed. Your goal with open source software is to get adoption. Make sure someone can hit the ground running and pick up the more advanced principles later with your software project, whether it's open source or just used internally. WCF is the best example of a great technology whose adoption was slow because it was so difficult to get up and running with. Many aspects of this are dramatically changed because of NuGet which I will delve into soon.