Follow

another coworker, on a past hack:

"There was a Ruby... abomination that someone wrote that hooked on the 'undefined method call' hook of the base Ruby object, computed the closest actual method by using Levenshtein distance, and delegated to that function instead."

@danielhglus okay i will admit i've done a thing kind of like this, but in a python and for GL call naming convention normalization; doing that just off edit distance is wild tho

@danielhglus better hope they didn't misspell a method name in that code

@danielhglus oh yeah i remember that one, i think it was a riff on the very real github.com/yuki24/did_you_mean which is now part of Ruby 🤨

@danielhglus That reminds me of the stackoverflow python module which would search for your keyword and compile code from the answers.

Sign in to participate in the conversation
Mastodon for Tech Folks

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!