Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (17 sloc) 2.71 KB
layout title date comments categories
post
Exercism.io First Thoughts
2013-09-05 22:44
true
ruby
training
elixir

Exercism.io is a humbling and very worthwhile experience.

Let me backtrack: Exercism.io is a new way of learning computer languages. Right now, it has support for Ruby, Elixir, Javascript, Clojure, Python, and Haskell. It's a series of exercises in which you download a test suite and then are challenged to write the code which will pass all the tests. That's cool in and of itself, but then they add the social component to it. Others can look at your code and offer suggestions, called "nit-picks." While the site provides some guidelines on what's best, the commentary I've seen so far is all smart, friendly, and productive. I've only done the first exercise so far, but I've learned a lot from it.

The trick is, you have to check your ego at the door. It's a lot like what I imagine pair programming is like. You have to be able to accept constructive criticism and adapt it into your work without fear of looking stupid.

Your first reaction to the constructive criticism will likely be, "Why are you picking at my code? It passed the tests! It works! I'm awesome!" That was me at first.

Then I realize the comments were smart. They taught me something. They were gentle by comparison to anything you read in the comments thread elsewhere on the net. Everyone on the site is a coder looking to get better, whether it's by coding themselves or teaching others. Nobody's trying to be a jerk. That would be non-productive.

Coding is about more than just passing the tests. It's about writing readable code in the way that's best for the particular language. I don't just want to write Ruby code. I want to write idiomatic Ruby -- the kind that looks like Ruby. Since I'm still relatively new to the language, I have a lot to learn and look forward to having it all drilled into me.

There's a big difference between knowing something and doing it. In my first coding Exercism, I had silly things "wrong" like indenting by too many spaces and missing a common string method I didn't see on my Ruby Cheat Sheet. (I'd link to that Cheat Sheet, but the site no longer exists.)

I also had to be reminded that private functions are good things. I decided against adding them the first time because it seemed unnecessary in a first pass at a simple piece of code. I'm learning now to re-orient my thought that no piece of code is little. It just hasn't grown yet. Might as well create that infrastructure around it now. It may seem silly, but it's a long term win.

Also, these are exercises, so let's exercise everything.

Now excuse me while I go work on the second challenge.

You can’t perform that action at this time.