Live data from Hacker News

Learn C The Hard Way

learncodethehardway.org

171–180 of 260 posts

Re: Learn C The Hard Way

#171

Earlier quoted context omitted.

When somebody directs "derogatory" remarks at themselves , it's called "self-deprecating". It's a good thing in many Western cultures at least, and demonstrates a degree of modesty. In this case, hp made it clear that he doesn't expect sympathy (or applause or whatever) for having written a lot of C. It's just something he mentioned because he thought it was relevant. It is relevant - people not long out of school an…

"When somebody directs 'derogatory' remarks at themselves, it's called 'self-deprecating'... In this case, hp made it clear that he doesn't expect sympathy (or applause or whatever) for having written a lot of C. It's just something he mentioned because he thought it was relevant." This isn't the only possible interpretation of that comment. Sometimes words can have more than one meaning, and misinterpretation isn't…

"This isn't the only possible interpretation of that comment"

Genuine curiosity... what other interpretation could there be? Is it an ESL issue with literal translation causing offense? Or is there another interpretation in a non North American culture?

In N.A. at least, this is an extremely common expression.

Re: Learn C The Hard Way

#172
post #10
post #3

I look forward to the content. As a beginning C++ instructor I find there is something lacking between the truth of the language and the conventions for presenting it. Nobody, AFAIK save for the truly hardcore student, has nailed it.

Got any feedback on the things students get wrong? My experience is they fail to grasp memory management, pointers, functions as pointers, linkers or just how a program actually runs. If you've got others I'd love to hear them.

When learning a new language, the syntax and exercises which explore this come to me fairly quickly. The difficulties are (a) learning the best way of structuring large blocks of code using the new syntax and tools, and (b) for new programmers: understanding how to convert conceptual rules in my head into algorithms.

If you set out to only teach the language syntax and paradigms you are leaving a beginner with a lot of extra work before they can start or contribute to meaningful projects. This is the reason that people learn so much from reading other people's code in open-source projects: most writers skim over trying to teach the most fundamental skill of programming.

I do believe it is possible to teach practicalities in addition to theory and if you attempt to do this, you will be doing a lot more than most writers have done in the past.

Re: Learn C The Hard Way

#173
post #171

Earlier quoted context omitted.

"When somebody directs 'derogatory' remarks at themselves, it's called 'self-deprecating'... In this case, hp made it clear that he doesn't expect sympathy (or applause or whatever) for having written a lot of C. It's just something he mentioned because he thought it was relevant." This isn't the only possible interpretation of that comment. Sometimes words can have more than one meaning, and misinterpretation isn't…

"This isn't the only possible interpretation of that comment" Genuine curiosity... what other interpretation could there be? Is it an ESL issue with literal translation causing offense? Or is there another interpretation in a non North American culture? In N.A. at least, this is an extremely common expression.

By "that comment", I meant hp's original comment, which was a long tangent on how to go about teaching C, in the context of a post about a draft of a book teaching C. The piece that X-Istence isolated contributes to the interpretation that the comment was a criticism of Shaw, and not just a long tangent. It can be read as setting a confrontational tone.

I don't understand why other commenters feel it was unreasonable of Shaw to interpret it as a criticism.

I think it's been on the order of a year since I last heard this particular violin phrase. It might be common in your community, but that's not exactly North America, yeah?

Re: Learn C The Hard Way

#174
post #126

