4 ms·
K&R won't work for someone beginning programming. This book is specifically targeted towards teaching programming to programming virgins. The examples and exer
by irahul 15y ago
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 for a programming beginner - should be fine for someone who already knows programming in some other language.
- gregjor 15y agoI knew time-shared BASIC before learning C in 1978. I was definitely a beginning programmer then, still in high school. Many (probably most) of the programmers I know from the same era learned programming from books that would be dismissed today as too hard for beginners. In the preface to the first edition Kernighan and Ritchie wrote: "This book is not an introductory programming manual; it assumes some familiarity with basic programming concepts like variables, assignment statements, loops, and functions. Nonetheless a novice programmer should be able to read along and pick up the language, although access to a more knowledgeable colleague will help." Of course that was before the internet, when access to a "more knowledgeable colleague" was harder to come by. In 1978 the only other languages someone would know were Fortran, BASIC, COBOL, Pascal, assembly language, etc. Chapter 1, A Tutorial Introduction starts at the same place Zed's book starts: hello world. Looking at it now I don't see any reason my 13-year-old son (who knows a very little bit of Python) couldn't learn C from K&R with me explaining things here and there -- the same way I learned C. The recursive descent parser doesn't come up until the end of chapter 5 (out of 8), right after quicksort is implemented with pointers to functions. By then the reader has built up some skills and presumably developed enough curiosity to refer to other books for more explanation of sorting and parsers. For me those were Knuth's "The Art of Computer Programming," especially the third volume with all of the great example code which I busily translated to C. If you think K&R is too hard for beginners consider how many programmers learned programming from the badly-typeset and somewhat inscrutable "Pascal User Manual and Report" (1974). That was the programming 101 text used at the local university when I was there.
- gregjor 15y agoAfter arguing I read the preface to Zed's book. He wrote "LCTHW will not be for beginners, but for people who have at least read LPTHW or know one other programming language." It seems LCTHW addresses the same audience as K&R after all.
- deleted 15y ago[deleted]
- zedshaw 15y agoNope, this book isn't for total beginners. I mean, it might work, but I'm actually telling the total newbs to go read http://learnpythonthehardway.org/ http://learnpythonthehardway.org/ first. My thought is teaching "computational thinking" is easier with a language like Python, so people should start there.