About Exercism.io
As programming becomes increasingly important, so does its pedagogy. Among the many resources out there that teach you to code, I've found Exercism.io to be the most effective. Exercism.io hosts a variety of programming exercises/problems for multiple programming languages.
First, you download these exercises using a special software client, and once you’ve completed one, you upload it back to the site, where other coders from around the world will give you feedback. Then you can take what you’ve learned and try the exercise again.
These are reasons I really like it:
- It requires creativity
- It encourages failure and repetition
- It involves a community
Philosophy
Without going to much into it, the school system in which we are raised trains us to be afraid of failure. Consequently, we all try to get things perfect the first time. After all, you usually only get one shot to get an 'A'. It turns out that that's the wrong way to teach programming because you never write a program perfectly the first time. Failure and repetition beget learning and mastery. I think Exercism.io does the best job of implementing this philosophy.
You can learn more about this site here: Wired.com, Hacker News, Techly.com
There is also a great article I encountered recently called "You may be picking the wrong programmers". It discusses the role of self-control in a programmer's success. It's a good read and it aligns well with the goals of Exercism.io.
My Experience with Exercism.io
The setup instructions were scattered throughout the website, so it takes some navigating to figure what you need to do to get started. To summarize, you download the latest release of the interface from Github, decide on a language, and fetch the first exercise. Because I have some experience with Javascript, I started there.
First Exercise
The first exercise is called “bob”. You get a fun readme file to explains your objective. Here’s the intro to “bob”: Bob is a lackadaisical teenager. In conversation, his responses are very limited. Bob answers 'Sure.' if you ask him a question. He answers 'Whoa, chill out!' if you yell at him. He says 'Fine. Be that way!' if you address him without actually saying anything. He answers 'Whatever.' to anything else.
Your job is to create a function that will respond appropriately to the prompts. Then you can upload your answer and others can make comments or suggestions. I can revise my code and submit it again. All iterations of my solution will be available to view on that exercise’s page.
Now that I’ve completed the first exercise, I can run exercism fetch javascript
to get the next one! It was a great idea to make only one exercise available at a time; it keeps you determined.
Community Benefit
Here is an example of how the community aspect can improve your learning experience.
In this exercise, the task was to “Write a program that, given a DNA strand, returns its RNA complement”. The first thing I thought of was a switch statement–it seemed obvious.
It wasn’t until after I submitted my solution that I encountered a different way of thinking about the problem. I browsed the solutions that other users had posted and noticed that one person chose to incorporate a map to “map” the DNA to RNA. This helped me remember that it is more important for your code to be conceptually clear than it is to be concise. I revised my code to reflect that attitude.
This is just one example of how the coding community can help you develop better code. I’m really excited about all of this. I plan on doing all of the javascript exercises before I move onto another language. I really believe that this is the best way to learn any language–challenging yourself, getting feedback, and repeating the process until you master the concept.