Groups | Search | Server Info | Login | Register


Groups > comp.lang.c > #34741

Re: Best book on C gotchas and best practices?

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c, comp.lang.c.moderated
Subject Re: Best book on C gotchas and best practices?
Date 2013-08-01 12:57 -0500
Organization None to speak of
Message-ID <clcm-20130801-0001@plethora.net> (permalink)
References <clcm-20130730-0005@plethora.net> <clcm-20130731-0001@plethora.net>

Cross-posted to 2 groups.

Show all headers | View raw


Eric Sosman <esosman@comcast-dot-net.invalid> writes:
> On 7/30/2013 10:57 PM, Chicken McNuggets wrote:
>> I'm pretty up to speed with C but I still feel there are areas that I
>> make mistakes in my design and implementation. Would anyone recommend
>> the best book that deals with these kinds of issues? Obviously I already
>> have K&R, and the C11 standard document for reference but I was looking
>> for something a bit more focused on how to avoid common mistakes or
>> anti-patterns.
>
>      Andrew Koenig's "C Traps and Pitfalls" is worth a lukewarm
> recommendation.  "Lukewarm" for two reasons:
>
>      - First and more important, it's aimed at people making the
>        transition from pre-Standard to ANSI C, and is nowadays
>        rather dated.
>
>      - Second and less important, it goes out of its way to say
>        that the printf() specifier "%8%" is well-defined (even in
>        the original ANSI Standard it was a constraint violation).

It's not a constraint violation. It's probably undefined behavior.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Working, but not speaking, for JetHead Development, Inc.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
-- 
comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must
have an appropriate newsgroups line in your header for your mail to be seen,
or the newsgroup name in square brackets in the subject line.  Sorry.

Back to comp.lang.c | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Best book on C gotchas and best practices? Chicken McNuggets <chicken@mcnuggets.com> - 2013-07-30 21:57 -0500
  Re: Best book on C gotchas and best practices? Andreas Perstinger <andipersti@gmail.com> - 2013-07-31 13:47 +0200
    Re: Best book on C gotchas and best practices? Chicken McNuggets <chicken@mcnuggets.com> - 2013-07-31 12:56 +0100
      Re: Best book on C gotchas and best practices? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2013-07-31 16:03 +0100
        Re: Best book on C gotchas and best practices? David Thompson <dave.thompson2@verizon.net> - 2013-08-04 22:26 -0400
  Re: Best book on C gotchas and best practices? Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-07-31 21:21 -0500
    Re: Best book on C gotchas and best practices? Keith Thompson <kst-u@mib.org> - 2013-08-01 12:57 -0500
      Re: Best book on C gotchas and best practices? Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-08-01 21:06 -0500
  Re: Best book on C gotchas and best practices? ralph <nt_consulting@yahoo.com> - 2013-07-31 21:22 -0500
  Re: Best book on C gotchas and best practices? Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2013-07-31 21:23 -0500
  Re: Best book on C gotchas and best practices? "Fred J. Tydeman" <tydeman.consulting@sbcglobal.net> - 2013-08-05 11:24 -0500

csiph-web