U
U
Urukhayy2015-06-20 18:43:06
IDE
Urukhayy, 2015-06-20 18:43:06

What methods do you use to quickly find a site in a project with hundreds of thousands of lines?

What methods do you use to quickly find a site in a project with hundreds of thousands of lines?
For example, for CTR + F you have a request for comments or names of functions, or maybe variables?

Answer the question

In order to leave comments, you need to log in

8 answer(s)
G
GavriKos, 2015-06-20
@GavriKos

With the right architecture, no special tools are needed. It is enough to understand what is being searched for - and the answer "where it can lie" will come by itself.

M
Maxim Kudryavtsev, 2015-06-20
@kumaxim

1) Ctrl + F
2) PHPStorm can automatically jump to the function definition
3) Debugger
If we are hardcore, then any hex editor

N
nonlux, 2015-06-20
@nonlux

vim+grep/ack+g]

A
Anatoly Medvedev, 2015-06-21
@balamyt92

Such a task in the process of working with your / working projects should not arise. When editing someone else's, for starters, you should familiarize yourself with its architecture, and there already, with the correct architecture, such tasks should not arise.
If this is not the case, then in the logic of the architecture there is a jamb (at least in terms of its perception by a person), and the code is written for people, and not for the compiler, this must be taken into account.

R
Ramil Khamitov, 2015-06-20
@qwertyppp

ctrl+f

V
Vitaly Pukhov, 2015-06-21
@Neuroware

a hundred thousand lines in a normal project do not lie in 1 file, in my work I use notepad ++ with its search in a folder
, the output is an array of lines with a substring, most often you can determine from them whether this line is or not, even if there are several thousand of them.

M
Mrrl, 2015-06-21
@Mrl

Go to definition and Find all references in Visual Studio. Less often - search for a function name or a string throughout the solution.

J
justaguest, 2015-06-30
@justaguest

grep with regular expressions and a little bit of ingenuity is the best set of tools.
I speak as a person who often had to look for something in huge projects, about which only their purpose was known in advance, and the programming language used.
Live example: just yesterday I finished writing a term paper, where as a practice I fixed a small bug in the GUI of the Yi text editor in Haskell (in which I understand a little below average at the time of writing these words) . Since I don't know the architecture, the API, and there isn't a word about the editor's interface in the existing articles, most of the work looked like this:

  1. Enter the directory where, based on its name, the part of the code that intrigues me is supposed to be located
  2. Going backwards, ask yourself how the part that interests me now could be implemented
  3. Find key points in your reasoning, translate them into keywords that could be mentioned in variable / function names, comments, partially or completely
  4. grep keywords through the code, and run your eyes along the available lines; especially interesting moments to view by opening in a text editor
  5. Ask if I have collected enough information to understand the problem and a possible fix; if not, goto §2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question