A Tour of Exercism

Systemutveckling Programmering Technology

Uzi Landsmann

Systemutvecklare

The best way to get better at something is to teach it to others

 

Attention: this article was written when Exercism was in version 2. Now that version 3 is released, this information is no longer accurate. Have a look at the fabulous new version of Exercism to learn more about it.


This is the first of two articles about Exercism written by Uzi Landsmann. This article will give an introduction to the platform and to solving some exercises and getting mentor help. The other article will discuss being a mentor yourself, and how much you can learn by helping others.


Exer-what?

Exercism sure sounds like an old horror movie with Max von Sydow but it’s actually something completely different:

 

“Exercism is an online platform designed to help you improve your coding skills through practice and mentorship”

 

…as it says in Exercism’s about page. It’s a platform that helps you learn new programming languages and improve your skills in those that you already know. Every track in Exercism contains many exercises in an increasing difficulty level. Solving these will help you grasp different concepts in the language you are trying to learn, and the best part is that you can get help from skilled mentors while solving these exercises. Learning and mentoring is what Exercism is all about.

 

Gimme one good reason!

Most people have less spare time than they wish they had. Work, family, school and the gym – they all compete on your precious time. So why should you spend time solving an endless number of exercises using this platform? I don’t know. Perhaps you shouldn’t. All I can do is tell you why I do it, and maybe you’d find yourself relating to my story.


The simple truth is that I like learning new stuff and trying new tools. I guess I simply get tired of doing the same thing over and over again. Somehow the creativity, that is (for me) the most important part of software development, fades away after you’ve developed your hundredth REST service using the same tools. So I started looking for online courses and found a lot! Most of them involve listening to some guru telling you how stuff work and then giving you some exercises to check if you have been paying attention. Well here’s where my lack of patience strikes again – I guess I’m not so good at paying attention. I like to develop, not to listen to others who know better. I feel that the phrase “learning by doing” is what it is all about for me.


And then I found Exercism. Can’t really remember how – a friend told me or I found it in some boring moment of leisure surfing at work – but I soon realized that I found a home. There’s simply so much to learn here! So many new languages and exercises, ordered in such a way that you can easily start off learning a new language almost without any prior knowledge. Step-by-step you learn new concepts and discover how things work in that particular language. And the help you get from the mentors is priceless. Sure, you can google a solution to a particular problem or ask a question at Stack Overflow, but the personal help you get from a mentor here is something else altogether. So much so that I’ve decided I’d like to give back to the community and became a mentor myself.


If you’ve been reading so far, perhaps I’ve caught your attention and you’re ready to take a look at what this is all about. Let me tell you a bit about Exercism’s amazing amount of different language tracks and exercises.

 

Tracks

When you first enter the Exercism site you get hit with a mind-blowing list of forty eight different tracks you can choose from. Every track teaches you a different programming language. Some of which you might already be using in you day-to-day programming job, others – maybe you’d like to learn, and some of them (if you’re like me), you’ve never even heard of. So pick up an obscure language you always wanted to learn and let’s take a look at the exercises.

Bild på tracks

 

Exercises

Once you’ve gone through the registration procedure, chosen a track to join, read through the about page and pressed the join the track button, you’ll be presented with a pop-up that will encourage you to choose between a mentored mode and an independent mode. I would strongly recommend you to choose the first mode, because getting skilled mentored comments on your solutions really gives you a lot of help and inspiration. Choosing this mode, however, might slightly reduce your learning progress speed because, well, people submit a lot of solutions every day, and there is a limited number of mentors who may spend some of their spare time mentoring those solutions (why do they do that? More on that later). However you can easily switch between these modes later on, if you wish to. So choose a mode and lets go forward.

 


You will now see a list of exercises, of which the first one is, you knew it before you’ve seen it, the Hello World exercise. This one is for you to get to know the environment, learn how to download and submit an exercise using the CLI, and how to publish your completed solution. On the left side of the page you can see the list of exercises you can attempt solving. These are divided into core exercises and side exercises. Core exercises are ordered in an increasing difficulty level and are to be solved in vertical order. Once you’ve published a solution to a core exercise, the next one will be available for you, as well as a bunch of side exercises that you’ve unlocked. Side exercises are a great way to practice more of your programming skills in a given area (such as algorithms, arrays, bitwise operations etc.) which are relevant to the core exercises you’ve just published. The biggest difference between core and side exercises, though, is that only core exercises are being mentored. You can still ask for a side exercise solution to be mentored, if you’d like some feedback on your code, but you can only ask for a limited number of these, mainly in order to decrease the pressure on the mentors.

 

 

On the right side you will see an overview of your progress: how many side exercises you’ve solved and how much of every area you’ve covered. Currently, you’re on 0% and no progress at all! Let’s change that by solving the first exercise, Hello World.

 

Hello World

Clicking on the Hello World exercise takes you to a new page with information about the first exercise. But before downloading it, you have to install the CLI using these instructions. Once you’re done, copy the download command and run it in a terminal, then open the downloaded directory in an editor of your choice.

 

 

Looking in the editor (depending on the chosen track it might look differently) I can see a directory structure containing (among other slightly less interesting files) a file where the implementation should be done and a test file which tests my implementation. Running the tests will obviously give you a thumb-down failed result, and your mission is now to make the tests happy and green.



Once you’ve accomplished this not-too-complicated task, copy the submit command, replacing the path placeholder with the real path to your implementation file, and submit your solution.


Once done, you can follow the link given to you in terminal to see your solution in place. As it says in the solution page, you would now normally wait for a mentor to approve or comment your solution, but since this is just a simple hello world exercise, you can simply complete the solution and move on to the next one. Click the Complete Solution button and follow the pop-ups to the next exercise. You will now be informed that you’ve unlocked the next exercise in the track as well as some side exercises that you can solve while waiting for comments from a mentor.

 

 

Now that your solution is in place, you can view other users’ solutions by clicking the View community solutions button or click on the Choose next exercise button to move forward and find a slightly more challenging exercise.

 

Twofer

Fast forwarding to a slightly more complex exercise, I’m downloading Two Fer (again, this might be different in other tracks), implementing it and seeing to that all my tests are green (some might be ignored to begin with, in order to simulate TDD, so don’t forget to activate all of them), and submitting my solution. This time I have to wait for a mentor to look at my solution, and comment and perhaps approve it if they find it appropriate.

 

 

Luckily, my solution was approved. I was informed both by mail and by a small red marker near my profile at the top right of the page. And I got some comments from the mentor, too. I now have the opportunity to send a comment back to the mentor or fix some errors if either me or the mentor found anything that needs fixing. If that is the case I could submit a new version of my solution and my mentor will take a look again and either comment or approve this new version. I can also see my submission version history by looking at the iteration boxes at the top right and choosing between different versions to review what has changed. I am now ready to complete my solution and give my mentor some kudos. I can then choose to go for next exercise, or choose a side exercise and practice some more.

 

Final Words

I hope this catches your interest and that you are burning to give Exercism a go. I myself found it extremely satisfying and worthwhile to both learn new stuff and help others do the same. And the Exercism platform gives me just the perfect tools to do both.

 

In the next article we’ll look at the mentoring side of Exercism. I’ll try to explain just how useful I find it to instruct mentees in their solutions and how much I learned by doing so.

Fler inspirerande inlägg du inte får missa