[Sussex] Code-writing methods

linux at oneandoneis2.org linux at oneandoneis2.org
Thu Nov 16 15:16:01 UTC 2006


Evening all,

fed up with being a non-coder, I'm making a determined effort to learn  
C. So far so good in most ways: I'm working my way through the  
renowned K&R book and so far I've managed to accomplish all the  
excercises.

I noticed I wasn't doing much commenting, and that having uncommented  
code was making life more difficult, so I switched from "writing code  
& trying to comment it properly" to "writing comments on how the code  
should be written, and then writing the code in afterwards" - which  
has so far made life a surprising amount easier.

I don't want to keep reinventing the wheel in terms of working out  
ways of effectively writing & commenting code, but all the guides on  
writing seem fond of saying "write legible, well-commented code"  
without bothering to advise you on how to do so.

So if anybody has any advice, or links to pages that they'd recommend  
reading, or even suggestions on good books to read on the topic, I'd  
greatly appreciate hearing them: I've established that how you write  
the code can make a big difference as to how easy it is to write the  
code, now I'd just like to work out what the best ways are to do such  
writing.

Cheers!

Dominic




More information about the Sussex mailing list