4 ms·
Some IDEs like rubymine allow this. On vscode if I can't work out what a function does from the name I just do a full code search for 'def method_name` and it u
by baroffoos 7y ago
Some IDEs like rubymine allow this. On vscode if I can't work out what a function does from the name I just do a full code search for 'def method_name` and it usually brings up the function I need.
- shantly 7y ago> I just do a full code search for 'def method_name` and it usually brings up the function I need. Not in Rails. Too much metaprogramming-generated never-defined stuff going on. Often makes diving into inherited Rails codebases pretty unpleasant. Especially if they don't have a solid test suite, which IME most in the wild do not (not Rails' fault, that's true of most code ecosystems).
- breatheoften 7y agoDefinitely not sure why this is being downvoted — full text search failing to find anything about the definition of a symbol in rails codebase is super super common ... rails obsession with lack of explicit includes is the stupidest thing I’ve ever encountered in a dynamic programming system ... Maybe you can get away with a module system that works that way in something like ocaml where it’s always possible to tell what is being referred to statically — but in a dynamic language - the level of obfuscation this induces is absolutely nuts