Live data from Hacker News

Ask HN: How do you search large codebases before adding a feature or fixing bug?

news.ycombinator.com

81–87 of 87 posts

Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?

#81

I 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…

Wow, great work!

Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?

#83

Tools I use: - grep - ag - Same as grep, but faster! - find - when looking for a file by name - helm (an epic Emacs package which does interactive search) Used to work at a Windows shop and we used Entrian in visual studio. That was pretty good, bust closed source and a pain to setup.

How do you get those tools to work with git branches? We use bitbucket at work which goes out of its way to stink regarding search. But I personally find it hard to find some code in some branch of some repository that uses x.

Honestly I never really needed to search across multiple branches*. What I want to find is usually in master or in my own dev branch. Sometimes though I need to search older versions of the code and I always find `gitk` useful for that.

* Except at the windows shop where Azure Devops would provide ways to search multiple TFS branches of our product. Life is much better in companies where the master branch is the source of truth and you don't have to maintain different branches.

Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?

#84
post #80

I made a web site that catalogues how various companies/projects use code search: https://codesearchguide.org/story/google https://codesearchguide.org/story/facebook https://codesearchguide.org/story/brave https://codesearchguide.org/story/chromium-android https://codesearchguide.org/story/linux https://codesearchguide.org/story/yelp https://codesearchguide.org/story/stripe The Google one in particular has a great br…

Interesting, Amazon had a meh internal code search, much better than current GitHub tho.

Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?

#85
post #80

I made a web site that catalogues how various companies/projects use code search: https://codesearchguide.org/story/google https://codesearchguide.org/story/facebook https://codesearchguide.org/story/brave https://codesearchguide.org/story/chromium-android https://codesearchguide.org/story/linux https://codesearchguide.org/story/yelp https://codesearchguide.org/story/stripe The Google one in particular has a great br…

Interesting, Amazon had a meh internal code search, much better than current GitHub tho.

Would you (or anyone else) be willing to write up a page for that site to document what Amazon's internal code search is like (from publicly available sources)?

Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?

#86
post #85

Earlier quoted context omitted.

Interesting, Amazon had a meh internal code search, much better than current GitHub tho.

Would you (or anyone else) be willing to write up a page for that site to document what Amazon's internal code search is like (from publicly available sources)?

Im not sure much is public info. I'm not there anymore but perhaps someone who is can.

Its called GitFarm and had a web UI where you could search with a few different operators, like exact word, path, file extension. They kinda half implemented searching by class name just for Java too. Another thing, you couldn't add a NOT, or exclude certain filepaths, which was annoying especially when ppl would accidentally commit node_modules. Overall, it wasn't too bad buy feels like it had kinda stagnated recently (KTLO).

Re: Ask HN: How do you search large codebases before adding a feature or fixing bug?

#87
I should add small point for a story, you pobably wont not realize right solution after initial research. please use expert to check prepared idea and repeat on fail:

1. search with advanced tools or scripts that you wrote to find concrete answers in the code. 2. draw graph of knowledge what youu have, steps, undersand how these knowledge may help to resolve an issue. 3. go to reviewer with the plan. 4. if expert make dicision you plan will not work, then repeat step 1. 5. you may implement fix for an issue.

Post reply on HN