digitalmars.D.learn - How would you dive into a big codebase
- Freddy (1/1) Oct 21 2014 Is there any advice/tips for reading medium/big D codebases?
- Jonathan M Davis (8/9) Oct 21 2014 I'm not aware of there being anything about D which makes it any
- Nicolas F (14/17) Oct 22 2014 This is how I usually do it too, though you don't even need to
- safety0ff (5/6) Oct 21 2014 Somewhat D specific: I would consider an IDE/editor like Eclipse
- Paulo Pinto (7/13) Oct 22 2014 This would be my approach as well.
Is there any advice/tips for reading medium/big D codebases?
Oct 21 2014
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.
Oct 21 2014
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 itThis 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.
Oct 22 2014
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.
Oct 21 2014
On Wednesday, 22 October 2014 at 02:42:38 UTC, safety0ff wrote:On Wednesday, 22 October 2014 at 01:21:19 UTC, Freddy wrote: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". -- PauloIs 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.
Oct 22 2014