I've read K&R, what now?

G

gillisct

I'd like to say I have a basic control of the C language. Is there any
reccomended reading upon completion of K&R?

Are there any projects someone new to C could study/watch over/ and
eventually contribute to in order to get a grip on the development
process and/or expand their knowledge?

Thank you.
 
I

Ian Collins

I'd like to say I have a basic control of the C language. Is there any
reccomended reading upon completion of K&R?
Have you gone though the exercises?
Are there any projects someone new to C could study/watch over/ and
eventually contribute to in order to get a grip on the development
process and/or expand their knowledge?
Probably too many to summarise. Have a look on sourceforge, there are
quite a few small projects on the go there.
 
G

gillisct

I've gone through most of the exercises, yeah. The only ones I didn't
do were the ones where the solution were immediately obvious.
 
K

kaby

I've gone through most of the exercises, yeah. The only ones I didn't
do were the ones where the solution were immediately obvious.

So you do know every nuances in C ^-^
Maybe you should have a look on computer architecture and assembly to
dig deeper.
 
R

Richard Heathfield

(e-mail address removed) said:
I'd like to say I have a basic control of the C language.

That's good. If you've done most of the exercises, that's actually
amazing.
Is there any reccomended reading upon completion of K&R?
http://www.cpax.org.uk/prg/portable/c/resources.php#RecBooks

Are there any projects someone new to C could study/watch over/ and
eventually contribute to in order to get a grip on the development
process and/or expand their knowledge?

That's probably a good way to pick up lots of bad habits real fast. I'm
not saying you shouldn't do it, but if I were you I'd keep a close eye
on comp.lang.c for quite a while yet - if K&R is like learning to
drive, clc is a bit like a driving test (although we don't actually
offer certification as such[1]!). We tend to spot *everything* you're
doing wrong, and we write it all down too. It can be a disspiriting
experience at first, but you'll be a better C programmer as a result.


[1] Perhaps we should.
 
R

Roland Pibinger

I'd like to say I have a basic control of the C language. Is there any
reccomended reading upon completion of K&R?

Read it (better study it) again ;-)
Are there any projects someone new to C could study/watch over/ and
eventually contribute to in order to get a grip on the development
process and/or expand their knowledge?

