4 ms·
Why not base it on a project? If you want more people to do systems programming (I am assuming kernel and driver development), why not take something from http
by misham 16y ago
Why not base it on a project? If you want more people to do systems programming (I am assuming kernel and driver development), why not take something from http://kernelnewbies.org/ http://kernelnewbies.org/ and turn it into a simple project or write a character driver. People will learn how to write code for the Linux Kernel, learn how to interact with that community and perhaps become more interested in systems development as a result, if that is your goal.
In the context of writing a driver, you will have to cover concurrency, multi-threading, semaphores/mutexes, function pointers (callbacks), memory management, etc.
One personal side note, would be nice if you integrate TTD into the projects. The number of C developers that I deal with who do not understand the concept of a unit test is amazing.
Also, please cover C99 and talk a little about compilers, linkers and assemblers. You can concentrate only on one binary format (doesn't matter which one) as long as you explain a little bit about how your C code gets converted into machine format and what does that mean.
I would ask myself: "What makes my book on C different from all the other ones?"
Why should I spend my time on reading your book instead of any number of other tutorials or K&R?
EDIT:
Forgot to add, please provide a public repository for your code examples and start using something like Git right away. That's one thing I really enjoy from all the Rails books, they push you into using an RCS immediately.
- alnayyir 16y ago>Why not base it on a project? There might be a project. I'm modeling it after Zed's approach to some degree regardless. >(I am assuming kernel and driver development) Not particularly. >turn it into a simple project or write a character driver Nah. >People will learn how to write code for the Linux Kernel That is in fact, the opposite of what I'm trying to do. I want to teach C, not Linux. >would be nice if you integrate TTD into the projects I'll demonstrate how/why, it won't be an integral part of it. TTD is use-case specific, not a universal benefit. >The number of C developers that I deal with who do not understand the concept of a unit test is amazing. That's a cultural problem, not a pedagogical one. >Also, please cover C99 and talk a little about compilers, linkers and assemblers. I'm going to aim for implementation agnostic insofar as it's possible while keeping them aware of the caveats. What you're advocating is a significant departure from Zed's example. Not my goal. >explain a little bit about how your C code gets converted into machine format Implementation specific, outside scope. >"What makes my book on C different from all the other ones?" Out of scope of what I'm worrying about, it's a book, not a startup. >Why should I spend my time on reading your book instead of any number of other tutorials or K&R? Pretty sure you're not the crowd I'm aiming for, but I'll be happy if you can glean value from it. Most C books are provincial or overly prosaic. I'm not interested in explaining, I'm interested in whipping people into coders. They can get their compiler and language implementation from a Comp Sci program.
- zedshaw 16y agoNo, I disagree with most of this. A LTHW book covers just enough of the language that someone could then go learn the things you mention from another book. At the end you could lightly cover testing, but most people can barely get an editor installed. No way they can learn multi-threading, TDD, an entire project, and an RCS. It'd also dilute the focus of the book.
- alnayyir 16y agoWorded better than I did, agreed.