[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exploring a code base?

From: Yuri Khan
Subject: Re: Exploring a code base?
Date: Sat, 7 Nov 2020 20:26:16 +0700

On Wed, 28 Oct 2020 at 03:56, Dmitry Gutov <> wrote:

> Speaking of Xref, we could add some new commands: to remove items from
> the list, to undo removals. And a stacking for searches, so you could go
> back to the previous search result. Not sure how much that will help.

A stack/history would be very nice, yeah. To the point that I actually
caught myself trying to press ‘l’ in xref and grep result buffers.

> I don't have a solution, personally, and I usually work in a dynamic
> language where this isn't a very feasible thing to do.

“We know that it has no solution, too. But we wish to learn how to solve it.”

I’m working in Python, which is a dynamic language. Theoretically, in
Python one does not have to declare argument and return types, and the
call graph can change its structure at run time because functions are
first-class values and because of class-based polymorphism. In
practice, my project is mostly type-annotated (with mypy
sanity-checking the annotations), and the use of polymorphism and
dynamic binding is limited.

> * uses GNU Global.
> * Here's a recipe for a graphical call graph:

Yeah, there exist many tools that attempt to take in the whole project
and generate a complete call graph. In my experience, most of the
time, for any project more complex than Hello World, the resulting
graph is too messy to be helpful.

For one thing, I am not interested in all calls, only those through
which a particular data type flows as an argument or [part of] the
return value. This subgraph is smaller and simpler, and actually has a
chance to embed into a plane without many edge intersections.

Eric S. Raymond once wrote up[1] the difference between automatons
(programs that attempt to solve the problem fully without human
involvement) and judgment amplifiers (programs that help the human
solve the problem by automating parts of the process). I think I’m
looking for a tool in the latter category.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]