Guide to Software development in C

T

teachtiro

Hello,
I need some guidance in taking a step forward into being a good open
source developer. I have knowledge in c programming. Now, i wanna be
part of open source community, but when we take a product the source
code is very huge, there must be some kind of documentation on which
function does what and what it relies upon. Are there some procedures
followed by open source development community to make it easy for
others to understand the source code (sure, this is not something
restricted to open source, every development team must be doing this),
as an e.g. consider a command in linux, i would like to edit how it
behaves, how should i proceed.
one way, for e.g., is to use 'find' to look for the function, but iam
expecting more clear way of doing than that.

I would be happy if someone can point me to a guide which teaches
open source development basing on programming skills in C (teach which
tools to use finding particular function of a program, debugging etc)

-tiro
ps: Some might be unhappy with the forum i chose for putting this
question, but , i did it due to the impression that this forum has a
lot of software developers and they could provide me guidance.
 
E

Erik de Castro Lopo

Hello,
I need some guidance in taking a step forward into being a good open
source developer. I have knowledge in c programming. Now, i wanna be
part of open source community, but when we take a product the source
code is very huge, there must be some kind of documentation on which
function does what and what it relies upon.

The source code is the documentation.
Are there some procedures
followed by open source development community to make it easy for
others to understand the source code (sure, this is not something
restricted to open source, every development team must be doing this),
as an e.g. consider a command in linux, i would like to edit how it
behaves, how should i proceed.
one way, for e.g., is to use 'find' to look for the function, but iam
expecting more clear way of doing than that.

Try cscope or source navigator.

Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo (e-mail address removed) (Yes it's valid)
+-----------------------------------------------------------+
Microsoft is finally bringing all of its Windows operating system families
under one roof. It will combine all of the features of CE, stability and
support of ME and the speed of NT.
It will be called Windows CEMENT...
 
A

Allan Adler

I have a similar problem, except that I'm not good enough at programming
to think of contributing any free software. I do sometimes try to understand
programs by looking at their source code. One can get a certain amount from
the comments in the programs and from documentation accompanying the program.
One can also get a lot of mileage from knowing the basic algorithms that
are used in that kind of program, e.g. a compiler.

One other place you might post is comp.programming.literate. If you admire
what Knuth did with TeX, the TeXBook, TeX the Program, the METAFONT Book,
METAFONT the Program, and numerous literate documents for programs, including
CWeb itself, as I do, that might be a good forum. It might not necessarily
help you read the source code you are presently interested in, and it might
not convince anyone to adopt literate programming who doesn't already do it,
but by using it in your own programs, you might make life easier for others
who want to build on what you do.

I had the experience of trying to convert someone else's FORTRAN program
into a literate program, as a way of trying to understand what the program
did. It was a lot of fun and I learned a certain amount, but it was an
enormous amount of work. I'm advised that some programmers might also
resent having their programs revised as literate documents, or at least
might not appreciate it. But as a way of educating yourself, why not?
 
K

kleinecke

Allan said:
One other place you might post is comp.programming.literate. If you admire
what Knuth did with TeX, ...

The problem with comp.programming.literate is that they are committed
to what Knuth called literate programming rather than to the broader
problem of making programs less write-only. From his comments, I
believe that Knuth himself would have welcomed any suggestions along
these lines and, at least initially, only offered one approach as his
contibution.

The biggest problem with doing human-readable code in C is, in my
opinion, its commitment to one pass compilers. I cannot find any place
in the standard that obligates the compiler to be one pass. But, given
that everything must be defined before it is used, it is very tempting
to build a one-pass compiler.

But defining everything before it is used is exactly backwards if you
program in anything resembling structured fashion. If you are like me
you program in a way that comes naturally and then put it into the
source program backwards.

So I face a dilemma. If I write a declare-first source program it is
hard for other people to understand what I am doing and it is harder
for me to write. But if I write a declare-later source program I
violate the standard. In my case I wrote a little pre-processor that
read the source in my preferred order and reversed it into standard
order.

The down-side is that if you make changes, and I make LOTS of changes,
you either must work with the standard version or keep running the
pre-processor.
I never got around to writing the IDE that is obviously needed. And
even that would not help the reader unless I distributed the IDE and
every body had a copy.

C has potential for reader-friendly programming. But the standard would
need to be changed. One approach would be to give up define-first.
Another would be to specify an order-changing pre-processor.
 
A

Allan Adler

Allan said:
One other place you might post is comp.programming.literate. If you admire
what Knuth did with TeX, ...

The problem with comp.programming.literate is that they are committed
to what Knuth called literate programming rather than to the broader
problem of making programs less write-only. From his comments, I
believe that Knuth himself would have welcomed any suggestions along
these lines and, at least initially, only offered one approach as his
contibution. [snip]

I'm not sure, since I have a lot of trouble understanding what you
have written, even though it is in perfect English, but I think you
are saying you aren't interested in literate programming and therefore
don't consider it a solution to the problem you are interested in, namely
how to write C programs, instead of CWeb programs, and to make them readable.

Do I have that right?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top