Live data from Hacker News

Learn C The Hard Way by Zed Shaw

udemy.com

31–40 of 100 posts

Re: Learn C The Hard Way by Zed Shaw

#31
Just a warning to everyone, like the book this course is in development as I write the book. It's covering a lot of the chapters, but I have to go back and clean up some videos and do the final ones. That's why the price is low for now.

Re: Learn C The Hard Way by Zed Shaw

#32
post #29

I was wondering how this compares with or compliments K&R, when I came across [this section][1] of the book that seems to slap it in the face. Here's a section from the second paragraph: You see, "K&R C" is actually riddled with bugs and bad style. Its age is no excuse. These were bugs when they wrote the first printing, and the 42nd printing. I hadn't actually realized just how bad most of the code was in this book…

It's a bit like claiming memcpy() is bugged because it can crash your program. Well, true, it is good style to program defensively against memory corruptions, buffer overflows etc, and in that respect K&R may teach students bad habits. I think it's a bit much to say that it should never have been written like that, as at the time people knew so much less about building complex projects, sources of error and defensive…

memcpy is just fine because it has a size parameter. I think you mean strcpy(), which does cause defects.

Re: Learn C The Hard Way by Zed Shaw

#33

Earlier quoted context omitted.

Zed Shaw has made the book available for free. It's perfectly acceptable to point that out (indeed, it's linked from the udemy summary anyway). If you need more than the book, you can pay for the course. This is why it is labelled a "companion". There is nothing morally bankrupt about using the resource that has been graciously given away for free: it seems evident that Zed Shaw intended the book to be free, so use t…

If the video course were free, what would you be willing to pay for additional course materials? (i.e. the book, exercise solutions, exclusive live sessions, etc.) I'm not trying to be confrontational here. Online education/coursework/learning needs a pricing structure that makes sense. One that enables thousands of qualified instructors to participate without going broke in the process. I think I understand Zed's "f…

Well, the course is just cheap now because it's in-progress. This lets me get it out for immediate feedback, find bugs, and test that it works with students. In the near future the price will change, but the HTML version will most likely still stay up because answering student questions in comments makes the book so much better.

Re: Learn C The Hard Way by Zed Shaw

#34
post #25

I was wondering how this compares with or compliments K&R, when I came across [this section][1] of the book that seems to slap it in the face. Here's a section from the second paragraph: You see, "K&R C" is actually riddled with bugs and bad style. Its age is no excuse. These were bugs when they wrote the first printing, and the 42nd printing. I hadn't actually realized just how bad most of the code was in this book…

That page has examples and detailed explanations to support the criticism.

The problem is that the examples and explanations don't justify the level of castigation. Yes, you should always use strncpy() instead of strcpy() for instance, but that doesn't protect you from all bugs. The example of a safercopy() still relies on the assumption that the pointers given to it are valid, and that assumption is just as impossible prove as the assumption that copy()'s input strings are valid. Safercopy() is still twice as safe as copy() and we ought to use it, but calling copy() "defective" is unfair unless you're willing to call the C language defective in general. And you can make that argument! I certainly like languages like Go that have pointers but no casting ints to pointers or pointer arithmetic, so the only remaining danger is pointers to memory that has been freed.

Re: Learn C The Hard Way by Zed Shaw

#35
post #11

I'm really considering to take this one, but I've would like to consider other alternatives, anyone knows other online c classes?

The video course is being worked on by me while I write the book, so expect it to be rough around the edges.

But, I say try going through the HTML version online, and as you do get stuck write comments to ask me questions. That's why I put it online for free, so that I get student feedback while I write the book.

Re: Learn C The Hard Way by Zed Shaw

#36
post #32
post #29

Earlier quoted context omitted.

It's a bit like claiming memcpy() is bugged because it can crash your program. Well, true, it is good style to program defensively against memory corruptions, buffer overflows etc, and in that respect K&R may teach students bad habits. I think it's a bit much to say that it should never have been written like that, as at the time people knew so much less about building complex projects, sources of error and defensive…

memcpy is just fine because it has a size parameter. I think you mean strcpy(), which does cause defects.

Yes I guess that would be more appropriate. Again, it comes down to the "give it the right inputs" argument. At some point you have to trust the user of the function to call it correctly.

Re: Learn C The Hard Way by Zed Shaw

#37
post #10

I'm excited - Learn Python the Hard Way completely jumpstarted me into what has become a large internal django site, and I refer back to it often. I really enjoy python, and I thank Zed for the straightforward aproach. So even though I love python I want to see if the same technique can introduce me again to C, a language I never felt comfortable with.

Try going through the HTML version, and drop comments when you hit problems. That'll help me make the book solid.

Re: Learn C The Hard Way by Zed Shaw

#38
post #31

Just a warning to everyone, like the book this course is in development as I write the book. It's covering a lot of the chapters, but I have to go back and clean up some videos and do the final ones. That's why the price is low for now.

I watched the intro on udemy. Very cool.

You talked about installing xcode. For newer osx versions, people may be able to install just the [command line tools for xcode][1], which is only about 170MB or so. It might save some people from waiting around for the full xcode.

[1]: http://kennethreitz.com/xcode-gcc-and-homebrew.html

Re: Learn C The Hard Way by Zed Shaw

#39
post #29

I was wondering how this compares with or compliments K&R, when I came across [this section][1] of the book that seems to slap it in the face. Here's a section from the second paragraph: You see, "K&R C" is actually riddled with bugs and bad style. Its age is no excuse. These were bugs when they wrote the first printing, and the 42nd printing. I hadn't actually realized just how bad most of the code was in this book…

It's a bit like claiming memcpy() is bugged because it can crash your program. Well, true, it is good style to program defensively against memory corruptions, buffer overflows etc, and in that respect K&R may teach students bad habits. I think it's a bit much to say that it should never have been written like that, as at the time people knew so much less about building complex projects, sources of error and defensive…

heh heh. Who would have expected mercy and respect from the guy that made the (paraphrased) "pro-mo-fo" website (first saw it at Atlassian conference about 2 weeks ago, pretty funny though perhaps a bit rude). I think the guy is more than willing to point out any practices now deemed harmful, tradition be damned. I'm over it.

Re: Learn C The Hard Way by Zed Shaw

#40
post #31

Just a warning to everyone, like the book this course is in development as I write the book. It's covering a lot of the chapters, but I have to go back and clean up some videos and do the final ones. That's why the price is low for now.

I watched the intro on udemy. Very cool. You talked about installing xcode. For newer osx versions, people may be able to install just the [command line tools for xcode][1], which is only about 170MB or so. It might save some people from waiting around for the full xcode. [1]: http://kennethreitz.com/xcode-gcc-and-homebrew.html

Yes, I have to update to point people there. Apparently also the latest xcode is missing a bunch of stuff people might need and requires separate downloads of those pieces. I forget what but it's still annoying.
Post reply on HN