Thread overview | |||||||
---|---|---|---|---|---|---|---|
|
October 22, 2014 How would you dive into a big codebase | ||||
---|---|---|---|---|
| ||||
Is there any advice/tips for reading medium/big D codebases? |
October 22, 2014 Re: How would you dive into a big codebase | ||||
---|---|---|---|---|
| ||||
Posted in reply to Freddy | On Wednesday, 22 October 2014 at 01:21:19 UTC, Freddy wrote:
> 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.
|
October 22, 2014 Re: How would you dive into a big codebase | ||||
---|---|---|---|---|
| ||||
Posted in reply to Freddy | On Wednesday, 22 October 2014 at 01:21:19 UTC, Freddy wrote:
> 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.
|
October 22, 2014 Re: How would you dive into a big codebase | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jonathan M Davis | On Wednesday, 22 October 2014 at 02:09:53 UTC, Jonathan M Davis
wrote:
> 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.
|
October 22, 2014 Re: How would you dive into a big codebase | ||||
---|---|---|---|---|
| ||||
Posted in reply to safety0ff | On Wednesday, 22 October 2014 at 02:42:38 UTC, safety0ff wrote:
> On Wednesday, 22 October 2014 at 01:21:19 UTC, Freddy wrote:
>> 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
|
Copyright © 1999-2021 by the D Language Foundation