Somewhat related but as I've been building a rails project I've been meaning to open source the song parser I've been building alongside it. It scans an mp3 and pulls out the artists along with the type of role they played on the song. Here's a quick gist I pulled from my model: https://gist.github.com/3680949 Some examples: Drake - The Motto (Jon Bellion Cover) => [["Jon Bellion", :cover], ["Drake", :original]] Davi…
This looks awesome. You should consider sticking it somewhere and giving it a name, so that I might find it 6 months from now when I'm motivated to fix my shitty Python script [1]. Also, a side question: is it normal/considered a best practice in ruby to monkey-patch built-in libraries like that? I know ruby has open classes, but I'm just curious how using them in this way is regarded. [1]: http://news.ycombinator.co…
No, it's not considered to be good practice. I think it's generally frowned on by more experienced folk.
However, ActiveSupport (which is part of Rails) does a lot of monkey-patching of the basic Ruby classes in this way, and that probably helps to perpetuate monkey-patching among newer developers.