What do you want to see in Learn C The Hard Way?
71–80 of 127 posts
Re: What do you want to see in Learn C The Hard Way?
#72What about Learn C++ The Hard Way ? Anyone ?
Re: What do you want to see in Learn C The Hard Way?
#73whatever you do, make your examples bulletproof. even if it's not how you would normally write the code and it seems overly cautious, do your audience a favor and write the example that way anyway. if there are any buffer overflows, integer overflows, off-by-one's, signedness issues, failure to check return values of everything, use of typically insecure things like sprintf instead of snprintf, all of these problems…
I've always felt that teaching 'don't do that, cause it's bad' sticks rather poorly - unless something that obviously dangerous is involved, making your own mistakes is much more educational than memorizing a set of best practices and never even peeking into those blind alleys or pitfalls. You can do that and have good habits, but you'll have a dogmatic rather than a fundamental grasp of the knowledge, and this will constrict further development.
Re: What do you want to see in Learn C The Hard Way?
#74One important thing I would like to see in such a book is one or more chapters devoted to memory management best practices.
100% agreed, I see way too many people struggling with realloc/calloc in ##C, let along comprehending heap fragmentation.
Re: What do you want to see in Learn C The Hard Way?
#75Personally, I think a teaching/review ladder would be as or more helpful than a tutorial text. Getting good at C, at least from my current starting point, seems to mostly be a matter of discipline and practice.
I'm thinking of something like this: http://gtl.xmp.net/
Along those lines ;) I'll probably be releasing code from my first medium-sized C project in a week or so... anyone care to offer tips on how to get more experienced eyeballs on it?
Re: What do you want to see in Learn C The Hard Way?
#76Other than K&R (which everyone knows about), what is the current CW on best C books?
C Interfaces and Implementations is really good: http://www.amazon.com/Interfaces-Implementations-Techniques-...
Examples provided here: http://news.ycombinator.com/item?id=1705332
Re: What do you want to see in Learn C The Hard Way?
#77whatever you do, make your examples bulletproof. even if it's not how you would normally write the code and it seems overly cautious, do your audience a favor and write the example that way anyway. if there are any buffer overflows, integer overflows, off-by-one's, signedness issues, failure to check return values of everything, use of typically insecure things like sprintf instead of snprintf, all of these problems…
Or as a compromise, start with simple, easy-to-read examples teaching basic principles. Give them datasets that will cause the program to blow up, and then explore both the causes and solutions to failure. Ideally, work back from the failures and encourage the reader to try out solutions that don't work so as to develop rigorous problem-solving skills. I've always felt that teaching 'don't do that, cause it's bad' st…
Re: What do you want to see in Learn C The Hard Way?
#78You probably want to make sure you know C, first.
Re: What do you want to see in Learn C The Hard Way?
#79You want to target young programmers. Talk to those, and make them come with feedback as you write the book.
Re: What do you want to see in Learn C The Hard Way?
#80Teach how to implement a couple of data structures more complex than linked list and binary trees (maybe hash table). Teach how to implement a couple of non-trivial algorithms (e.g., quicksort, topological sort).
Planned on it.