Earlier quoted context omitted.
Seen != Built. You don't always have to optimize for the right answer right away. Just asking someone who's worked with/on the codebase will often give you a jump start.
If someone worked on JIRA/Task we can find, otherwise, how do we even know about who has seen the codebase?
Ask HN: How do you search large codebases before adding a feature or fixing bug?
41–50 of 87 posts
Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?
#42Earlier quoted context omitted.
It really has no issue as long as you have enough RAM and disabled swap. I recently got a fairly decent gaming laptop that I'm supposed to develop on and the 16 GB RAM is constantly full and it's swapping all the time, browser keeps suspending my background tabs, really pain in the ass.
You really do not want to disable swap on Linux. The operating system does not handle out of memory situations well at all if you do. At any rate, I've got 32 GB of ram and I'm operating off an NVMe-drive, I really don't see what the problem is.
Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?
#43For example:
def foo(args):
trace_func("foo", args)
# rest of the function
(NOTE There is call tracing logic built into some languages but it doesn't always work for some complex code bases; try it before you write your own.)If the code creates html elements, my script adds attributes to the html element to link back the source code location so I can look at the html and figure out where the elements were created. If the html is built using templates, then I add html comments to the template so I can tell where they are used in the final page.
Then I test the app and look at the traces to figure how it works.
At first I trace everything but once I get to know the code I add the tracing to the areas that matter. I don't check in this code.
Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?
#44This skill is what differentiates really good developers from not so good developers (that may wrongly believe themselves they are good): How good are you at reading code, finding out how smaller parts work in a larger system and understanding the context&domain is a large part in how good you are. Not so good developers, when they are not so good at this, often start blaming the system and people who have worked on…
Quoted post unavailable.
> Being able to navigate a large, complicated code base is a really important skill, and I think one of the important marks of a senior engineer. A big part of it is also just having the grit to dive in and understand a messy system without having things neatly laid out for you.
Says ~mostly the same thing, but without the condescension.
Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?
#45Sourcetrail (Google) had been my primary go-to for large multi-MLOC C-code and C++ project like Mozilla Firefox recently for me. I can now insert instrumentation testpoints deep inside Firefox JavaScript JIT engine within two days from zero-knowledge, quicker there on. - Sourcetrail (GUI/Linux/Windows, closed-net-capable, archived) - https://github.com/CoatiSoftware/Sourcetrail - SourceInsight (repo/web-server/closed…
There is also a company called SourceGraph which parses the AST of the various languages and lets you get CLion-like features with regex search. https://about.sourcegraph.com/
Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?
#46I work on code bases with millions of lines, so I wrote a tool called Septum to help me ( https://github.com/pyjarrett/septum/ ). This isn't to replace grep or ripgrep or silver searcher, those are all great tools you should have! Septum is neighborhood based (context-based) search, so you can find contiguous groups of lines which contain specific things, but exclude other things. It's also interactive so you can add…
This is SUUUUUUPER cool. Definitely going to try this out. Thank you for making it. Is there an easy way to install this on non-windows systems? I'm not familiar with Ada toolchains.
Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?
#47Earlier quoted context omitted.
Quoted post unavailable.
Maybe your comment is off topic? We are talking about searching. You are talking about good vs not good developers and understanding code. Searching != understanding.
As OP says, one of the skills/talents that differentiates good vs not good developers is the ability to rapidly "grok" enough of a large codebase to figure out "where to tap". ( https://quoteinvestigator.com/2017/03/06/tap/ )
Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?
#48IntelliJ / PyCharm / WebStorm ctrl-shift-F: search in the whole codebase, is what I use
IntelliJ is struggling noticeably navigating even my tiny 50 KLOC search engine project. I can't even imagine using its search function to get around MLOC-scale projects.
Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?
#49I work on code bases with millions of lines, so I wrote a tool called Septum to help me ( https://github.com/pyjarrett/septum/ ). This isn't to replace grep or ripgrep or silver searcher, those are all great tools you should have! Septum is neighborhood based (context-based) search, so you can find contiguous groups of lines which contain specific things, but exclude other things. It's also interactive so you can add…
Looks pretty awesome! Will definitely give a try! Wish to hear why did you choose to use Ada?
I wrote an article for these folks which includes some of the rationale here: https://blog.adacore.com/ada-crate-of-the-year-interactive-c...