top | item 43369607

(no title)

choxi | 11 months ago

Matz said he designed Ruby to optimize for developer happiness, it’s just a core principle of the language since it was created

discuss

order

kuboble|11 months ago

Happiness of a developer writing code can be a misery of a one having to read / debug it. I worked in ruby for a couple years around 2009 and having to deal with a code that implemented most of its logic via method missing is still one of the strongest negative memories I have about coding.

MatthiasPortzel|11 months ago

`binding.irb` and `show_source` have been magical in my Ruby debugging experience. `binding.irb` to trigger a breakpoint, and `show_source` will find the source code for a method name, even in generated code somehow.

viraptor|11 months ago

Another annoying one from that category is Ruby's forwarded methods. Since they're created via generated, injected code, you can't query which method it forwards to at runtime. Or not easily anyway.

RangerScience|11 months ago

Yep yep, that's the whole "sharp knives" thing.

What I advise (and aim for) is only pulling out the sharp knives for "library" code, but application code should stay "simple" (and this much more easily navigable). Otherwise you can absolutely make a bloody mess!