Earlier quoted context omitted.
My experience as an interviewer showed that in addition to the things you listed, people often fail to grasp binary representation of numbers in a computer at all. This most often comes up when people are asked to do some binary manipulation of numbers, i.e.: unsigned u = 19; unsigned v = u >> 1; "v" is now 9, and to really understand it one must grasp how numbers are represented in binary under the hood. People also…
> "v" is now 9, and to really understand it one must grasp how numbers are represented in binary under the hood. Correct me if I am wrong, but I don't think C guarantees anything about the binary representation. Depending on the architecture, `v` can have different value.
Learn C The Hard Way
101–110 of 260 posts
Re: Learn C The Hard Way
#102Earlier quoted context omitted.
The arrow operator and identifiers with leading underscores seem to be glossed over or skipped fairly often in education. It's intimidating to look at code that uses them if you don't know what they are.
Identifiers with leading underscores? I use those for member variables... (this makes more sense in C++ without the arrow notation.)
Re: Learn C The Hard Way
#103Earlier quoted context omitted.
Oh right, I forgot they added that to the C6.283185307179586 standard.
I'm amused you took the time to put in 2pi there.
Intelligent people support Tau: http://tauday.com/ This is the least Zed could do.
Re: Learn C The Hard Way
#104Earlier quoted context omitted.
> "v" is now 9, and to really understand it one must grasp how numbers are represented in binary under the hood. Correct me if I am wrong, but I don't think C guarantees anything about the binary representation. Depending on the architecture, `v` can have different value.
If 19 is represented differently in binary on your platform than (leading zeros)10011, you are already quite screwed. You might be thinking of character representation for the later example.
Is there anything that says, for example, it can't be BCD?
Re: Learn C The Hard Way
#105Ohloh 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,…
Re: Learn C The Hard Way
#106I'll be interested to see how this compares to K&R, which not only teaches the C language but also C idioms and the reasons for using them. K&R is still one of the very best programming books. Every other C book I've read is inferior. Peter van der Linden's "Expert C Programming" is the only book on C besides K&R that I've learned anything from. Good luck, I'm all for more programmers understanding C but I wonder if…
K&R won't work for someone beginning programming. This book is specifically targeted towards teaching programming to programming virgins. The examples and exercises K&R uses will be very hard for beginners. When it builds a recursive descent top down parser to read the declarations in English(and vice-versa), that will be totally lost on the beginners. K&R wasn't written for beginners and I doubt it will work well fo…
Re: Learn C The Hard Way
#107Ohloh 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,…
I'm glad you got so much about how my book is written from a few paragraphs in an unfinished manuscript for it.
Re: Learn C The Hard Way
#108Zed, your level of productivity is truly inspiring. The best of luck to you.
I think the level of self-promotion and/or other-people-promoting-him is the key factor. Not really the supposed productivity. I know many people who get a lot done, both for day jobs, for contract work, as a hobby, as entreprenurial ventures, etc. but 99.9% never hits the front page of HN on a regular basis like Zed's activity seems to. Which doesn't lessen what he does and his skills, but it does pull back the came…
Frankly, I consider hackernews kind of irritating and not useful as a promotional tool. It amounts to about 5% of my traffic for 1 day at best, and I only have to be here because if I'm not answering the petty little idiots who troll here then the rumors spread through my professional circles.
In other words: I could live without this kind of promotion, so it's definitely not "self-promotion".
Re: Learn C The Hard Way
#109I'll be interested to see how this compares to K&R, which not only teaches the C language but also C idioms and the reasons for using them. K&R is still one of the very best programming books. Every other C book I've read is inferior. Peter van der Linden's "Expert C Programming" is the only book on C besides K&R that I've learned anything from. Good luck, I'm all for more programmers understanding C but I wonder if…
K&R won't work for someone beginning programming. This book is specifically targeted towards teaching programming to programming virgins. The examples and exercises K&R uses will be very hard for beginners. When it builds a recursive descent top down parser to read the declarations in English(and vice-versa), that will be totally lost on the beginners. K&R wasn't written for beginners and I doubt it will work well fo…
Re: Learn C The Hard Way
#110When I first learned C, I did so under DOS, an environment in which you could declare a pointer to video memory, make a magic call, and start drawing graphics. I found that a memorable way to learn pointers. Sadly, doing that in the modern world requires quite a bit more setup.