6

I want to understand an existing project to improve myself more, but I am not sure if the project would be overwhelming for me or not. I am not sure if I am capable of understanding it. I even think that I will fail. When I look at projects at a glance, it makes me feel scared to see thousand line of codes.

I don't even know where to start reading code. Do I have to follow by debugging or is there something else? Can you please guide me in this situation? I am totally getting confused at the start.

Edit : A few thing to specify about my question.

I know C# language and I have learned some WEB technologies like ASP.NET, MVC 2, and Web Forms but I am sure there still will be many thing which I don't know. I label myself as beginner but it is just because of a lack of professional experience in this area. But my OOP understanding is good enough. I am wanting to improve myself on WEB, so I am looking for WEB projects like blog engines which are simpler than others for starting.

Freshblood
  • 1,515
  • 10
  • 23
  • 1
    I... what? What is the project? What is the project for? Do you even know the language? Actually how large is the project? – TheLQ Oct 12 '10 at 21:09
  • TheLQ - I asked the question generaly so there is no a project deceided yet but there are some candidate. I am trying to improve myself on WEB.And yes i know language and my knowledge about my language is good. – Freshblood Oct 12 '10 at 21:11
  • 2
    Please edit your question and add more details on your background, the projeçt you are talking about and other information that should help us answer it correctly. Thanks –  Oct 12 '10 at 21:11
  • But stating clear question is like doing 50% of the answering job. Here is 25% for start. Question must include the word like "Who", "Why", "When", "Where", "How", "What", "Which". choose one. –  Nov 14 '10 at 02:56
  • There should to be some general line for advice something. It would to be localized question if i would say all details.But also question can be improved with some details but it is still ok by my side. – Freshblood Nov 14 '10 at 14:02
  • Possible duplicate of [How do you dive into large code bases?](http://softwareengineering.stackexchange.com/questions/6395/how-do-you-dive-into-large-code-bases) – gnat Feb 18 '17 at 20:26

4 Answers4

8

Best is to start off by fixing bugs. Start with small bugs. Fixing the first bug is a big milestone. Because when you do that, you already know how to edit version controlled code, build it, understand the desired functionality and test it. You also know the conventions used, libraries available, idiom/riffs used, debugging techniques, coding style/conventions of the project, overall code organization, the bug tracking system used etc.

Do not be overwhelmed by the size of the project. Start small. Start with easy bugs. Ideally your mentor should assign something simple enough to get you familiar with your development environment. Then move on to small features, in modules that you are already familiar with. Then you can move on to more complex bugs or move to adjacent modules. In time you will be able to think in bigger chunks of the project and the size will suddenly seem smaller.

aufather
  • 4,449
  • 2
  • 26
  • 24
2

A few tacts I've used for diving into an existing codebase:

  • Read any high-level documentation you can find on the project, and/or try to get an overview of how things work from someone else working on the project.
  • Trace a few function calls though the code and see what happens. Try to pick something that looks like it hits at least a few major subsystems.
  • Try to implement some simple functionality. It'll probably take a while and a lot of digging through code, but it's a good way to start understanding the code.
  • Try to diagram the system at a high-level, or an important subsystem at a slightly lower level. A uml-ish class diagram or sequence diagram will work. The process of reading the codebase to construct such diagrams can be very educational.
Fishtoaster
  • 25,909
  • 15
  • 111
  • 154
-1

begin many paths:

  • from inputs: places a user/client launches the application
  • external system : tables on databases, other projects the one you're learning uses
  • diagrams if possible (meaning: if you have any)
  • core business (ask for what's the app supposed to do)
Belun
  • 1,314
  • 8
  • 15
-3

My favorite key when working with a project that I've either had from inception to deployment or just looking at an example is F12. In most IDEs I'm aware of, it traces the object, method, or other bit of code to its source if it's user-defined. System language files display a header/interface, depending on which language you're working with. If the files are organized well, F12 will show you an order by which methods travel through the stack, which helps superbly with debugging.