New Relic Ruby Kata

Code Kata is a term coined by Dave Thomas, co-author of the book The Pragmatic Programmer in a nod to the Japanese concept of kata in the martial arts. A code kata is an exercise in programming which helps a programmer hone their skills through practice and repetition.

The goal of this Kata is to get your mind wired into performance driven development, to reinforce your skills as a user of New Relic and to help you get more familiar with Heroku.

Of course the code in some areas of this application is intentionally bad, but what fun would this be if everything worked the way it should?

Learn more about Code Katas »

Step 1

Get the code. Using your github account, fork the newrelic/newrelic-ruby-kata repo and then clone it onto your machine.

Fork & Clone! »

Step 2

Create a Heroku app. Using your heroku account, create a new app and then push the kata code to it. (Use the Heroku toolbelt.)

heroku apps:create
git push heroku master

Create & Push! »

Step 3

Add New Relic to your Heroku app. The New Relic agent will help you find and solve the performance issues in this application as well as help you see the complete impact of your changes.

heroku addons:add newrelic:stark

Step 4

Populate the sample database and setup memcache.

heroku addons:add heroku-postgresql:dev
heroku addons:add pgbackups:plus
heroku addons:add memcachier
heroku pgbackups:restore DATABASE ''

Step 5

Fix the code / Solve as many of the Katas as you can. There are seven distinct Katas in this application that can be torn apart and fixed by using your awesome dev abilities and the deep metrics that New Relic provides.

  1. Generate traffic a.k.a. click around
  2. Discover a slow page
  3. Investigate the problem (using New Relic)
  4. Resolve with code changes
  5. Push the revised code to Heroku.

Step 6

Let us know how you did, what you liked or disliked, what helped you find problems or what were the challenges, what you like about New Relic and what you don't - we just want to hear from you and see what we can do to get better.

We'll even send you something for demonstrating your geek super powers when you complete the Kata - just provide us with your thoughts and a link to your forked repo (with your answers).

Tell us! »