You should take a look at a real-world C program that is not too large
and written in decent C. JSON-C (http://oss.metaparadigm.com/json-c/)
is a candidate. It implements routines for handling the JSON protocol
(http://www.json.org/). You may start by browsing the source code and
trying to understand at least parts of it, e.g. 'arraylist' or
'linkhash'.

Good luck!
 
T

Tor Rustad

Richard Heathfield wrote:

[Warning: I did post a replay via google, but that one never appeared]
(e-mail address removed) said:


That's good. If you've done most of the exercises, that's actually
amazing.


http://www.cpax.org.uk/prg/portable/c/resources.php#RecBooks


OK, I will walk through this list:


1. C Programming: A Modern Approach, K.N.King
2. C: How to Program, 2nd Ed. Deitel, H.M. & Deitel

Comment (1 & 2): These two books after K&R2, shouldn't be needed.


3. The C Programming Language, 2nd Ed. Kernighan & Ritchie.

Comment: N/A. (OP has already read this one)


4. C: A Reference Manual, 4th Ed. Harbison & Steele

Comment: OP don't need H&S now, just use K&R2.


5. The Standard C Library. P.J.Plauger

Comment: I read this one too early myself, and it was too advanced. I
would suggest 2-3 years of C experience first.


6. C Programming FAQs Steve Summit.

Comment: Very useful resource at this stage for OP.


7. ISO/IEC 9899:1999 ISO.

Comment: Latest draft is available online, likely a far too advanced
text for beginners.


8. C Traps and Pitfalls. Andrew Koenig

Comment: Nice little book, not a must read now.


9. Expert C Programming: Deep C Secrets, Peter van der Linden

Comment: Excellent & funny book, but not recommended for beginners.


10. Problem Solving And Program Design In C, 2nd Ed. Hanly & Koffman.

Comment: N/A (I don't have that book)


11. Algorithms in C, 3rd Ed. Robert Sedgewick

Comment: Excellent book, if OP is interested in algorithms


12. C Unleashed, Heathfield, Kirby et al,

Comment: Thick as a brick, with some nice real-world code in it.
Readable after K&R2, and can be used as murder weapon too.


13. Software Solutions in C, ed Dale Schumacher

Comment: N/A


14. Programs and Data Structures in C, Leendert Ammeraal.

Comment: I haven't this book either, but IMO a book on Data Structures
is the natural step after K&R2.


15. Numerical Recipes in C

Comment: Mainly relevant for physics and chemistry students, not the
place to learn C.



That completes the recommendations from Richard H., which lack any
references to platform-dependent coding, if OP is using UNIX/Linux, a
book on POSIX (e.g. Stevens APUE http://www.kohala.com/start/) is much
more useful, than many of the above suggestions.
 
R

Richard Heathfield

Tor Rustad said:
Richard Heathfield wrote:

[Warning: I did post a replay via google, but that one never appeared]
(e-mail address removed) said:


That's good. If you've done most of the exercises, that's actually
amazing.


http://www.cpax.org.uk/prg/portable/c/resources.php#RecBooks


OK, I will walk through this list:
7. ISO/IEC 9899:1999 ISO.

Comment: Latest draft is available online, likely a far too advanced
text for beginners.

He's hardly a beginner. He's completed almost all the exercises in K&R2!
9. Expert C Programming: Deep C Secrets, Peter van der Linden

Comment: Excellent & funny book, but not recommended for beginners.

Aye. But again, he's not a beginner. Actually, this one is recommended a
lot, but personally I think it's a bit too eccentric to make a good
followup to K&R2. It is a good book, no question about that, but it's
more of a book that you'd read on a long train journey or, say, to
while away an hour or so at a party - the kitchen is a good place for
this, since you can usually find a spare bottle or two of wine.
11. Algorithms in C, 3rd Ed. Robert Sedgewick

Comment: Excellent book, if OP is interested in algorithms

If he isn't, he sure picked a funny career.
13. Software Solutions in C, ed Dale Schumacher

Comment: N/A

Fabulous book. Well worth the trouble it will take to find a copy.

14. Programs and Data Structures in C, Leendert Ammeraal.

Comment: I haven't this book either, but IMO a book on Data Structures
is the natural step after K&R2.

I do have a copy, and it's first-class.
15. Numerical Recipes in C

Comment: Mainly relevant for physics and chemistry students, not the
place to learn C.

Yeah, I ought to strip that off the list, really.
That completes the recommendations from Richard H., which lack any
references to platform-dependent coding, if OP is using UNIX/Linux, a
book on POSIX (e.g. Stevens APUE http://www.kohala.com/start/) is much
more useful, than many of the above suggestions.

Well, this is a platform-independent group. If I were pushed for
platform-specific recommendations, I would start off by saying APUE to
the POSIX people, PW (Petzold, 5th edition ONLY) to the Win32 people,
and UNP to both groups (yes, even the Win32 people, and even though
porting the code from one to the other isn't entirely effortless).
 
M

Michael

Is there any reccomended reading upon completion of K&R?

I would also add Writing Solid Code by Steve Maguire.

Michael
 
R

Richard Heathfield

CBFalconer said:
I note the absence of "Practice of Programming", which I consider
excellent.

But it's not about C! :)

Yes, of course you're right - but my "recommended reading" list is a
list of ***C*** books. If you look carefully at the list on my site,
you will also note the absence of APUE (see above), PW (again, see
above), UNP (ditto), Stevens' "TCP/IP Illustrated" series, TAOCP, "Code
Complete", the Wirth book, Stroustrup, Hofstadter, and the entire
Discworld series, not to mention the Bible and Shakespeare.
 
K

Keith Thompson

Tor Rustad said:
4. C: A Reference Manual, 4th Ed. Harbison & Steele

Comment: OP don't need H&S now, just use K&R2.

There's a 5th edition of H&S. Unlike K&R2, it covers C99 (and yes, it
clearly distinguishes which features are new in C99). I recommend it
as a reference, as opposed to a tutorial.
 
T

Tor Rustad

Richard said:
Tor Rustad said:
[...]
7. ISO/IEC 9899:1999 ISO.

Comment: Latest draft is available online, likely a far too advanced
text for beginners.

He's hardly a beginner. He's completed almost all the exercises in K&R2!

Well done indeed and a very good starting point for OP, but still... at
least for me, it took years before advancing above "beginner". :-/

If he isn't, he sure picked a funny career.

Who says OP has picked a career yet? Not everyone are CS students you
know. :)

Anyway, there are multiple possible paths, OP's interest might be in
Communication, Cryptology, Data Compression, Compiler Design or even
Operating Systems, if so, I'm just saying that it makes sense to
consider C book on such a topic first.

Knuth & Bentley has also some nice books on algorithms.

I do have a copy, and it's first-class.

OK, I take your word for it. I used "Data Structures Using C" by
Tenenbaum, Langsam & Augenstein, which I can recommended too. However,
by looking at the ACCU reviews, "Advanced C Struct Programming" by John
W.L. Ogilvie, got the highest score of all the C books on data structures.

Well, this is a platform-independent group.

Sure is, still the world consist of more than strictly conforming C
programs. :)
If I were pushed for
platform-specific recommendations, I would start off by saying APUE to
the POSIX people, PW (Petzold, 5th edition ONLY) to the Win32 people,
and UNP to both groups (yes, even the Win32 people, and even though
porting the code from one to the other isn't entirely effortless).

I have not read "Programming Windows" by Petzold, but rather "Advanced
Windows" by Jeffrey Richter, which was sufficient along with the MSDN
doc. I do agree that Stevens UNP is useful for all, even his APUE, won't
hurt the Windows people.
 
T

Tor Rustad

Keith said:
There's a 5th edition of H&S. Unlike K&R2, it covers C99 (and yes, it
clearly distinguishes which features are new in C99). I recommend it
as a reference, as opposed to a tutorial.

I do have the H&S 5th ed. for reference, but don't see this as the
natural next step for OP, which IMO is rather a good book on data
structures and using the C FAQ.
 
R

Richard Heathfield

Tor Rustad said:
Richard said:
Tor Rustad said:
[...]
7. ISO/IEC 9899:1999 ISO.

Comment: Latest draft is available online, likely a far too advanced
text for beginners.

He's hardly a beginner. He's completed almost all the exercises in
K&R2!

Well done indeed and a very good starting point for OP, but still...
at least for me, it took years before advancing above "beginner". :-/

I proceeded quite smoothly and quickly up the ladder to 'expert' - and
then I landed on comp.lang.c, which is one hell of a snake.
Sure is, still the world consist of more than strictly conforming C
programs. :)

Huh? Whatever gave you that idea? ;-)
I have not read "Programming Windows" by Petzold, but rather "Advanced
Windows" by Jeffrey Richter, which was sufficient along with the MSDN
doc.

I, too, have Richter's book, but it's a bit heavy IMHO - Petzold is
gentler, and very thorough. Having said that, his C really sucks. :)

