[Asterisk-Dev] readable code /* New subject */

Steve Kann stevek at stevek.com
Wed Mar 2 09:08:00 MST 2005


Robert Webb wrote:

>
> 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.
>
If there are 10,000 books on C available, there's 9,999 too many.  The 
correct book is:
*
C Programming Language (2nd Edition)*
by Brian W. Kernighan 
<http://www.amazon.com/exec/obidos/search-handle-url/index=books&field-author=Brian%20W.%20Kernighan/102-7188933-0904141>, 
Dennis Ritchie 
<http://www.amazon.com/exec/obidos/search-handle-url/index=books&field-author=Dennis%20Ritchie/102-7188933-0904141>, 
Dennis M. Ritchie 
<http://www.amazon.com/exec/obidos/search-handle-url/index=books&field-author=Dennis%20M.%20Ritchie/102-7188933-0904141>

http://www.amazon.com/exec/obidos/tg/detail/-/0131103628/qid=1109779472/sr=8-1/ref=pd_bbs_1/102-7188933-0904141?v=glance&s=books&n=507846

-SteveK




More information about the asterisk-dev mailing list