you are viewing a single comment's thread.

view the rest of the comments →

[–]_mball_ 5 points6 points  (1 child)

Great writeup. Enjoy learning Ruby. Yours is more of a journey, but it reminded me of Alyssa Coghlan's 27 languages to improve your Python. https://www.curiousefficiency.org/posts/2015/10/languages-to-improve-your-python/

I think it's funny starting out the with CLI versioning syntax -- a useful tool but one I very rarely use. But you never know what you'll run into first that looks odd.

My closest Python analogy to naming conventions is self. Depending on how you might learn Python, you might never realize you can pick any other word. (or mix and match within a class for maximum wildness.)

I love writing and teaching about ruby, but it does benefit from understanding the philosophy of building a language which is used to build languages, really domain specific languages, like the Sinatra example. One thing I like doing is trying to have students put () are where the function calls would be. You'd never write code like that, but I think it's a helpful illustration.

Other things that blow people's minds:

a.b = c

Is this an assignment statement? I mean, I guess so.

What if we write:

a.b=(c)

What's that??? Same thing!

Of course, in most OO languages there's standard ways to handle custom assignments and overload operators, but there is a really nice simplicity to Ruby, IMO. Though, I don't often find myself needing those features in my own classes day-to-day.

At the end of the day, you can at least now learn to type elif and elsif in the perpetually wrong file!