For Programmers: Free Programming Magazines  


Home > Archive > Open Source Software > December 2006 > How to read source codes and benefit from them?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to read source codes and benefit from them?
Tony

2006-12-11, 7:19 pm

Hi,
I've heard that reading some source codes of not-so-large
softwares will help one improve his programming skills. But I don't
know how to read source codes. The codes run line after line....
Any ideas about it? Thank you all!

Fizzy Wilber

2006-12-11, 7:19 pm

Well, stating the obvious, first of all you have to be able to program a
bit in a given programming language. then you look at an app you like
that was written in that programming language, decide which bit of it
you want to see 'how it was done', track that section down in the source
code and review it.

You have to get to grips with each of the reserved words that have been
used in the section of code you want to learn about, and also the
function calls. There are two types of function calls, those that are
part of the language or libraries used by the application, and those
that have been written by the programmer and exist in the source code
somewhere.

The reserved words and library function calls can be looked up in
documentation or help somewhere, the other functions you have to figure
out by repeating the process described above on those functions in turn,
and so on.

That gets you to grips with the syntax etc and purpose of the reserved
words and the functions, both home-grown and library or language based,
all that remains is to figure out the program flow or logic of the
section of code.

It is worth it! You can pick up some great techniques doing this.

Tony wrote:
> Hi,
> I've heard that reading some source codes of not-so-large
> softwares will help one improve his programming skills. But I don't
> know how to read source codes. The codes run line after line....
> Any ideas about it? Thank you all!
>
>

Tony

2006-12-11, 7:19 pm

Thank you for your advice! But I think I'm quite beyond that stage of
learning reserves or things like that. What I want to know about is
like apache Tomcat or something a little smaller. To be exact, some
medium scale systems that are well designed. Do you have any advice for
that?

Fizzy Wilber

2006-12-11, 7:19 pm

To be honest, no. It depends on what you want to learn, what area of
programming technique you wish to see being used etc. Perhaps start
with standalone apps and then work up the scale?

Tony wrote:
> Thank you for your advice! But I think I'm quite beyond that stage of
> learning reserves or things like that. What I want to know about is
> like apache Tomcat or something a little smaller. To be exact, some
> medium scale systems that are well designed. Do you have any advice for
> that?
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com