Hacker News new | ask | show | jobs
by mlthoughts2018 2921 days ago
Discovering where function or class definitions are found for the first time ever is a necessarily rare part of software engineering. It happens when debugging some third-party tool, when joining a new team or project, etc., but the vast majority of the time you aren't doing that stuff and you are working on a codebase whose internals you're expected to have a mental model about.

When just exploring a codebase for the first time, frankly just grep would be more useful than jumping, because if you're looking for the firs time, there is no purpose to following a thread. You'd need a task or some other understanding of what you need to do. However, I do concede that "jump to definition" is a perfectly fine tool for this sort of search if it's what somebody wants.

But the situation is totally different in the vast majority of the time, when you're working in a codebase you're expected to understand already, but which you need to navigate around the architecture.

That case, which is most of the time (by definition), is not benefited by "jump to definition" except in the pathological cases when the organization of the software is exceptionally bad. Basically, if you find yourself in a situation where a "jump to definition" feature is constantly helping you, even after you have worked in that codebase a while, then it is a clear symptom of really big, pervasive problems about that codebase. It's not an endorsement of "jump to definition" features as being generically helpful.