How to Explore source code

5 views
Skip to first unread message

Great Avenger Singh

unread,
Jan 14, 2015, 1:05:11 AM1/14/15
to iit...@googlegroups.com
What could be the best Method/Way to explore the source code of any
"Open source project" that how the flow of code works. I know this
could be a vague question to ask or very precise for experienced
programmers.

Please don't mention any kind of product/software to do that. If I am
not wrong there should be some kind of Algorithm/No. of general steps
to do that so any new user/developers will be able to contribute to
open source project.

Similar copy of above question can be obtained from

http://stackoverflow.com/questions/27936414/explore-source-code-of-any-open-source-project


--

Thanks
Arshpreet Singh
http://arshpreetsingh.wordpress.com/
It’s not that I’m so smart, it’s just that I stay with problems longer.
-Albert Einstein
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/

Kuldeep Singh Dhaka

unread,
Jan 14, 2015, 1:33:05 AM1/14/15
to iit...@googlegroups.com
Its simple.

understand the project.
why you are interested in it?
why contribute to that project?

get pre-requisites
hardware: get the hw and read its doc
software: learn the used language
common tools: git makefile gcc ....

look at :
README
HACKING
docs/

read blogs
talk with peoples
build from source.
dive into source.

its more like gaining experience than algorithm.

On 01/14/2015 11:35 AM, Great Avenger Singh wrote:
> What could be the best Method/Way to explore the source code of any
> "Open source project" that how the flow of code works. I know this
> could be a vague question to ask or very precise for experienced
> programmers.
>
> Please don't mention any kind of product/software to do that. If I am
> not wrong there should be some kind of Algorithm/No. of general steps
> to do that so any new user/developers will be able to contribute to
> open source project.
>
> Similar copy of above question can be obtained from
>
> http://stackoverflow.com/questions/27936414/explore-source-code-of-any-open-source-project
>
>


--
Kuldeep Singh Dhaka

Great Avenger Singh

unread,
Jan 14, 2015, 1:37:57 AM1/14/15
to iit...@googlegroups.com
On Wed, Jan 14, 2015 at 12:00 PM, Kuldeep Singh Dhaka
<kuldee...@gmail.com> wrote:
> Its simple.
<snip>
> its more like gaining experience than algorithm.

Thanks Kuldeep for reply but I am aware of such "Hit and trail" method
but i don't know why I feel there must be some specific algorithm.

Or I am talking crazy. ;)

satyaakam goswami

unread,
Jan 14, 2015, 1:44:16 AM1/14/15
to IITDLUG
On Wed, Jan 14, 2015 at 12:07 PM, Great Avenger Singh <ars...@gmail.com> wrote:
On Wed, Jan 14, 2015 at 12:00 PM, Kuldeep Singh Dhaka
<kuldee...@gmail.com> wrote:
> Its simple.
<snip>
> its more like gaining experience than algorithm.

Thanks Kuldeep for reply but I am aware of such "Hit and trail" method
but i don't know why I feel there must be some specific algorithm.

Or I am talking crazy. ;)

​its not Hit and trail this is what is experience all about . look at it this way as art and science , so yeah its an art which you learn over time and become good at it .​

​​cheers
-Satya

Phani Bhushan Tholeti

unread,
Jan 14, 2015, 2:18:48 AM1/14/15
to iit...@googlegroups.com
On Wed, Jan 14, 2015 at 12:07 PM, Great Avenger Singh <ars...@gmail.com> wrote:
On Wed, Jan 14, 2015 at 12:00 PM, Kuldeep Singh Dhaka
<kuldee...@gmail.com> wrote:
> Its simple.
<snip>
but i don't know why I feel there must be some specific algorithm.
The day we can do this!!
No two programs can be compared for equivalence - and if you can theoretically understand a program by "an algorithm", I'd use it on two programs and find out if they are equal :)
 

Or I am talking crazy. ;)
Yes. But then all ideas are crazy at start.

If you find an algorithm that can "understand code", then let us know and You can rest assured of a place next to Turing, Ritchie and other greats of comp. sci.

--
Lots o' Luv,
Phani Bhushan

Let not your sense of morals prevent you from doing what is right - Isaac Asimov (Salvor Hardin in Foundation and Empire)

Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

Chirag Anand

unread,
Jan 14, 2015, 3:32:59 AM1/14/15
to iit...@googlegroups.com
On 14 January 2015 at 11:35, Great Avenger Singh <ars...@gmail.com> wrote:
> What could be the best Method/Way to explore the source code of any
> "Open source project" that how the flow of code works.

1. Find a specific problem to solve. Look at bug-trackers, mailing
lists, or from your own requirement (works best).
2. Download the source code.
3. 'grep' the keywords.
4. Look at the header files and documentation to understand the API/functions.
5. Understand the related code.
5. Jump in and start modifying, compiling, looking at the output etc.

This is just a crude way of jumping into a project's source code if
that's what you are looking for. As other people mentioned, the better
way may be to talk to people, read blogs, figure out your interest in
the project etc. (and probably not try to find an algo). :)

HTH.

--
Chirag Anand
http://atvariance.in/chiraganand

pradeep mahato

unread,
Jan 14, 2015, 4:17:08 AM1/14/15
to iit...@googlegroups.com
If you want to find the flow of the code, you can use cscope .
http://cscope.sourceforge.net/cscope_vim_tutorial.html


--
--
Mailing list guidelines and other related articles: http://lug-iitd.org/Footer

---
You received this message because you are subscribed to the Google Groups "Linux User Group @ IIT Delhi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iitdlug+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Pradeep Kumar Mahato

kapil jain

unread,
Jan 14, 2015, 1:32:19 PM1/14/15
to iit...@googlegroups.com
for c/c++ codes, I would suggest run program with gdb, use rbreak on couple of couple of files when the breakpoints hit, use backtrace to find out the flow ,put watchpoints on couple of variables which interests you and see how the program behaves for that.
Reply all
Reply to author
Forward
0 new messages