Practical Linux Programming: Device Drivers, Embedded Systems and the Internet
November 10th, 2002 by Marty Leisner in
Title: Practical Linux Programming: Device Drivers, Embedded Systems and the InternetAuthor: Ashfaq A. KhanPublisher: Charles River MediaISBN: 1-58450-096-4Price: $49.95
I became quite curious when I first saw the title of this book. I've been doing embedded systems for 15 years, sometimes writing device drivers, and have an extensive background in network programming.
The book contains chapters on:
installing Red Hat
installing a virtual web server using DNS, Postgres and apache, using virtual hosts to provide different functionality
writing simple device drivers, some of which control the parallel port
tasks and interprocess communication (pipes, FIFO, semaphores, message queues, sockets)
Perl programming
SQL using Postgres
shell script programming
fixed point arithmetic and Transcendental Functions
some sample embedded system design projects
The book is full of examples, and it comes with a CD of the examples. The books has a glossary but no bibliography.
I was surprised, to say the least, when I looked at the title and TOC contents. Most of the topics require several books on my bookshelf, but the author attempted to cover all of them in one book. The attempt, however, falls far short of complete and thorough coverage. In addition, the book is sprinkled with typos and errors. This is far and away the major problem with the book.
I liked the way the lines of code are numbered, followed by a discussion that refers to the line number(s). But they could have made better use of the print medium by using a different and smaller font for the line numbers, which would have made the listings easier to read. As it stands, there is one space between the numbers and the start of the listing, so it looks like this:
...
148) }
149) init init_module(void)
150) {
...
In addition, the listings don't have any blank lines, which makes them difficult to read.
In the chapter on fixed point math, one listing has 555 lines, with no blank lines or indentation. Look at the listing on the disk, however, you see indentation and blank lines, a far more readable presentation. (I just happened to notice it's a DOS file--with CR-EOL, not a UNIX file with only EOL characters). This chapter was fairly good overall. But when building embedded systems without floating point hardware, its very useful to know how to look at a problem as an integer problem and not as a floating point problem. I've never used fixed point math in my career (but it's nice to know).
The accompanying CD has only 22MB of information on it, so there's extra space they could fill up with all types of useful stuff, as well as links to various sites on the Internet. Furthermore, more than 18MB are third-party packages you could easily get off the Internet, including dodabase, cups, esp print pro and anjuta.
Two other files on the CD are called "About the CD.rtf" and "In this CD.doc". I could read the RTF file with a recent version of OpenOffice, but the .doc file crashed. I find it interesting you need to use Microsoft products for a book about Linux!
Another problem is I'm not sure whether this book is for wizards or newbies. In many (but not all) cases where it discusses an example on the CD, it spends half a page showing the mount, mkdir, cp and cd sequences. Once? Maybe. But sprinkled throughout the book? And this book discusses writing device drivers? I was scratching my head by this point.
It seems important spaces were deleted randomly all over the book. Discussing message queues, in the structure msqid_ds, the book has the elements:
time_tmsg_stime;
time_tmsg_rtime;
time_tmsg_ctime;
Of course this means:
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
But the reader is supposed to be in learning mode, not correcting mode.
I'm from a minimalist school of programming: only do what is necessary for the task at hand. In a 40-line example to demonstrate fork, the headers <sys/socket.h>, <arpa/inet.h> and <netdb.h> are included. I have no idea why. In addition, the fork example is linked with -lpq -lcrypt--again I have no idea why. To top that off, what the example actually outputs isn't what is in the book (there's a bug in the code of a meaningless program). Be warned, your coworkers may use this book as an excuse to do bizarre things.
It's unusual for a technical book to be published without an email address to contact the author or the publisher, but this book has neither. This fact is doubly interesting considering the number of typos and errors I found. The publisher's web site lists errata for the book, but it is small and talks about minor errors. It seems every time I open up the book while I'm writing this review, I find typos.
In summary, the books covers a lot of ground. But it covers everything so sparsely that it seems good for building and running only the contrived examples. Overall, I'm very disappointed with the book. I'm glad I didn't use it to try to learn a topic.
Marty Leisner has been using Linux for the last 7 years, GNU software for 15 years and UNIX for 20 years. He's a professional programmer, often building embedded systems, hopefully in the future with Linux.
Special Magazine Offer -- 2 Free Trial Issues!
Receive 2 free trial issues of Linux Journal as well as instant online access to current and past issues. There's NO RISK and NO OBLIGATION to buy. CLICK HERE for offer
Linux Journal: delivering readers the advice and inspiration they need to get the most out of their Linux systems since 1994.
Sorry, offer available in the US only. International orders, click here.
Subscribe now!
The Latest
Featured Videos
Linux Journal Live - Oct 9, 2008
October 9th, 2008 by Shawn Powers
The October 9, 2008 edition of Linux Journal Live! Associate Editor, Shawn Powers, and Kyle Rankin, "Hack and /" columnist and author of Knoppix Hacks, Linux Multimedia Hacks, Knoppix Pocket Reference and others, discuss Linux distributions.
Linux Journal Live - Oct 2, 2008
October 3rd, 2008 by Shawn Powers
The October 2, 2008 edition of Linux Journal Live! Associate Editor, Shawn Powers, and Steven Evatt, Online Development manager for The Houston Chronicle discuss surviving disaster with Linux.
Recently Popular
From the Magazine
November 2008, #175
There aren't many numbers that put the US national debt to shame, but here's one: 1,100,000,000,000,000. What's that? That's how many floating-point operations per second the Roadrunner supercomputer at Las Alamos can perform. That's about 100 FLOPS per dollar of US debt (unfortunately, the debt is winning the second derivative race). Read the article about Roadrunner in this month's High Performance Computing issue of LJ.
Along with that, find out how to program the Cell processor and how to use CUDA with your NVIDIA GPU. Also in this issue: Mr HandS (aka Kyle Rankin) gives us a few tips on using Compiz, Chef Marcel shows you how to get blogging off your plate quicker, Mick Bauer talks about Samba security, Dan Sawyer interviews Cory Doctrow and Doc talks about how information technology can affect democracy and fix the national debt (just kidding about that last part). That and more for your reading pleasure in this month's Linux Journal.
Delicious
Digg
Reddit
Newsvine
Technorati








Re: Practical Linux Programming: Device Drivers, Embedded System
On November 10th, 2002 Anonymous says:
"the headers , and are included."
Did someone forget to escape their angle-brackets?
Post new comment