3 ms·
Programming as a Way of Thinking
- t0mbstone 9y agoIf you think Python makes it easy to communicate ideas, you should really check out Ruby.
- majewsky 9y agoI don't know. Ruby culture seems to embrace a lot of what is usually called "black magic". This is especially true for Rails: It's a lot of "do what I mean", so I see your sentiment, but it gets really hard to track down how the idea works in detail because of all the magic stuff happening everywhere. Maybe it's more like "Ruby makes it easy to communicate ideas, but hard to analyze them".
- t0mbstone 9y agoThat's true. Ruby can often have a lot of magic that is hard to track down. I solved this problem by using an IDE that has build-in code introspection (RubyMine), and by using tools like the Pry debugger. Once I figured that out, the whole world of Ruby just opened up in front of me. Any time I am curious about what a method does, I just command-click it and RubyMine jumps to the original source code with documentation in the comments above it. You can also use the method(:method_name).source_location technique with pry debugger. But even those tricks won't get through a forest of black magic caused by an author's use of method_missing. That will require you to do some digging. Once you know how method_missing works, though, it's not too difficult. Nowadays, good Ruby coders avoid using method_missing if at all possible.