Thoughts on HackerRank
2 min read

Thoughts on HackerRank

Lately I've been killing time on HackerRank. What is HackerRank? I will lazily quote their About Us page:

We rank programmers based on their coding skills, helping companies source great programmers and reduce the time to hire.

The HackerRank platform is the destination for the best engineers to hone their skills and companies to find top engineers.

I started by looking at their "30 Days of Code" tutorial section. It seemed trivial at first but also fast to jump into. What better way to check out the site than by doing a very simple exercise with almost no effort or time required on my part?

The editor was lovely and I was able to select Javascript from one of the available languages. The first "challenge" was easy as pie and I found myself returning the next days out of curiosity. And then... it happened! What happened you ask? Well, just the unavoidable: a bug!

Nowadays the Javascript debugging landscape looks great, Chrome's web inspector offers a plethora of options and the console is a web developer's best friend. We're almost spoiled, I could say. But such tools were nowhere to be found inside the Hacker Rank editor. All you had was a measly process.stdout.write() method which printed a string or a number in a small output div.

sample of HackerRank results page

I found myself somewhat challenged for first time while doing that beginner tutorial. I managed to find the bug quickly (it was caused, of course, by my lack of focus) and I continued with the exercises.

By this time, they were becoming rather fun. The gamification concept was shamefully addicting and solving the basic problems was like taking candy from a baby for a programmer with my experience. And then it happened again! I was... challenged!

The hourglass problem looked interesting and didactic. It had a catch and required a bit more than basic knowledge about arrays. I wrote a quick solution, passed the basic test, clicked submit, waited for the results and... gasp! Two of the test cases failed!

Looking at the input data required me to pay some 5 hackos. I had no idea what that meant but I wasn't going to do it. I had something better: experience.

It was both challenging and fun to look at my methods and try to figure what exactly was wrong with them and it was waaaay less frustrating than hearing the client saying it has a problem without specifying what happens exactly, the browser version used or providing a print screen. I guess you could say this approach of not looking at Hacker Rank test cases can help one experience the "delight"of real life debugging.

In the end, the experience was humbling. There are other so-called domains on Hacker Rank, covering various topics, like Mathematics, Regular Expressions or Artificial Intelligence, following the same approach of gradually introducing new notions. I am particularly interested by the Regex sections and the Data Structures where I'm either rusty or I skipped trough some steps and missed some basic notions while jumping straight to complex ones.

I'd say every programmer should give it a try. The challenges are not very time-consuming, can be fun and it's a more productive way of killing time when bored or tired than browsing Reddit or Facebook.