quest88 21 hours ago

I agree. I think..there's too much freedom. Too many ways to do things, and debugging is hard with monkey patching.

  • vidarh 18 hours ago

    If debugging is hard to you in Ruby because of monkey patching, it's an issue of not knowing the debugging tools. Attach pry or Ruby debug, and show the source location of a method, or log them. This isn't surprising - debugging Ruby is different to debugging most static languages, and more tutorials on how to do this well would be nice...

    Also the use of monkey patching in Ruby peaked something like a decade and half ago. Outside of Rails, it's generally frowned on and introducing new methods is usually addressed by opting in by including modules these days.

    • ukprogrammer 17 hours ago

      Agreed, it still absolutely astounds me the number of developers out there that do not use a debugger as an essential part of their toolkit.

  • AstroBen 21 hours ago

    Can you give an example of where monkey patching made debugging hard? I have a decade of Ruby experience and can't think of a single time it was an issue

    This is one of those things that sounds like it'd be a problem but it really isn't