News for hackers. Stuff that matters.
Re:Effective Code Browsing by IshKebab on Thursday October 07, 2021 @02:54AM (#28783062)
Using a statically typed language and an IDE is about a billion times better than grep.
Re:Effective Code Browsing by TeMPOraL on Thursday October 07, 2021 @06:22AM (#28784442)
It is, at least until the codebase grows so much that the IDE can no longer keep up with it.

(Or maybe it's just a problem specific to C++ projects and IDEs. The largest codebases I worked with, the ones where I hit this problem, were C++ ones.)

Re:Effective Code Browsing by IshKebab on Thursday October 07, 2021 @06:53AM (#28784635)
Yeah that can happen, though in my experience it's far more common that IDEs are broken by some janky custom build system set up by people that use Vim or Notepad++.

I think you're also right that some languages make this harder for IDEs than others. C++ is probably a worst case. Something like Java is trivial because the file structure matches the namespaces. It's probably not a coincidence that every Java IDE I've used has absolutely top class code intelligence tools.

Re:Effective Code Browsing by muzani on Thursday October 07, 2021 @08:21AM (#28785280)
Yeah I went from Java to JS and was surprised how much worse the code browsing experience is.

C is probably not as good as Java but I remember using Eclipse the first time with C for operating systems class, and being amazed with what a large codebase looks like and how easy it was to maneuver.

Re:Effective Code Browsing by chii on Thursday October 07, 2021 @09:23AM (#28785886)
Intellij's webstorm does js pretty well - almost as well as their java offerings.

Having said that, VSCode these days are also pretty damn good.

Re:Effective Code Browsing by IshKebab on Thursday October 07, 2021 @03:57PM (#28791310)
Yeah Typescript in VSCode is pretty good. I guess because the VSCode developers use it all the time!
Re:Effective Code Browsing by dmitriid on Thursday October 07, 2021 @07:00AM (#28784685)
C++ contributes a lot tot his problem. IIRC you can't even reason about C++ code until you've parsed all of it. Undoubtedly, IDEs employ clever tricks and shortcuts, but even they can do only so much.
Re:Effective Code Browsing by slaymaker1907 on Thursday October 07, 2021 @03:38AM (#28783324)
That's a mighty big assumption that someone is going to go to the trouble of setting up an IDE for a project they want to read the code of. I pull up code all the time that I have no intention of modifying just to understand how it works a bit better.
Re:Effective Code Browsing by vbezhenar on Thursday October 07, 2021 @03:57AM (#28783431)
I've found out that Github provides clickable Java identifiers. Like IDE. Incredibly convenient for your use-case, if it works.
Re:Effective Code Browsing by craigharley on Thursday October 07, 2021 @04:39AM (#28783700)
This was my though too, who cares what lines match where - when an IDE can take me to the line, and more importantly, show me the context for that line.
Re:Effective Code Browsing by zomglings on Thursday October 07, 2021 @10:19AM (#28786583)
This comes nowhere close to eliminating the utility of grep, especially in large code bases.

Grep helps you search for things in comments and in documentation. It allows you to conveniently ignore files and directories.

Grep and related tooling contain decades worth of insight and wisdom (in a decades-old field) that we should not be so quick to dismiss.