(oracleofdelphi) writes:
> Hello,
> Pardon me if this is out of topic. I can program in C but looks
> like I'm not very good at it. I think I need more experience. What
> should I do ? Is there any "exercise collection" I can use to get some
> experience ? I dont know advanced programming concepts ( like hash
> table etc., ). What should I do to be able to write "real" programs.[I
> suppose many of you are university students, but I just learned C from
> a book - so I hope you understand my problem]
I suppose you came to this conclusion by reading this newsgroup?
The very first thing I would recommend is: keep doing so. It has
been one of the single most helpful things to my C programming
expertise.
And don't feel bad about having learned C form a book: I suspect
that many of the experts on this NG also did not learn from a
classroom. It is my belief that you are likely to fare far better
by teaching yourself from a good book, then to get it through
middle-men, a depressingly large percentage of which seem to be
less-than-competent anyway. BTW, from what book did you teach
yourself? There are a very large number of poor C books, and even
many of the very good ones have problems. My recommendations
would be:
1. K&R2 (The C Programming Language, 2nd ed., by Kernighan and
Ritchie)
2. Algorithms in C, Robert Sedgewick
3. Writing Solid Code, Steve Maguire, Microsoft Press
For 2. and 3., focus more on the concepts than on the actual
code. Ben Pfaff has pointed out some problems with the code in
(3.), but the volume still stands out to me as having terrific
principles for writing very excellent code.
But you can't learn everything from books. Experience in finding
good design and coding practices comes from actually encountering
them (and in encountering the bad ones, too). Reading this NG
helps. Reading a lot of code does too: but keep in mind that most
code is filled with examples of what not to do; even some of the
best code I've seen tends to have poor ideas about certain
things. So read a *lot* of code, and compare them against
eachother.
HTH,
-Micah