[Asterisk-Dev] readable code /* New subject */
Robert Webb
asterisk at ropeguru.com
Wed Mar 2 08:21:59 MST 2005
On Wed, 02 Mar 2005 16:01:56 +0100
"Olle E. Johansson" <oej at edvina.net> wrote:
> Preston Garrison wrote:
>> You know something that is highly overlooked is learning
>>to write
>> understandable code. Alot of programmers like to write
>>code that is a
>> mess to understand. Just because you can do something
>>in the C language
>> doesn't mean you should :) However i have to admit out
>>of all the open
>> source projects, asterisk has some of the easiest to
>>understand code.
>>
> Great. That statements tells me we are heading in the
>right direction.
>
> Let's make it better by adding more comments and
>developer
> documentation. Personally, I've added quite a lot of
>comments to chan_sip in order to understand it better.
>Also to other modules as I explore them. Funny part was,
>some of my comments that was commited to cvs was totally
>wrong and no one seemed to bother (or propably did not
>understand the code themselves). So I've changed them as
>I have learned
> more about the inner workings. :-)
>
> As I wrote earlier, let's clean up 1.2 and make it easy
>to understand and easy to work with. Join the
>asteriskdocs project. Fix errors in
> README files and sample configs. Add comments. Add
>doxygen documentation.
>
> You will not get customers to pay for this, but it will
>make it much easier the next time your customer wants a
>customization of some kind.
>
> /Olle
Not intending on hijacking this thread, but since it is
talking about readable code and such...
What would you guys/gals out there recommend as a good
primer for learning C that will teach the correct way of
coding from the beginning. I would like to understand more
of what the code is about, how it works, and maybe in a
year or so be able to contribute a little more.
I have an IT background in hardware, networks, some
database, but no real programming. Can pick my way through
something that is already written if I have a handy
reference available.
Feel very free to send all comments off line and not to
the thread if you wish..
Robert
More information about the asterisk-dev
mailing list