|
From: Gregory P. <gre...@gm...> - 2015-12-03 17:35:56
|
Hi Maqbool, OK, I'll try to offer some (very) limited guidance. First, it is great that you decided to study a relatively large and real-world codebase. While studying it can be initially different, I believe it will quickly make you much better at programming. The only tools you need to study the codebase are editor/IDE, compiler, curiosity and patience. I don't think debugger like gdb is helpful for program understanding. Every large codebase have some "core" parts, and "everything else". Understanding the core is most important. If we are talking about cmus, I'd consider everything except input (mp3, flac, etc.) and output (pulseaudio, alsa, etc.) plugins as "core". So — exclude files responsible for the plugins, and start reading everything else. If your editor has a "jump to definition" function, that would be very helpful. If something is unclear, just modify the source code, recompile the program and run it! A couple of well-placed "printf"s will help you understand what (and when) is happening a lot. Let me restate this once again: there is no quick and easy way for reading and understanding the source code. You have to spend a lot of time and effort initially. But this is an excellent investment that will pay dividends during all your future career. P.S. And of course, you have to learn C first. Regards, Gregory On Thu, Dec 3, 2015 at 1:10 PM Mohd Maqbool Alam <ala...@gm...> wrote: > Hello, > > I want to learn how the program cmus works and I want to contribute. > > I have no experience in open source development and I'm a student learning > about computer science in college. > > So i tried to learn by reading code by following ways. > > I compile the program and run gdb on it so i found out that program starts > from ui_curses.c from line 2547. > inside main function it calling dozens of other functions and making > decision but my problem is how do i make sense of large codebase how do i > find which pieces of code does what. > > I need help How do i read the large code and make sense of it. > what tools should i learn so that it can help me to understand codebase. > > any advice and help will mean a lot to me. > > In short i want to know what tools you use to understand cmus how do you > read source code and able to understand what each piece code does what. > what tools do i have learn apart from C. > > I'm running Ubuntu 14.04. > > Thanks > > Maqbool > > ------------------------------------------------------------------------------ > Go from Idea to Many App Stores Faster with Intel(R) XDK > Give your users amazing mobile app experiences with Intel(R) XDK. > Use one codebase in this all-in-one HTML5 development environment. > Design, debug & build mobile apps & 2D/3D high-impact games for multiple > OSs. > http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 |