K&R2 Still good?

C

Charlton Wilbur

RH> The question you have to ask yourself is this: which do you
RH> want to do? Explore the transient delights of the latest
RH> trendy language or protocol.... or learn how to write computer
RH> programs properly? If the latter, then - whilst it's not
RH> *impossible* for good new books to appear on occasion - you
RH> will normally do better to reach for the classics.

That's how the odds go, but there are new classics being written every
year. I'm not aware of many in the area of C, however.

RH> For example, "The Art of Computer Programming", "Algorithms +
RH> Data Structures = Programs", and "The C Programming Language"
RH> - all should be either on your bookshelf or open on your desk.

I'd add _The Mythical Man-Month_ to that, too. I haven't needed a
data structures or algorithms reference in some time (which speaks
more to the sort of programming I'm doing than I like, alas), so I'll
say silent there. And I haven't referred to K&R since my copy went
walking off in 1996 or so; if I didn't have Harbison & Steele handy,
though, I'd probably need to pick up another copy of K&R.

Charlton
 
E

Eric Sosman

Rajiv Battula wrote On 10/08/07 23:16,:
[...]
Why is that old books like, Effective C programming, are still
recommended (not trying to bash this book by the way)? I thought
computer books were supposed to be the latest and greatest? I am
guessing the answer is that computer "language" don't CHANGE as fast
as say, Operating Systems?

A computer language that changes rapidly and radically
is the enemy of code re-use. If yesterday's code won't
work with today's compiler, you need to rewrite or at
least repair it; is that an efficient way to work? The
phrase "write-only language" comes to mind.

If you as a programmer want to preserve the usefulness
of the code you write (flip side: If you don't feel like
writing the same code over and over again in ever-changing
dialects), you will look for a language with staying power.
That is, you will seek a language where the rate of change
is gradual and/or the nature of the changes is moderate.
Fast-evolving languages have a place: they can be helpful
when all you want is an ad-hoc program to solve one problem
just a few times before being discarded. But if you want
your investment of effort to yield enduring benefit, you
will not write your code in wet sand at low tide.

(Many of the same issues pertain to operating systems,
too, and I can't say I agree with your suggestion that
they change especially rapidly. Features and improvements
come along, but there's a large incentive for backwards
compatibility and the overall system structure usually
remains recognizable.)
 
S

santosh

Charlton said:
RH> The question you have to ask yourself is this: which do you
RH> want to do? Explore the transient delights of the latest
RH> trendy language or protocol.... or learn how to write computer
RH> programs properly? If the latter, then - whilst it's not
RH> *impossible* for good new books to appear on occasion - you
RH> will normally do better to reach for the classics.

That's how the odds go, but there are new classics being written every
year. I'm not aware of many in the area of C, however.

Yes. It's unlikely that publishers will consider proposals from authors
for books on pure C anymore.
 
F

Friedrich Dominicus

Charlton Wilbur said:
RH> The question you have to ask yourself is this: which do you
RH> want to do? Explore the transient delights of the latest
RH> trendy language or protocol.... or learn how to write computer
RH> programs properly? If the latter, then - whilst it's not
RH> *impossible* for good new books to appear on occasion - you
RH> will normally do better to reach for the classics.

That's how the odds go, but there are new classics being written every
year. I'm not aware of many in the area of C, however.
Point is that it's not the "hyped enough language of the day". It
would be high time to get a decent book about usage of quite a few
portable libraries and "modern" use of C....

Regards
Friedrich
 
C

Charlton Wilbur

"FD" == Friedrich Dominicus
FD> Point is that it's not the "hyped enough language of the
FD> day".

No, it's not, but what does that matter? It's the right tool for some
jobs, and the wrong tool for others, and for the jobs it's the right
tool for, it's a damn good tool. What difference does the hype make
to the quality of a language?

(If you're working for a boss who makes decisions based on hype and
glossy magazines, your best bet is to get out of there, not to try to
get the right tool for the job to achieve a certain level of hype.)

FD> It would be high time to get a decent book about usage
FD> of quite a few portable libraries and "modern" use of C....

The problem here is the misconception that "modern" use of C is
significantly different than it was in 1989. The language hasn't
changed materially, and neither has the human mind, and thus neither
have the best practices. Many of the changes in C99 (such as the
elimination of implicit int) were worse-than-best practices already;
others (such as auto arrays with dimensions determined at run time)
offer more options, but there are hardly enough of those to merit a
whole new book. And there's good reference material about most of the
major libraries that aren't part of the standard: it's just not
marketed or sold as references on C.

_Advanced Programming in the Unix Environment_ and _Unix Network
Programming_ *remain* the best books on the modern usage of their
respective (portable but non-Standard) libraries; the Petzold books
about Win32 are current; Apple's Carbon and Core Foundation are
extensively documented. What more do you seriously want? Or is your
only criticism of these books that the ink has had time to dry?

Charlton
 
J

John Smith

Richard said:
[This article contains a review of a review about "C Unleashed".
Those were pretty much the only negative comments about the book. The rest
of the review was reasonably positive.

and [2] and [4] are not for beginners.


Neither is [3]!

Perhaps not intended for beginners, but I purchased and read this
book when I was just starting to learn C on my own and found the
great majority of it understandable and useful.

JS
 
J

John Smith

Richard said:
Excellent. Best tutorial approach of ANY technical book IMO.




A reference and not for the new C programmer IMO.

Very useful to me as a beginner and still the only C book always
within reach rather than in the bookcase down the hall.

JS
 
R

Richard Heathfield

John Smith said:
Perhaps not intended for beginners, but I purchased and read ["C
Unleashed"] when I was just starting to learn C on my own and found the
great majority of it understandable and useful.

I'm delighted to hear it.

Nevertheless, don't try this at home, folks. Stunt programmers like John, I
am given to understand, are paid huge amounts by the likes of George Lucas
and Peter Jackson to dive straight into such books, heedless of personal
risk to life and limb. For the rest of us - well, learn the language
first. :)
 
F

Friedrich Dominicus

Charlton Wilbur said:
FD> Point is that it's not the "hyped enough language of the
FD> day".

No, it's not, but what does that matter? It's the right tool for some
jobs, and the wrong tool for others, and for the jobs it's the right
tool for, it's a damn good tool. What difference does the hype make
to the quality of a language? None, I was not claiming it.

(If you're working for a boss who makes decisions based on hype and
glossy magazines, your best bet is to get out of there, not to try to
get the right tool for the job to achieve a certain level of hype.)

FD> It would be high time to get a decent book about usage
FD> of quite a few portable libraries and "modern" use of C....

The problem here is the misconception that "modern" use of C is
significantly different than it was in 1989. The language hasn't
changed materially, and neither has the human mind, and thus neither
have the best practices.
Well I put the 'modern' in " for reason. C is definitly not just used
in the Standard way but there are quite a lot of libaries out there
which are widely portable but not strict C. But this things are hardly
documented.

Many of the changes in C99 (such as the
elimination of implicit int) were worse-than-best practices already;
others (such as auto arrays with dimensions determined at run time)
offer more options, but there are hardly enough of those to merit a
whole new book. And there's good reference material about most of the
major libraries that aren't part of the standard: it's just not
marketed or sold as references on C.

_Advanced Programming in the Unix Environment_ and _Unix Network
Programming_ *remain* the best books on the modern usage of their
respective (portable but non-Standard) libraries; the Petzold books
about Win32 are current; Apple's Carbon and Core Foundation are
extensively documented. What more do you seriously want?
It would be nice if you would not cite me as if I had problems with
old books I just would appreciate newer books with do treat things
like portable libraries.

Regards
Friedrich
 
C

Charlton Wilbur

"FD" == Friedrich Dominicus
(quoting me)

FD> It would be nice if you would not cite me as if I had problems
FD> with old books I just would appreciate newer books with do
FD> treat things like portable libraries.

I cited your words precisely as they were written, and I asked a
question.

Given the old books that I listed, many of which treat portable but
non-standard libraries, what do you think newer books would add?
What do you want that isn't covered?

It honestly seems to me, based on what you've written, that you want
new for the sake of new. That's PHB-thinking.

Charlton
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,263
Messages
2,571,064
Members
48,769
Latest member
Clifft

Latest Threads

Top