2
$\begingroup$

I have some students in highschool who already understand programming concepts (generally), and are fairly familiar with Python's syntax and logic, and have a beginning awareness of OOP in Python. I'd like them to get a quick crash course in Ruby for fun and general awareness of the language. The intent is to be able to write basic code in Ruby, both for web applications and back end applications using Rails.

What would be a web course, or website I could have them read, that would bring them up to speed in the basics of Ruby so they could start writing code in it? I'd like it to be free.


(I'm self-teaching, but this is rephrased as if I was teaching a class.)

$\endgroup$
7
  • $\begingroup$ I'm not sure how this question will fare, given that resource requests are usually frowned up on Stack Exchange. $\endgroup$
    – thesecretmaster
    Commented Jun 25, 2017 at 20:57
  • 1
    $\begingroup$ @thesecretmaster not really - on Physics.SE for example they are welcomed - it varies on the site. I thought this meta thread's consensus was in favor of allowing resource recommendations. $\endgroup$
    – auden
    Commented Jun 25, 2017 at 20:59
  • $\begingroup$ As a note, self-teaching is on-topic here, so it's probably fine to frame the question in that regard. $\endgroup$
    – Scimonster
    Commented Jun 25, 2017 at 21:02
  • 1
    $\begingroup$ By "starting writing code in it," what sort of code do you mean? Back-end Ruby using a framework like Rails? By "familiar with Python," do you mean familiar with OOP or just general syntax/logic? I have a couple resources in mind, one of which is a) at a university level, and b) part of a more theoretical study of programming languages. What is the intent of learning Ruby? Fun? Web development? Clarify this information, and you will get better resources. $\endgroup$
    – Peter
    Commented Jun 25, 2017 at 21:15
  • 1
    $\begingroup$ @Peter I edited to try to answer some of your questions. $\endgroup$
    – auden
    Commented Jun 25, 2017 at 21:40

2 Answers 2

5
$\begingroup$

This is a different sort of answer than what you may be hoping for, but I'd really recommend that you deepen your knowledge of Python first. Learn to be pythonic, learn its OOP aspects. Learn its dynamic aspects. Become a Python Wizard.

The reason for this advice, since you are fairly new at this, is that there is a danger that you will try to learn too many languages too soon and start to think of them syntactically only. There are a lot of "java programmers" for example, who only write C code.

Let me give an analogy from another field. I used to be a very good photographer. I had one manual film camera with a light meter and three lenses. One was a zoom lens since I wanted to backpack with not too much equipment. At that point I could take really nice photos. Artistic. Later I got lots of cameras, lots of lenses, lots of other "stuff" and my ability to really take good photos went down, not up. Too many tools in your tool box is not a help, especially for a beginner.

So, build skill first, then branch out. One big idea is called "creativity under constraint". How much can you do if you artificially restrict your tool set? It sounds dumb at first, but with fewer tools your brain becomes your best and most powerful tool. Suppose your language didn't have loops. What can you still do? Recursion of course, but in an OOP language there are other options. Suppose, instead, it didn't have any sort of selection statements (if/switch...). Can you still write any program? Some become very difficult to write, but attempting to do this increases your brain power. Big Idea here.

$\endgroup$
3
$\begingroup$

I'd recommend that you look into sinatra or one of the tutorials that are linked from the ruby docs. They also have a specific tutorial in the docs for moving to ruby from another language.

The reason I'd recommend sinatra is because it is an intro to what ruby is mainly used for in the real world: Web Development. A huge part of ruby is ruby on rails.

A very interesting thing about ruby that you'll learn from the beginning is it's approach to OO. The simple phrasing is "everything is an object".

Enjoy ruby, it's a pretty great language.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.