DEV Community

Discussion on: Monkey patching: What is it and should you be using it?

Collapse
 
molly profile image
Molly Struve (she/her)

Monkey patching is not a unique technique. It is not "evil" per se. Any technique irresponsibly used can be considered evil.

Could not agree more! @ben and I were just discussing monkey patching on one of my recent blog posts, The Importance of Knowing Your Gems

Collapse
 
napoleon039 profile image
Nihar Raote

An interesting conversation. I liked the method you mentioned to Ben about monkey patching some changes and then issuing a PR to the repo. That's a good use for monkey patching, but I'm guessing it's not always the best solution. I have yet to start working as a developer so I may not have much work experience, but I have not yet seen a good use for monkey patching. Even the times when you used monkey patching, they were temporary changes.

Also, some good points in your blog! Although I am not a Ruby developer, it's advice worth keeping in mind.πŸ™‚