Tuesday, July 5

Another reason Software Sucks

I'm reading through Kernighan and Ritchie's seminal book, 'The C Programming Language'. I should have done this a long time ago; it's an important book, and a pretty good overview of the language.

The problem with it is that it completely ignores modern software development practice.

Without getting into the sordid details, I now understand a lot better why people like Joel Spolsky write so passionately about code quality, emphasizing things that are second nature to me. Many people learned to code from K&R, or from people who learned from K&R. And though K&R properly emphasizes elegance and speed, it does so at the expense of readability, maintainability, and security. Eugh.

2 comments:

Anonymous said...

Get a grip. The book is quite old, but despite that, it involves reasonably good C programming practice and idioms. You may or may not be familiar with them; They tend to make programs easier to read, not harder. Btw, Sopolsky is seriously overrated.

Fraxas said...

Why is Spolsky overrated? Seriously, I'm interested in your opinion, anonymous coward.

Given K&R's status as pretty much the foundation book for C, K&R's idioms are 'reasonably good' practice because they're K&R's, not the other way 'round. They make programs easier to read because most programs are written that way. Also note I'm not saying they're without merit; they're optimized for elegance and speed, just not readability and maintainability.