Live data from Hacker News

Ruby's exceptional creatures

exceptionalcreatures.com

41–50 of 133 posts

Re: Ruby's exceptional creatures

#41

Ruby is a good gateway to programming, better than C, C++, Java, Python,...

Better than Python?

15 years ago I would have agreed. Today, Python is a "gateway" to programming that is also the real thing.

It's like one of those old languages designed for beginners to learn coding... and then you can continue to use the same language for your entire professional career as a software engineer, to build just about any production-ready application.

Ruby is a beautiful language, but unless you are going to be working with Rails, it's not a very practical language to build something in. And I don't think telling a beginner "just learn Ruby for now, but once you're actually ready to write your first useful program, you're probably going to have to learn another language" is very motivating.

Re: Ruby's exceptional creatures

#42

Aside from being cute, and maybe harking back to why’s guide; I like how this feels like it aids in understanding. Each illustration provides character that helps aid in memorizing or creating a mental landscape of the exceptions. Theres probably a lot of documentation that could be aided by illustrations like this along the lines of analogy and metaphor. Aside from making the process of reading documentation more fu…

I don't appreciate how it seems like an elaborate ad though: Every error has a link to the paid service they're selling , with the error/exception "Enemies" list as their product

Re: Ruby's exceptional creatures

#43
post #41

Ruby is a good gateway to programming, better than C, C++, Java, Python,...

Better than Python? 15 years ago I would have agreed. Today, Python is a "gateway" to programming that is also the real thing. It's like one of those old languages designed for beginners to learn coding... and then you can continue to use the same language for your entire professional career as a software engineer, to build just about any production-ready application. Ruby is a beautiful language, but unless you are…

I love Ruby and write it professionally; unfortunately I agree - learning Python is more practical currently.

Re: Ruby's exceptional creatures

#44

It's painful to see method_missing called out as a first class solution in the first creature https://www.exceptionalcreatures.com/bestiary/NoMethodError.... . "Practical Ruby" has three chapters dedicated to method_missing. "define_method" is more common these days and also painful to see. Ruby gets a lot of criticism for embracing magic and indirection ("Ruby, the bad parts of Perl"). It has some good parts (no fun…

Respectfully mostly disagree. Ruby is full of sharp knives. Other languages have dull knives. Writing code without thinking will cut you either way. Things like method missing are exactly the right solution for a certain set of problems. If used thoughtfully, they’re amazing. If used thoughtlessly, bloody mess. But this is true in every language.

I’ve always really disliked the sharp knives metaphor. A chef’s choice of knife doesn’t impact their coworkers, nor does it end up on the plate to a customer.

If we were chefs a knife would be your laptop, your editor, your cli tools. Not your programming language.

A better metaphor would be the lumber in a building or the soil in a garden. I don’t know what I’d call ruby in this metaphor, maybe “lightweight wood that splinters”…

Re: Ruby's exceptional creatures

#46
post #42

Aside from being cute, and maybe harking back to why’s guide; I like how this feels like it aids in understanding. Each illustration provides character that helps aid in memorizing or creating a mental landscape of the exceptions. Theres probably a lot of documentation that could be aided by illustrations like this along the lines of analogy and metaphor. Aside from making the process of reading documentation more fu…

I don't appreciate how it seems like an elaborate ad though: Every error has a link to the paid service they're selling , with the error/exception "Enemies" list as their product

On the contrary, I quite like how it's a very elaborate and useful ad. The link to the paid service is very discreet and the website provides real and free educational value even if you don't use their service.

Re: Ruby's exceptional creatures

#47
post #41

Ruby is a good gateway to programming, better than C, C++, Java, Python,...

Better than Python? 15 years ago I would have agreed. Today, Python is a "gateway" to programming that is also the real thing. It's like one of those old languages designed for beginners to learn coding... and then you can continue to use the same language for your entire professional career as a software engineer, to build just about any production-ready application. Ruby is a beautiful language, but unless you are…

The biggest difference between both is mainly their machine learning story but if you don't intend to go in it (this is a very specific career choice), I'd say both are equally good options.

I'd say both are pretty bad at performance critical tasks or UI stuff where usually you would use neither of those.

Re: Ruby's exceptional creatures

#48

Earlier quoted context omitted.

Respectfully mostly disagree. Ruby is full of sharp knives. Other languages have dull knives. Writing code without thinking will cut you either way. Things like method missing are exactly the right solution for a certain set of problems. If used thoughtfully, they’re amazing. If used thoughtlessly, bloody mess. But this is true in every language.

Calling method_missing a sharp knife is like calling GOTO a sharp knife

That's not a bad definition of GOTO.

Re: Ruby's exceptional creatures

#49
post #7

It's painful to see method_missing called out as a first class solution in the first creature https://www.exceptionalcreatures.com/bestiary/NoMethodError.... . "Practical Ruby" has three chapters dedicated to method_missing. "define_method" is more common these days and also painful to see. Ruby gets a lot of criticism for embracing magic and indirection ("Ruby, the bad parts of Perl"). It has some good parts (no fun…

method_missing is a tiny offense compared to what was getting popular at one point - creating classes by forking metaclass and injecting methods into... without knowing you're doing so (something IIRC got lost between people there...) Result was objects that shared no structure, no field

Do you mean the class << self pattern?

Re: Ruby's exceptional creatures

#50

As a non-ruby developer I see things like this and get jealous of ruby developers.

I was developing mostly PHP, some bash, some Java and kinda liked ruby but could only partially feel it.

Until I read "why's (poignant) Guide to Ruby", from start to end, I completely fell in love with programming. Everything before was just getting to this point.

The documentation and community is what has drawn me into Ruby. The language and now very major ecosystem is why I still stay :)

Hello Ruby by Linda Luikas is one of the sweetest 'programming books' I've ever seen.

Post reply on HN