Quote:
Originally Posted by ocicat
Choose one of the better Open Source projects, & study their code base. As examples, both the PostgreSQL & SQLite projects are frequently referred to having clean code which is well tested.
|
I'm thinking the Plan 9 code would be another good exemplar. I haven't read much of it, but once saw an excerpt of driver code that looked hardly any different from the application code I'm used to dealing with. That is, I usually look at driver code and throw up my hands thinking, "no way I'll understand this anytime soon," but not with their code so much.
If you're interested in kernel programming, maybe you'd want to read the Minix source code or Lions' Commentary on UNIX 6th Edition. The latter more for the system design than the style of C used.
I remember also OpenSSH code being quite pleasant to read.