Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What was it like to learn Ruby? #1010

Closed
ErikSchierboom opened this issue Oct 3, 2019 · 2 comments
Closed

What was it like to learn Ruby? #1010

ErikSchierboom opened this issue Oct 3, 2019 · 2 comments
Assignees

Comments

@ErikSchierboom
Copy link
Member

We’ve recently started a project to find the best way to design our tracks, in order to optimize the learning experience of students.

As a first step, we’ll be examining the ways in which languages are unique and the ways in which they are similar. For this, we’d really like to use the knowledge of everyone involved in the Exercism community (students, mentors, maintainers) to answer the following questions:

  1. How was your experience learning Ruby? What was helpful while learning Ruby? What did you struggle with? How did you tackle problems?
  2. In what ways did Ruby differ from other languages you knew at the time? What was hard to learn? What did you have to unlearn? What syntax did you have to remap? What concepts carried over nicely?

Could you spare 5 minutes to help us by answering these questions? It would greatly help us improve the experience students have learning Ruby :)

Note: this issue is not meant as a discussion, just as a place for people to post their own, personal experiences.

Want to keep your thoughts private but still help? Feel free to email me at erik@exercism.io

Thank you!

@ErikSchierboom
Copy link
Member Author

How was your experience learning Ruby?

Learning Ruby was a lot of fun. The thing I like about Ruby, is that it is very expressive. You don't need much code to do lots of things. Also, running tests in Ruby is just blazingly fast (when compared to a compiled language like C#).

What was helpful while learning Ruby?

The Ruby docs were somewhat helpful. I mostly learned Ruby the right way from the mentoring I received and by looking at other people's solutions.

How did you tackle problems?

The usual mixture of trial and error, StackOverflow, blog posts and browsing the official documentation. And getting a lot of help from mentors.

In what ways did Ruby differ from other languages you knew at the time?

There was more emphasis on the productivity of the programmer than in other language I knew. This was most apparent in the huge number of built-in functions.

What was hard to learn?

Nothing in particular.

What concepts carried over nicely?

Most of the object-oriented features I knew from C# carried over relatively nicely: classes, inheritance, mutation, etc.

What did you struggle with?

I found it hard to determine how one should write idiomatic Ruby, as Ruby is so expressive that things can be solved in tons of different ways. Sometimes, the Exercism mentors themselves also seemed to disagree :)

I also found that Ruby has such a rich set of built-in functionality, that it was often best to start with scanning the full list of available functions, to see if Ruby didn't already built-in the desired functionality.

My natural tendency was to write quite functional Ruby code (modules over classes, immutability over mutability), whereas Ruby appears to favor a more object-oriented approach.

Admittedly, I also struggled with not having a full-featured IDE. Especially when new to language/platform, the ability to just discover functions and types by merely typing and pressing a dot key every now and then should not be underestimated! This was replaced with lots of switching between my IDE and my browser, which listed the available APIs.

The official documentation was not as good as I had hoped. The interface in particular feels like it was coded in the 90s, with the corresponding user-friendliness. Also, searching for an API not uncommonly lead to an official Ruby documentation page, but for an older Ruby version.

What did you have to unlearn?

That an if should always be defined before the corresponding expression (Ruby allows it to be defined after it). Also, as said, Ruby tends to do things in a very object-oriented way, so I had to unlearn my FP tendencies. As I'm quite interested in performance but Ruby focuses on readability, I also had to stop myself from worrying too much about performance. Indenting with 2 spaces was a first for me too :) Finally, as Ruby is dynamic, I could rely less on my IDE to help me.

What syntax did you have to remap?

Braces are used differently than e.g. in C#, where they are defining scope.

@ErikSchierboom
Copy link
Member Author

We're closing this issue as it was part of our research for the v3 version of Exercism which has just been released.

Thanks everyone for chipping in! It has been greatly appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants