“Did you mean?” Experience in Ruby
yukinishijima.net
“Did you mean?” Experience in Ruby
1–10 of 187 posts
Re: “Did you mean?” Experience in Ruby
#2https://www.omniref.com/ruby/gems/did_you_mean/0.6.0/symbols...
and it works by extending the NameError exception:
https://www.omniref.com/ruby/gems/did_you_mean/0.6.0/files/l...
Re: “Did you mean?” Experience in Ruby
#3Still, props for the work.
Re: “Did you mean?” Experience in Ruby
#4Re: “Did you mean?” Experience in Ruby
#5>>> Sometimes I wasted hours and hours just because there is one character difference. I hate it.
This shouldn't happen. Ever. This should not be a problem anymore. These are the sort of errors that we can catch immediately and should be caught immediately. From looking at the author's GitHub profile, it looks like he uses Emacs, presumably without a plugin that would give him IDE like features. I'm not going to tell him to go use a regular IDE, but it frustrates me that's we can't have those sort of tools available everywhere. (As a vim user myself I have high hopes for the neovim project and look forward to the day when it can be embedded inside a general sort of IDE.)
Re: “Did you mean?” Experience in Ruby
#6Obviously this is a useful tool, and all the power to the author for finding what looks to be an excellent solution, but this line bothers me: >>> Sometimes I wasted hours and hours just because there is one character difference. I hate it. This shouldn't happen. Ever. This should not be a problem anymore. These are the sort of errors that we can catch immediately and should be caught immediately. From looking at the…
We use whatever editor or IDE any given pair decides to use. In my day-to-day work I've used RubyMine (very popular in our west coast offices), Vim (popular in NYC), Emacs (popular with Mike Dalessio) and my own personal favourite, Sublime Text.
I don't think solutions have to be either/or. Yuki's approach is simple and will cover lots of cases.
Re: “Did you mean?” Experience in Ruby
#7"because" misspelt.
Re: “Did you mean?” Experience in Ruby
#8Re: “Did you mean?” Experience in Ruby
#9Not sure if the typos (Yeah, there are two) are intentional but I loved it :-)
Re: “Did you mean?” Experience in Ruby
#10>>> Sometimes I wasted hours and hours just becaue there is one charactor difference. I hate it. "because" misspelt.