I do agree that Stevens UNP is useful for all, even his APUE,
won't hurt the Windows people.

That depends on how hard you throw it.
 
B

Bill Pursell

Richard said:
Tor Rustad said: (referencing a list of recommended texts)


Yeah, I ought to strip that off the list, really.

Or, place it on the list of "Decent books that describe
reasonable algorithms, but with extremely poor coding
style and practice." (I haven't looked at it for years,
and perhaps my memory misleads me, but I'm pretty
sure I learned a LOT of bad habits from that book.)
 
T

Tor Rustad

Tor said:
Richard said:
Tor Rustad said:
[...]
14. Programs and Data Structures in C, Leendert Ammeraal.

Comment: I haven't this book either, but IMO a book on Data Structures
is the natural step after K&R2.

I do have a copy, and it's first-class.

OK, I take your word for it. I used "Data Structures Using C" by
Tenenbaum, Langsam & Augenstein, which I can recommended too. However,
by looking at the ACCU reviews, "Advanced C Struct Programming" by John
W.L. Ogilvie, got the highest score of all the C books on data structures.

I just searched Amazon for Ogilvie's book:

http://www.amazon.com/Advanced-Struct-Programming-Structure-Implementation/dp/047151943X

and did remember it when I saw the cover image! LOL, it must be more
than 15 years ago I worked my way through that one.

Not sure if I agree with Francis Glassborow ACCU review as "Highly
Recommended" though, when Tanenbaum only received "Recommended".
However, Glassborow do have point, since you only really *work* your way
through a good book. Ogilvie and Tanenbaum are not really overlapping
books, Ogilvie's book was more about program design, i.e. how to master
real-life projects, i.e. designing and programming bigger and more
complex systems.
 
T

Tor Rustad

Richard said:
Tor Rustad said:


I, too, have Richter's book, but it's a bit heavy IMHO - Petzold is
gentler, and very thorough. Having said that, his C really sucks. :)

Ahh.. so that's where you picked up your ugly looking meassage crackers
then! ;-)

Richter's C code isn't a pleasure to read either, but having one
reference on the Win32 API is sometimes useful.

That depends on how hard you throw it.

LOL
 
R

Richard Heathfield

Tor Rustad said:
Ahh.. so that's where you picked up your ugly looking meassage
crackers then! ;-)

No, actually I invented those for myself. Like most of my inventions, it
turned out that they were actually *re*-inventions. For the record,
though, I don't think Petzold uses message crackers at all.
Richter's C code isn't a pleasure to read either, but having one
reference on the Win32 API is sometimes useful.

Hmm. Perhaps we're talking about different Jeffery Richters, or perhaps
he wrote two books, both called "Advanced Windows", with radically
different contents. A reference on the Win32 API is certainly something
I would not have called it.

<snip>
 
T

Tor Rustad

Richard said:
Tor Rustad said:
[...]
Richter's C code isn't a pleasure to read either, but having one
reference on the Win32 API is sometimes useful.

Hmm. Perhaps we're talking about different Jeffery Richters, or perhaps
he wrote two books, both called "Advanced Windows", with radically
different contents. A reference on the Win32 API is certainly something
I would not have called it.

Since the "Programmers Reference Manual" for Win32 API is provided by
MSDN, Richters book (3rd ed.) is just a useful supplement to this, and I
can call it a *guide* if you like... whatever.
 

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

Similar Threads

K&R p.97 8
Alignment (K&R question) 13
K&R 1-24 15
ANSI -> K&R ? 19
K&R exercise 1-18 10
K&R Exercise 6-2 8
K&R Exercise 1-21: entab 10
"K&R" C 16

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top