The New C Standard
derek_farn writes "At a very late stage Addison Wesley decided not to publish my book, 'The New C Standard: An economic and cultural commentary'. Now that the copyright issues have been sorted out I am making the pdf freely available. You can download the pdf (mirror 1). The organization is rather unusual in that the commentary covers each sentence of the C Standard (actually the latest draft of C0X, excluding library) one by one (all 2022 of them). One major new angle is using the results from studies in cognitive psychology to try and figure out how developers comprehend code. The aim being to try and produce some coding guidelines that reduce costs (ie, reduce the time needed and bugs created). The book also contains the results of lots of measurements (over 400 figures and
tables) in an attempt to back the arguments being made -- another unusual feature since most software related books don't publish any figures to back up what they say. Other subsections discuss common implementations and differences between the latest draft standard and C90/C++. More background on the project is available from the Inquirer.
This seems to be an interesting topic. I'm sure you could sell a few copies on Amazon...
When you die, on your deathbed, you will receive total consciousness. So I got that goin' for me, which is nice.
C is over with already, geez. Slow, cumbersome, and nobody has a compiler for it. You should be switching to Java by now. It's fast, portable, and the JVM is everywhere. The Novell JVM is the fastest. Dennis Ritchie's time is past. Let the dinosaur turn into oil already and upgrade to the technology that will take us into the 22nd century and beyond. JAVA!
There is another mirror of the pdf here thanks to the folk at mirrordot.
...going to another publisher?
I used to be a development editor (10-15 years ago) - a real one; i.e. a software developer recruited to improve developer-level books, not a editor carrying the title. I would have been interested in providing up-front assistance to you and helping you get it ready for someone else. Most of the non-textbook (IDG, Que, SAMS, etc.) publishers prefer to have things come in chapter-by-chapter so things can be directed along the way, but with feedback prior to submittal, you could have gotten around that. You could have made some money that way.
So maybe it is a guideline to hobby C coders, new learners, anyone who doesn't use C as professional??
I think there is a target audience, perhaps you don't fall in the category but that doesn't mean that everyone who dabbles with C is Uber-Geek..
-if at first you don't succeed, stay the heck away from paragliding.
Good grief. I can see why the publisher bailed on this. I wonder how much they would have had to charge for it?
-Mark
This is ANSI C. It gets refreshed every so often to incorporate some changes. One of the easiest changes to spot is the following...
for(int i = 0; i MAX_COUNT, i++ )
In the olden days, you'd have to declare i before using it in the code. The newer standards let you declare variables at their first use. This serves to clean up the code a little and also lets the programmer see what type it is without having to scroll up to the top of the function.
There's lots of other little changes like that in the various "standards".
Remember, You are unique...just like everyone else.
1616 pages....
- AMW
That's the number of the beast multiplied by 2.426! Incredible!
I don't know if I trust a style guide with "The New" in the title. Nothing stays new forever.
What about when the next version of C comes out?
You'll have to go back a revise the title! Why not do it right the first time and call it "C90/C++ Style" or something.
Maybe times when cleaning up other people's files I have run into files with "new" in the name... dated years ago. A sure sign it can be deleted.
Computers don't comprehend code, they just run it. Comprehension is an entirely different act than execution. While we build up our comprehension one line (or word) at a time, we're still using our recollection of all previously related code to understand what this new piece of code does. And then, once we think we understand what's going on, I think we often mentally throw out the code itself, and just remember what it does.
Right, or someone like me, who is young yet fairly competent with C. As a style guide/commentary I see no harm in Mr. Jones sharing his insights. What college grad wouldn't benefit from the teachings of experience.
sig
I don't think this C-thing is going to catch on. :)
"I'd rather be a lightning rod than a seismometer." -Ken Kesey
It seems that some men love C0X, but most men want nothing to do with C0X. The men that like C0X say there's nothing like the feel of the thick C0X standard in your hands.
"I would say that 99 per cent of what my father has written about his own life is false." - L. Ron Hubbard Jr.
Also, choosing to make deep commentary on the suitability of a computer language as a tool for solving problems but then going light on the dominant OO languages is just too big an omission. e.g. on pg 24: Since we all mostly program in OO paradigms these days, the author's perspectives on C++, though they would lengthen an already long book, should have been prominently featured instead of downplayed.
SLASHDOT: news for people who can't concentrate on work or have no life at all and got tired of yelling back at the TV.
You could have published your book yourself through booksurge, and sold it on Amazon.com. At least that way, you'd actually get payed for all the work you did on it.
Since when did operating systems become a religion?
Sure, here ya go.
http://puffin.tamucc.edu/cbook1_0a.pdf.torrent
What you really need is a new language.
Before modding me down, think about it. Any programming language is about solving problems, and problems you solve today are different from the ones someone had back in the days of C creation. Moreover, the ways you deal with programming changed as well. IT industry needs new languages, including low-level and compiled ones.
No. This is obviously the NEW C standard they've been talking about. I haven't read the article, but clearly they've loosend up on punctuation. Also, any comparisons to directives starting with MAX must automatically default to a "less than" comparison.
"I'm not impatient. I just hate waiting." - My Dad
The book's homepage can be found here: http://www.knosof.co.uk/cbook/cbook.html
Yea, C is a dead language. Which explains why it is also the most widely used programming language, and why there are more lines of code in active use than any other programming language.
People could try ordering from Amazon, the ISBN number is 0201709171. Perhaps Addison Wesley will change their mind if enough order are received.
Have you considered making the book available through http://www.lulu.com/? It's a print-on-demand service that allows people an easy way to get a properly bound printed copy of your book, and for you optionally to get some money for your efforts. No cost to you to get set up either.
No, I don't work for lulu or have any financial connections to them. I just know one of the guys that works there (Jeremy Hogan, formerly from Red Hat).
Not counting the citations at the end, the book is 1,577 pages of "guidelines." Who's got that kind of time for a hobby? Who, having a job as a programmer, even has the time to read a book like that?
How about somebody writing a book called The New Writing Standard for Books on Programming? Most of the programming books I own are unecessarily long winded, but this book takes the cake!
quiquid id est, timeo puellas et oscula dantes.
I havent read the book. But some thoughts on that post:
The aim for C should not simply be to reduce the time spent on code, the simplistic economic view. Leave that to Java. C is for a clear and thorough understanding of the code's execution, more so than C++. The execution flow can very clearly be seen in this structured language which does not try to be smart or do things behind the wall in the compiler. C is brutal and raw, therefore low level and powerful. Leave it to that. C is great for kernel level programming, drivers and embedded systems, and other places where you get anal about control over whats happening. C is awesome when you need to mingle the code with assembly in tight spots and still keep things readable.
Please do not turn it into Java. Programmers who need to spend less time can just use Visual Basic or equivalents.
I like the idea of commenting on all parts of the standard. But you said you used a cognitive analysis of some sort. More so than that, I'd look for comments from experienced developers, maybe people who worked on various kernels and drivers, integrated various languages with C, developed C libraries and worked on a hundered-file projects.
"Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
I've only been skimming it for a little bit now, but this book seems extremely interesting.
It probably would have gotten a lot more love during editing by the publisher, as, IMHO, it's fairly difficult to approach and digest in its current form. Maybe I just don't get it yet, but it does seem to suffer a bit due to its organization.
That said, the information in here is absolutely enthralling. I went over a few of the more subtle parts of the standard that I know fairly well, and I was impressed. The explanations are good, but what I really find compelling are the examples, historical anecdotes, references to different machines and architectures, and juxtapositions with other languages. You can tell that this guy knows this stuff, but more importantly, he's *lived* it.
The comments about this book not being useful to a "good C programmer" completely miss the mark. A good C programmer -- one that has a true love for programming -- will most likely find this book captivating.
At a glance, this is impressive not so much for content as for format. In essence this book is a Talmudic http://en.wikipedia.org/wiki/Talmud breakdown of interpretation.
Now that the copyright issues have been sorted out...
As I was reading this sentence, my heart stopped and my mind jumped for joy. I thought the RIAA/MPAA/etc. had finally given up, congress had rolled back copyright terms, and the GPL was finally successfully tested in court.
Then I read the rest... *sigh* oh well.
I'm up to page 132, and so far, it's an introductory cognitive psychology text. A bad one.
There are 1616 pages of this drivel. Even for someone interested in programming language design, this is a painful read.
There's room for a good book in this area, but this isn't it. A more useful approach might be to start from Amit Yoran's statement that "About 95% of software bugs come from 19 common, well-understood" programming mistakes", and evaluate language designs against that.
Apparently, there were objections from Microsoft when DHS started to point out that Microsoft was the problem. What's left of the "National Cyber Security Division" actually seems to be CMU's CERT plus a front man, Andy Purdy, in Washington.