View Single Post
Old 07-12-2012, 06:09 PM   #148
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
Quote:
Originally Posted by twobob View Post
This NOW TESTED init code is simply boiled out of Alsa init code example.
Looks straight out of the GM Style Manual. (Horrible)
Yes reader, you read that correctly, that is a criticism.

- - - -

Allow me a few words in support of my opinion to any one posting example code at this site - -

* Consider the audience here;
With a few dozen exceptions, the readership here has little technical knowledge and little or no programming experience.

* Consider the image you project;
Does not all of those hours, over all of those years, learning the art and science of programming, deserve a better representation?

* Consider the society that gathers around a hobbyist forum;
Members of a society, even an electronic society, form a community of like-wise behaving members.
So like it or not, publishing here puts a person in the role of "Leadership by Example".
Does not the time and effort that goes into solving a problem and presenting a solution earn itself a more professional example?

* If personal considerations require an extremely compact representation of program code, is that any excuse for not running the result of your hours of long, hard, work through any one of many source formatting routines before publication?
Let the glory of your solution shine in comprehensible code. Do not publish for bragging rights to how much whitespace you can eliminate or how many statements you can squeeze on a line.
Publish in a style that you can be proud of, for others to see how much pride you take in your own efforts.

* There are specialized sites for this style of programming, such as: http://www.ioccc.org/
and their list of winners (with the *.c files posted): http://www.ioccc.org/winners.html
go post your obfuscated code on their site.
knc1 is offline   Reply With Quote