Live data from Hacker News

What do you want to see in Learn C The Hard Way?

news.ycombinator.com

1–10 of 127 posts

What do you want to see in Learn C The Hard Way?

#1
I bought the domain to force myself to do something with the free time I'll soon have an abundance of.

I want to see more young programmers doing systems programming and making cool things with the language that forms the basis of almost everything we use.

What do you want to see covered in a 'book' that purports to teach C the hard way? :)

I will be following Zed's example, although I'll be influenced by my learning under K&R. I really do want to be demonstrating proper, modern C.

Re: What do you want to see in Learn C The Hard Way?

#3
post #2

One 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?

#5
post #4

I don't know if this is outside of the scope of your plans, but threading issues are a big one that jump out for me. POSIX threads can cause all kinds of wonderful headaches, it would be nice to see some solid advice on the does and dont's.

I plan to follow Zed's model for 52 exercises, I don't see any reason why I shouldn't cover multi-threading and a perhaps a few different concurrency models in the latter half.

Re: What do you want to see in Learn C The Hard Way?

#6
I think your goal will be more easily and better achieved by writing a "So You Found Python Easy?" book. C is not (IMO) a good language to teach people that are just starting to program.

However, if you wish to try anyway, I recommend looking at "Assembly Language Step-by-Step: Programming with Linux" by Jeff Duntemann. It aims to teach people assembly language as their first language, so you may find it useful.

Re: What do you want to see in Learn C The Hard Way?

#7
post #6

I think your goal will be more easily and better achieved by writing a "So You Found Python Easy?" book. C is not (IMO) a good language to teach people that are just starting to program. However, if you wish to try anyway, I recommend looking at "Assembly Language Step-by-Step: Programming with Linux" by Jeff Duntemann. It aims to teach people assembly language as their first language, so you may find it useful.

I'm doing this book precisely because programmers who already know a language aren't ever getting around to learning systems programming or how things work.

Re: What do you want to see in Learn C The Hard Way?

#8
Make sure you explain pointers well, the additional level of indirection introduced by them is usually hard to grasp for beginners.

Show the relation between pointers and arrays. Offer some best practices on using pointers. Explain the most common caveats like buffer overflows, problems with null terminated strings or off by one errors.

Re: What do you want to see in Learn C The Hard Way?

#9
post #7
post #6

I think your goal will be more easily and better achieved by writing a "So You Found Python Easy?" book. C is not (IMO) a good language to teach people that are just starting to program. However, if you wish to try anyway, I recommend looking at "Assembly Language Step-by-Step: Programming with Linux" by Jeff Duntemann. It aims to teach people assembly language as their first language, so you may find it useful.

I'm doing this book precisely because programmers who already know a language aren't ever getting around to learning systems programming or how things work.

I hear you, I voted a few days ago for the C book and this is why I did (and I'm primarily a Python guy).

Re: What do you want to see in Learn C The Hard Way?

#10

Make sure you explain pointers well, the additional level of indirection introduced by them is usually hard to grasp for beginners. Show the relation between pointers and arrays. Offer some best practices on using pointers. Explain the most common caveats like buffer overflows, problems with null terminated strings or off by one errors.

Even better, make sure you explain function pointers well.
Post reply on HN