The biggest problem with C is not the language C, for it is a small and mostly simple language with a few warts (I'm looking at you, pointer syntax), it is the ecosystem into which you are thrust when you first use it. That is, the ecosystem of, "What can I include without dicking around with compiler and linker settings, which I do not care to learn very well because I am just starting?", and the ecosystem of, "Why…

C++ has the same issues. To add another example, binary only distributions (e.g. some commercial software) bring their dependencies with them, meaning that you have to use roughly the same environment (compiler version, stl) to use them. Libraries work a lot better in VM languages.

It doesn't take a VM language or an interpreted lanugage to get libraries working well. Take a look at Haskell's Cabal system and Hackage package library. It works pretty good and doesn't use a VM.

With C and C++, you'll have to use your operating system's package management to get all the important libraries (or build them by hand from Git sources, etc), then have a build system that configures the build environment and searches for all the libraries and other dependencies. It's not as nice as using a dedicated tool for this, like Gem and Bundler in Ruby but usually you get the job done - unless you work on Windows and don't have a package manager.

Re: Learn C The Hard Way

#175
post #4

I always had an idea of a 'for programmers' series of books for those who know how to program in one language (say, C++, Java or PHP) and wish to pick up a new language eg. 'python for programmers' would not need the first half of it dedicated to explaining strings, loops etc. and could get straight into it from a programmers perspective - a bit like K&R. You could then dedicate more content to explaining philosophy,…

"eg. 'python for programmers' would not need the first half of it dedicated to explaining strings, loops etc."

Mark Pilgrim's http://diveintopython.org/ is what you describe.

Re: Learn C The Hard Way

#176

Earlier quoted context omitted.

You should stop thinking everyone is attacking you. I think you'd be happier. Really though, there's no content here. The fact it's been voted to #1 on hackernews shows just how bad things are. Items should be upvoted on their merit, rather than who did them. Someone writing another book about programming C isn't newsworthy.

I don't really understand your comment. 1. The post is about Zed's draft; is it really so far of a leap to interpret hp's remarks as a criticism of the book? 2. Is this a fair paraphrase? "Everyone here isn't attacking you, also, your draft sucks and shouldn't have been posted on HN."

' Is this a fair paraphrase? "Everyone here isn't attacking you, also, your draft sucks and shouldn't have been posted on HN."'

No, it's not. speckledjim is complaining that someone writing another book on C is not news, he doesn't say anything about the draft sucking.

Re: Learn C The Hard Way

#177

The biggest problem with C is not the language C, for it is a small and mostly simple language with a few warts (I'm looking at you, pointer syntax), it is the ecosystem into which you are thrust when you first use it. That is, the ecosystem of, "What can I include without dicking around with compiler and linker settings, which I do not care to learn very well because I am just starting?", and the ecosystem of, "Why…

"It's not the language, honey, it's the runtime." (apologies to Indiana Jones)

Re: Learn C The Hard Way

#178

Earlier quoted context omitted.

I don't really understand your comment. 1. The post is about Zed's draft; is it really so far of a leap to interpret hp's remarks as a criticism of the book? 2. Is this a fair paraphrase? "Everyone here isn't attacking you, also, your draft sucks and shouldn't have been posted on HN."

' Is this a fair paraphrase? "Everyone here isn't attacking you, also, your draft sucks and shouldn't have been posted on HN."' No, it's not. speckledjim is complaining that someone writing another book on C is not news, he doesn't say anything about the draft sucking.

Implied by "Really though, there's no content here." Maybe they meant the comments, though.

Re: Learn C The Hard Way

#179
post #56
post #18

Earlier quoted context omitted.

Yes, actually people are deathly afraid of C thanks to other language inventor's excellent marketing against it. There's a few things that you need to really nail to be good at C, and they're difficult things, but it's not "dangerous" like people keep claiming.

C is difficult, yes. Dangerous - I don't know in what sense. I manage to get more exceptions in my Python, Ruby code, owing to undefined variables or incorrect types, than I get segfaults in C. The main issue with C is it takes some time before you are ready to take it head on. An experienced C programmers would have his repertoire of generic data structures library with time complexity guarantees (programs without h…

"I manage to get more exceptions in my Python, Ruby code, owing to undefined variables or incorrect types, than I get segfaults in C."

What happens when you don't get a clean segfault is what got C the "dangerous" reputation.

Re: Learn C The Hard Way

#180
post #82

Ohloh says I've changed at least half million lines of C code ( https://www.ohloh.net/accounts/rhp/positions/total ) Play me a tiny violin ;-) What kinda bugs me is that whenever people go to teach C, they make out like it _has_ to be a low-level exercise, as if writing in C suddenly means you can't use abstract data types or object-oriented style or name your functions properly or have Unicode support. For example,…

Of course, in most languages you can use most programming language features by "typing more", but when a certain feature is not provided by the language or a standard library or at least a de facto standard library, everybody will implement it in a slightly different, incompatible way. I assume that is what people mean by "C doesn't have classes".
Post reply on HN