4 Resources to Learn and Practice Ruby
I am new to programming.
Ruby is the first language I am learning.
To get grips on it I have used several sources so far and as a complete beginner, one inevitably tends to compare them. How the material is presented, how the tasks are organised to practice the skills that you have just covered. You definitely notice the different teaching styles. All the sources are good in some ways, although each has some drawbacks.
Before I begin, everything in this post is based my personal view and I chances are - you might not agree with me completely. You still might find this article useful.
So far I have finished a few and got the basic grounding in Ruby. As I move forward I will post here some more useful links to the resources.
If I could go back and start a new, here is the sequence how I would approach it:
1. Ruby Explained Post Series by Erik Trautman
Erik, the founder of Viking Code School made a series of blog posts “Ruby Explained”, which I have found very simple to understand and contain comprehensive examples. It also does not “overload” your brain if you are just starting out. Great start.
Here is the list of all articles in the sequence that they should be read:
1. Ruby Explained: Numbers, Operators and Expressions
2. Ruby Explained: Objects and Methods
6. Ruby Explained: Other Random Tidbits
7. Ruby Explained: Conditionals and Flow Control
8. Ruby Explained: Dates and Times
11. Ruby Explained: Map, Select, and Other Enumerable Methods
12. Ruby Explained: Writing and Running Methods
13. Ruby Explained: Inheritance and Scope
14. Ruby Explained: Blocks, Procs, and Lambdas, aka “Closures”
2. “Learn To Program” By Chris Pine
Turns out this is quite a known book as a good introduction to programming and it just happens that Chris used Ruby as a base language for it. Partially, it is available online, but you can get an extended paperback copy too, which I recommend.
I must say that chapters 0 (yes , chapter “0”) up to 8 are well made, clear and quite fun to go through. I found, though, chapters 9 - 12 to be really challenging. I frankly could not complete the tasks at the end of the chapters without external help. Luckily there are answers at the end of the book and some solutions online. And if you find yourself in the same position as I do, worry not - I have noticed a number of threads on forums where people leave similar comments on chapters 9 - 12. They are hard, and there must a reason why the task in Chapter 10 is called “Rite of Passage” :)
There is only one little issue with the book that I can point out… In the answers section at the end of the book, you don’t really get a lot of explanations on WHY the author solved his own task the way he solved. There are inline comments, but sometimes I did not find them very clarifying. Having few written paragraphs explaining the solution in detail would be helpful.
Overall the book is really well put together and is a great extended intro to the Ruby.
By the way, the copy I had the Ruby was version 1.8.6-26
Check!
3. CodeCademy Ruby Track
If you have been poking around the Internet in the search for “learn to code” or alike, chances are you have seen CodeCademy. While I think their HTML & CSS Track are OK, I have found Ruby Track to be increasingly confusing. Now don’t get me wrong, while you are doing a particular module - most of the things make sense, BUT, when it comes to building a mental model in the users head of how everything works together - it does not give you that.
I did CodeCademy Ruby Track as a the very first step, and in retrospect, I wish I had not started from it. Don’t repeat my mistake.By the time you went through the above resources - the first half of the track will be a breeze for you (and also a good refresher) while the second half probably make more sense after having seen it all in Erik’s posts and Chris’s book.
By the time you went through the above resources 1 & 2 - the first half of the track will be a breeze for you (and also a good refresher) while the second half probably make more sense after having seen it all in Erik’s posts and Chris’s book.
Also worth noting, that they use Ruby 1.9.3 (as of March 2016).
4. Ruby Monk
As a final step - I would complete Ruby Monk Primer book. A lot of it is also repetition of what you have learnt already, so if you wish - you can skip straight to solving the problems at the end of the course. There are 16 in total, and some of them made me think for a while to find a solution. It is a good stretch.
Also, if you get to Ruby Monk and feeling stuck, you are free to get some inspiration/help from my solutions on GitHub.
That’s it for now. My next step is to tackle some beginner problems on Project Euler and then get my hands on Viking Code School Ruby Challenges as a final preparation step before the application.