Earlier quoted context omitted.
Context sensitive auto-complete is a godsend.
Seriously. Is there a good list of tools that provide it? In Python, the only one I've managed to love is PyDev. Supposedly Atom does it with the "script" package?
“Did you mean?” Experience in Ruby
41–50 of 187 posts
Re: “Did you mean?” Experience in Ruby
#42This sort of stuff should, at least in the 'easy' case be done at the editor level. Doesn't ruby have linter tooling for this? Still, props for the work.
Ruby has a linters, but this sort of problem is hard to solve with a linter in a dynamically typed language. It's even harder in a Rails environment since Rails adds many methods to your classes at run time.
Plus it incentivizes you to write this documentation in the first place, which you can then instantly bring up inside the IDE from any place where the method is used.
Re: “Did you mean?” Experience in Ruby
#43I've been pairing with ruby / rails developers since 2010 and coming from statically typed languages, it's unbelievable how much time gets spent playing "guess the method name". Even in rich IDEs like RubyMine, the utter lack of context in any given file in rails leaves programmers typing their best guess of a method name, running the tests, rinse, repeat. This solution, while creative and laudable, solves a problem…
It's kind of silly, the major benefit of using Ruby (or JavaScript nowadays) is to iterate quickly. But then, some of their users spend months turning a text editor into an IDE just to waste precious hours on spelling errors.
Re: “Did you mean?” Experience in Ruby
#44Earlier quoted context omitted.
Seriously. Is there a good list of tools that provide it? In Python, the only one I've managed to love is PyDev. Supposedly Atom does it with the "script" package?
I've been working with PyCharm [1] a lot lately and I've come to like it a lot. Probably the best context awareness I've seen for any dynamic language - it (almost) feels like working in something more tool-friendly like Java in that regard. [1]: https://www.jetbrains.com/pycharm/
Re: “Did you mean?” Experience in Ruby
#45I would love it if instead of quitting my program with an error, it just went ahead and called the method it thinks I'm referring to. This would remove a lot of unneeded friction from web development.
Re: “Did you mean?” Experience in Ruby
#46A lot of people are recommending IDE-like tooling--but in truly dynamic language (one with a "living image" with path-dependent monkey-patched behavior that can't be replicated during static analysis, like Smalltalk--or, sometimes, Ruby) there's a more idiomatic way. In a dynamic language, if you're at all unsure of what code you need to write, then you don't write it in your editor in the first place. Instead, you b…
This is the exact purpose of tests.
Re: “Did you mean?” Experience in Ruby
#47Earlier quoted context omitted.
It's kind of silly, the major benefit of using Ruby (or JavaScript nowadays) is to iterate quickly. But then, some of their users spend months turning a text editor into an IDE just to waste precious hours on spelling errors.
Most text editors have naive autocomplete (using a words list and words they see), which catches 99% of these errors.
Nevertheless I'll try this gem.
Re: “Did you mean?” Experience in Ruby
#48On a side note, am I the only one who feels that autocomplete tend to get in the way when I'm coding?
Re: “Did you mean?” Experience in Ruby
#49I would love it if instead of quitting my program with an error, it just went ahead and called the method it thinks I'm referring to. This would remove a lot of unneeded friction from web development.
You should implement a `yolo` gem to support this.
Re: “Did you mean?” Experience in Ruby
#50The value of static typing is more and more apparent. Recently I've played with ocaml and F# and it felt great compared to Java or C++.
... until you start trying to make your app testable. (I say this as a developer of primarily statically typed languages.)