Discussion:
How would you dive into a big codebase
Freddy via Digitalmars-d-learn
2014-10-22 01:21:18 UTC
Permalink
Is there any advice/tips for reading medium/big D codebases?
Jonathan M Davis via Digitalmars-d-learn
2014-10-22 02:09:52 UTC
Permalink
Post by Freddy via Digitalmars-d-learn
Is there any advice/tips for reading medium/big D codebases?
I'm not aware of there being anything about D which makes it any
different to dig into a large codebase than it is for any other
language. The usual suggestion that I've heard given (without any
particular language in mind) is to start by tracking down and
fixing a bug in it, though if the codebase isn't too large for
it, personally, I'd be highly tempted to just read through it
all. I don't think very many people function that way though.
Nicolas F via Digitalmars-d-learn
2014-10-22 07:23:20 UTC
Permalink
On Wednesday, 22 October 2014 at 02:09:53 UTC, Jonathan M Davis
Post by Jonathan M Davis via Digitalmars-d-learn
The usual suggestion that I've heard given (without any
particular language in mind) is to start by tracking down and
fixing a bug in it
This is how I usually do it too, though you don't even need to
find a bug in it. Picking any feature and trying to find it in
the codebase and understand how it is implemented will usually
serve well as an entry point. To understand all of the code, I'd
start taking notes though, as they're useful to fall back on
later.

Either way, I wouldn't try to swallow all of it before starting
to work with the code. I've been working on codebases just fine
without understanding them in their entirety, as such is the
magic of code separation. I'm pretty sure there are real
codebases in the wild where nobody understands all of it. X11
comes to mind.
safety0ff via Digitalmars-d-learn
2014-10-22 02:42:36 UTC
Permalink
Post by Freddy via Digitalmars-d-learn
Is there any advice/tips for reading medium/big D codebases?
Somewhat D specific: I would consider an IDE/editor like Eclipse
with DDT that can give an outline of the data structures &
functions names in a source file to make the files easier to
digest.
Paulo Pinto via Digitalmars-d-learn
2014-10-22 07:38:47 UTC
Permalink
Post by safety0ff via Digitalmars-d-learn
Post by Freddy via Digitalmars-d-learn
Is there any advice/tips for reading medium/big D codebases?
Somewhat D specific: I would consider an IDE/editor like
Eclipse with DDT that can give an outline of the data
structures & functions names in a source file to make the files
easier to digest.
This would be my approach as well.

The code navigation options offered by modern IDEs are way better
than the alternatives, specially the semantic navigation "what
gets used where".

--
Paulo

Continue reading on narkive:
Loading...