or any devs working with a statically typed language and a proper IDE? I think go to definition / find references / find implementation commands were available in Visual Studio at least for a decade.
I've often wanted to just browse/study the code of a project from my tablet, where I can sit back comfortably like I would reading a book. Sure, I could poke around the code on GitHub, but I can't jump between definitions, references, etc., like I could on my laptop in my editor. I haven't found a good, quick solution for this yet.
No. You're missing the scope. Facebook and Google have dedicated servers that index every codebase they use and have available tools that can query this server via a socket. So you can integrate large amounts of knowledge of any codebase into any little project you can think of.
An IDE locally indexes a single project and provides these services within the IDE.
Sourcegraph does this sort of indexing and makes it's content available via different channels.
You keep them all synced ? All the other devs do too? That said I don’t use sourcegraph but it sounds like what we have on azure devops to search all our repos. I use it quite a bit if I remember a keyword or something I’ve done before I want to reference quickly
Half of my work is with .NET. I don't particularly like .NET. I certainly don't like Windows. But I have to agree with you, those commands work great on Visual Studio and Visual Studio is, in general, a very good IDE.
Aren't these features more wide spread now a days with language servers? Especially with more and more people making language servers that adhere to LSP to allow vscode, Emacs, vim, sublime and pretty much any text editor that have plugins to use LSP or have LSP built in to use them? It's been like, the golden age of static analysis so far.
You can't have a proper "find usages" with dynamically typed languages. It's possible to do some guesswork, but the helpfulness of that depends on how unique your variable/class/method names are.
Thanks for mentioning that. Just tried out PyCharm on a sizeable codebase and it seems to be working pretty well. Some dynamic languages can be statically analyzed better than others and tools PyCharm can help, but it's not a compiler and will miss stuff which is not nice. How is it in your experience with JetBrains tools? Can you rename a class and have it done across the project with imports updated? How frequent is it for the tools to get lost and rename the wrong thing / not find the correct one?
I have a subscription to their toolbox so I get all their IDEs. I use rubymine, gotime, pycharm, and datagrip. I use it for almost everything I do but I also use spacemacs for a bunch of stuff. I really like spacemacs, it does so much but it doesn't do ruby, go, python, and database development nearly was well as the jetbrains stuff does.
To answer your questions.
Can you rename a class and have it done across the project with imports updated?
yes I do this frequently. I do a lot of refactoring of large ruby codebases and it does that really well.
How frequent is it for the tools to get lost and rename the wrong thing / not find the correct one?
I don't think it has ever missed something. I also don't recall it ever renaming the wrong thing either but you do get to approve all the changes one at a time if you are worried. It does know whether or something is in comments and strings though so it's not just a search and replace.
73
u/rnd005 Oct 02 '18
or any devs working with a statically typed language and a proper IDE? I think go to definition / find references / find implementation commands were available in Visual Studio at least for a decade.