News for hackers. Stuff that matters.
Re:Effective C: An Introduction to Professional C Programming by montalbano on Sunday March 29, 2020 @10:52AM (#22719461)
Can any more experienced C developers give an opinion on the author/contents of this book?

I'm a Python/Julia developer starting to learn C. I have K&R already, and Test Driven Development for Embedded C (Grenning).

I did order 'Modern C' by Gustedt but the publisher never delivered to Waterstones so they had to cancel the order (about 6 months ago, book still unavailable from Waterstones as of today).

Re:Effective C: An Introduction to Professional C Programming by as-j on Sunday March 29, 2020 @11:48AM (#22719913)
Looking over the contents, it seems expensive for what you get and what not might be the most practical day to day C issues. If you want to use C more effectively, I'd look at a systems programming book for what ever system you prefer. When hiring engineers knowing C isn't the issue, knowing how to code daemons in Unix, how to use sockets, pipes, io, handle signals, etc etc is the issue.

Contents are:

* How to identify and handle undefined behavior in a C program * The range and representations of integers and floating-point values * How integer promotions are performed and how they may affect portability

I think it's incredibly important to understand how numbers on computers work, what are the limits of 32bit and 64bit values and how double/floats play into it.

* The order of evaluation of expressions

Most coding styles avoid ambiguity by just using (enough parentheses) around (important statements).

* Dynamic memory allocation including the use of non-standard functions

Non-standard worries me here. Memory allocation isn't particularly

* The philosophy underlying the use of character types in C Character encodings and types

I'm curious as to what this is covering? Is it system specific?

* How to perform input/output (I/O) with terminals and file systems using C Standard Streams and POSIX file descriptors * The translation phases implemented by the C compiler and the role of the preprocessor * How to test, debug, and analyze C programs

IO is an interesting topic, but I suspect best covered by a systems programming manual. There's several unix books, Stevens being the goto guide historically, and I would go straight to the source instead.

Re:Effective C: An Introduction to Professional C Programming by bogomipz on Sunday March 29, 2020 @12:07PM (#22720059)
These seem like really odd criticisms to level against a book which is clearly not about systems programming. The title itself makes it clear it's an introductory text on the subject of C. And from the overview:

>"You'll learn how to develop correct, portable, professional-quality code and build a foundation for developing security-critical and safety-critical systems."

So the stated aim of the book is to build a "foundation" from which you could then go on to digest and effectively use advanced things like the Stevens book.

Re:Effective C: An Introduction to Professional C Programming by as-j on Sunday March 29, 2020 @12:39PM (#22720336)
my reply was for montalbano directly. He has K&R which lays a foundation of the language. Maybe you're right and this builds off of that as a #2 type of book, so you could be right there.

Safety-critical and security-critical are interesting for an intro book. I'd like people to be aware, and conscious of of them. Anyways, we could debate this one. It really depends on how paranoid a beginner programmer becomes.

Re:Effective C: An Introduction to Professional C Programming by throwaway17_17 on Sunday March 29, 2020 @11:18AM (#22719674)
Gustedt’s book is distributes by the author for free as a pdf if you are having trouble getting your print copy the digital version could hold you over.

https://modernc.gforge.inria.fr/

Re:Effective C: An Introduction to Professional C Programming by montalbano on Sunday March 29, 2020 @11:18AM (#22719679)
Thanks yes I have the ebook I just prefer paper and wanted to give the author a financial contribution also. I should have mentioned that.
Re:Effective C: An Introduction to Professional C Programming by bdelay on Sunday March 29, 2020 @01:44PM (#22720914)
I took Seacord's virtual class (CMU SEI? Can't remember) on Secure C coding a few years back and own, love, and regularly use the The CERT C Secure Coding Standard.

I learned from K&R, but highly recommend Seacord's books if you're looking for how to write secure C and a more modern take on some of the trickier parts of C.

Re:Effective C: An Introduction to Professional C Programming by rcseacord on Sunday March 29, 2020 @06:23PM (#22723333)
Thanks! NCC Group is reselling the online Secure Coding Training and we also deliver instructor-led courses, although these might need to be delivered by webinar until the current crisis abates https://www.nccgroup.trust/us/our-services/cyber-security/se...
Re:Effective C: An Introduction to Professional C Programming by aidenn0 on Monday March 30, 2020 @01:27AM (#22725487)
Looks quite reasonable. I'm hopeful for a better introductory C text[1]. The author has plenty of street cred, the material covered looks good.

K&R is a good reference, but not good for learning the language IMO.

1: I love Plum's books (starting with learning to program in C), but can't recommend them since the language has changed so much in the 37 years since it came out.