Practical Linux Programming: Device Drivers, Embedded Systems and the Internet
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.
email: leisner@rochester.rr.com
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Have you tried Boxen? It's a
2 hours 10 min ago - seo services in india
6 hours 42 min ago - For KDE install kio-mtp
6 hours 42 min ago - Evernote is much more...
8 hours 42 min ago - Reply to comment | Linux Journal
17 hours 28 min ago - Dynamic DNS
18 hours 2 min ago - Reply to comment | Linux Journal
19 hours 54 sec ago - Reply to comment | Linux Journal
19 hours 51 min ago - Not free anymore
23 hours 52 min ago - Great
1 day 3 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?



Comments
Re: Practical Linux Programming: Device Drivers, Embedded System
"the headers , and are included."
Did someone forget to escape their angle-brackets?