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.
There is another mirror of the pdf here thanks to the folk at mirrordot.
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
for (int i=0; i{...
}
Missing '<'
Comma instead of Semi-colon
Incomplete statement
The bonus question is: what is the lifetime/visibility/scope of 'i'?
Sure, here ya go.
http://puffin.tamucc.edu/cbook1_0a.pdf.torrent
The GP undoubtedly put a less-than operator in there, but Slashdot tried to interpret that as an html tag. And as another poster mentioned, it should be
for(int i = 0; i < MAX_COUNT; i++)
Tech, life, family, faith: Give me a visit
Wait no more
Philosophy.
C is by far the most commonly used programming language in the embedded systems world. Right now there are more embedded systems programming projects (and jobs) than their are conventional PC programming jobs. Thus, knowing C is a good thing.
The book's homepage can be found here: http://www.knosof.co.uk/cbook/cbook.html
Only novice programmers do this; experienced programmers have richer mental models, and many more ways of comprehending code. There's a lot of research on this already.
The psychology of programming is an entire field of study which attempts to understand everything from simple code comprehension to team dynamics in software engineering groups.
"Programming by Example" languages do this, as do declarative ones.
That's what domain-specific languages, such as SQL, have been doing for a generation. Even HTML is like that -- it describes some content and structure, and it's up to the browser to do the heavy lifting of presenting it to the user, and letting them interact with it.
I thought so too... but couldn't see it on the list of old articles in the Developers section. It turns out we saw this as a comment in another thread...
http://slashdot.org/comments.pl?sid=152597&thresho ld=1&commentsort=0&tid=192&tid=188&mode=thread&pid =12806613#12807826
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).
Gotcha... Modded as interesting... Ever heard about rational numbers? ;)
The decimal expansion of a rational number is eventually periodic (in the case of a finite expansion the zeroes which implicitly follow it form the periodic part). The same is true for any other integral base above 1. Conversely, if the expansion of a number for one base is periodic, it is periodic for all bases and the number is rational.
You don't know what you are talking about.
XML causes global warming.
> You could also consider "self-publishing"
Right on! You can get a run of 1000 copies of a soft cover book printed by someone like BookMasters for $5K or so, even for a monster like this one. Just stick with a 4 color cover and black/white in the text. And if you can charge $40 or so for this tome, you can cover your printing costs after selling only 150 copies.
[plug]
That's what I'm doing with PMD Applied; seems to be working out well so far.
[/plug]
The Army reading list
Using <, >, and &, along with consistent use of the Preview button, you can quote what you need to get it to work.
Know thy tools.
If that kind of thing matters to you, you should look at Common Lisp. The built-in programmable parser is powerful enough to parse all CL programs and is configured to do so by default. Defining source-to-source transformations with DEFMACRO is an important technique
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.