Beginning Linux Programming, 2nd Edition 55
Beginning Linux Programming (Second Edition) | |
author | Neil Matthew & Richard Stones |
pages | 897 |
publisher | Wrox Press, 09/1999 |
rating | 8.5/10 |
reviewer | Kurt Gray |
ISBN | 1861002971 |
summary | A big meaty serving of Linux programming know-how |
What I'm reviewing here is actually a pre-press draft of the second edition of "Beginning Linux Programming", the first edition of which I reviewed here on Slashdot back in August. Unfortunately this review is two months late; enclosed in the cover jacket I found scrawled message from the publisher addressed to Hemos: "Here's the review copy ... Sept 23 is publication date so a review on Slashdot for then would be great!" ... DOH! Sorry Rob M.
So let's review what I griped about in my previous review of the first edition of this book:
- Content was not Linux specific
- Little mention of perl
- Content was dated to around 1996/97
- No mention of newer API's like GTK+
diff first_edition second_edition:
Most of the book is the same content as the first edition (with newer illustrations and some areas elaborated in more detail), which again see my previous review for more details on that, with these new sections have been added:Foreward by Alan Cox: Yes, the king of all patch writers himself lends 5 paragraphs to kick off this new edition summing up by pointing out we now have a new final chapter (Device Drivers) that "is your chance to join the world of kernel hackers" ...so... "put on your pointy hat, grow a beard, drink Jolt Cola, and come join in the fun."
POSIX Threads: Now for Chapter 11 we have 25 pages on POSIX Threads with gotchas specific to Linux. Thread scheduling, semaphores, and mutexes are demonstrated in code.
GNOME and GIMP Toolkit: Chapter 17 is 30 pages devoted to GNOME and the GIMP Toolkit (GTK+) The code examples walk you thourgh creating a simple window, adding widgets to the window, dialogs, button bars, canvases, slider bars, then the CD includes source the ubiquitous Audio CD catalog application written in GNOME. (The authors score bonus points with me by showing a screen shot of the CD column with Nirvana's "In Utero" prominently selected in a multi-column listbox.)
Perl: Chapter 18 is a 30 page introduction to perl covering hashes, special variables, regular expressions, file I/O, etc. Bonus points to the author for explaining how to use CPAN to install modules and the perldoc command.
Device Drivers: Chapter 21 is 75 very useful pages that dig into kernel hacking. By the fourth page in this chapter we have a simple "Hello World" code snippet written as a kernel module, then simple instructions on how to compile your kernel module, load your kernel module (insmod), view messages from your module (dmesg), list loaded modules (lsmod), then unload the module (rmmod). The rest of the chapter discusses kernel API specifics such as timers, task queues, the /proc file system, interupt handling, and memory management. The chapter then discusses the simple RAM Disk Module example included on the CD, and debugging your kernel modules.
What's Good
Not only does all the material from the previous edition included in this printing, but more meat, diagrams and screenshots have been added to each existing chapter. Again, I also like the style of presenting code examples right up front in each chapter rather than making the reader wade through endless pages of droning before seeing concrete examples.What's Bad
I'm hard pressed to find anything outright bad about this book. I suppose I could make catty remarks about the ties the author are wearing in the cover photo, but I don't wear ties so what the hell do I know?Purchase this book at fatbrain.
Table of Contents
- Chapter 1: Getting Started
- Chapter 2: Shell Programming
- Chapter 3: Working with Files
- Chapter 4: The UNIX Environment
- Chapter 5: Terminals
- Chapter 6: Curses
- Chapter 7: Data Management
- Chapter 8: Development Tools
- Chapter 9: Debugging
- Chapter 10: Processes and Signals
- Chapter 11: POSIX Threads
- Chapter 12: Inter-process Communication: Pipes
- Chapter 13: Semaphores, Message Queues and Shared Memory
- Chapter 14: Sockets
- Chapter 15: Tcl: Tool Command Language
- Chapter 16: Programming in X
- Chapter 17: Programming GNOME using GTK+
- Chapter 18: The Perl Programming Language
- Chapter 19: Programming for the Internet: HTML
- Chapter 20: Internet Programming 2: CGI
- Chapter 21: Device Drivers
- Appendix A: Portability
- Appendix B: FSF and the GNU Project
- Appendix C: Internet Resources
- Appendix D: Bibliography
The first edition was(is) great (Score:1)
Looking for things to criticize? (Score:2)
that not covering Qt/KDE might be worth
criticizing as much as not covering GTK+/GNOME
(in the last edition) - GNOME might be YOUR
preference, but as an editor you should IMHO
try to be impartial.
Then again, I don't want to advocate "political
correctness", so just bang on!
That was a review??? (Score:1)
"Read my old review. They fixed all the problems I mentioned in that old review. Go buy this book.".
That has to be one of the most lame reviews I've ever seen.
*sigh*
yack0
I am reading this book right now.. (Score:2)
How complete is it? (Score:1)
Buying information (Score:3)
Bookpool. com [bookpool.com] has it for $24.50, on backorder. It cost me $9 for 2 day fedex and got it the next day for the first edition.
Re:The first edition was(is) great (Score:2)
I haven't heard about the Stevens book yet, but I just found it on Amazon. I agree that this is a terrific book. Between "Beginning Linux Programming" and "Linux Application Development" by Johnson and Troan, I've been able to get in touch with my inner-geek. Seriously though, it's made it possible for me to write some great utilities. For those of us who are out of college and don't have any collegues at work able to write anything but VB (yack!) book like this make it possible to get our foot in the door.
I'm glad to see the GTK+ info included. For anyone who wants to do GUI programming, another fantastic book for getting started is "GTK+/Gnome Application Development" by Havoc Pennington.
Re:That was a review??? (Score:2)
Damn good book. 'nuff said!
Anyone want to buy a first edition? (Score:1)
Incidentally, Amazon UK [amazon.co.uk] have it for sale at ukp21.83 plus p&p here [amazon.co.uk], which seems like quite a nice price to me. Their review is similarly positive.
The book covers GPL friendly stuff ... (Score:3)
1) The authors a big fans of GPL software.
2) The book focuses on C not C++.
As the book is geared towards those transitioning from Windows, it may be an oversight to not include any C++ stuff. However, for those just starting out on Linux, GTK+ is a far simpler introduction to X programming than Qt.
And before someone flames me, let me add that my own personal preference is GTK+, but Qt is also a damn file GUI toolit - especially for cross platform (Win32 and Unix) apps.
Chris Wareham
Beginners only? (Score:1)
However if one consider the wide area it covers there might be that this book covers areas I've ignored so far - like e.g Posix threads, kernel modules etc. I don't suppose you get books covering kernel hacking....
I love this book! (Score:2)
One thing I was really surprised with was that the authors did not waste the reader's time with explaining every stinking line of code. They show you the example and then let you go do it. I like that.
I think they treat the whole thing like "Okay, so you want to program in PERL? Here we go then!" and off ya run. I can't think of any other books that treat programming this way.
I like that.
Pages ... (Score:1)
Just a minor thing: When I ordered it was listet as having 980 Pages opposed to 897 Pages mentioned in the Review.
Has there been some kind of change or just different ways of counting?
Re:Beginners only? (off topic) (Score:1)
Sorry to disappoint you, but I'm not related to that project. Can't take credit for something that's not my work - but I agree - the Lothar project have something good going. To avoid devious speculation: Have had the same nick for 5 years....
GTK+ simpler? (Score:1)
I haven't done much GUI programming, only a tiny little bit of AWT and a tiny little bit of Qt. In my perception so far, the general design of all such toolkits seems pretty similar, one main difference I could find was type-checking of callbacks. Here Qt does have an advantage over other GUI toolkits.
Yet, since I haven't done much GUI programming,
my view is a pretty theoretical one.
So, from your perspective, what are the main
differences between Qt and GTK+ and why is the latter easier for beginners?
Re:Beginners only? (Score:1)
Linux Core Kernel Commentary [amazon.com]
Linux Kernel Internals [amazon.com]
The Linux Kernel Book [amazon.com]
Linux IP Stack Commentary [amazon.com]
Plus, this book has some kernel stuff in as well...
Churn and Burn and Learn! (Score:1)
Books come out with new editions. Deal with it. Paying 40$ for a book every once in a while is nothing like paying 100$ per client for every machine on your network and 1000$ for every server. This system produces great documentation for software and I will never bitch about having to drop forty damn dollars every two weeks for excellent information.
Thank you O'reilly, and thanks to all the great open source authors.
Pinche Gonzales
Just read it. (Score:1)
80% of contents was not new for me (many-years Unix programmer), but I'm happy to find it clearly written somewere, else than in man pages and in my brain (which is not so much reliable anymore ).
The 20% I didn'n know ( device drivers, some of perl, some of GTK+, TCL/TK ) is more than enough for my money.
First edition impressions (Score:1)
Another strong point that a lot of people haven't commented on is how well the code examples are edited. All too often, I have purchased books only to find their example code is buggy or doesn't even work at all. All of the examples I've tried in this book worked perfectly. To top it off, a lot of their examples are evolutionary, meaning you start with a simple program using basic techniques and add to it over a few sections/chapters until you have a robust/advanced application.
Even if you are a more experienced Linux programmer, this book serves as a great reference. I definitely recommend picking it up!
Re:I love this book! (Score:1)
I also talk about the book on www.perl.com [perl.com] where I explain why I think Perl is great for people who haven't programmed any other languages before.
Simon
Anything on Autoconfig & Automake? (Score:1)
Re:GTK+ simpler? (Score:1)
Chris Wareham
Re:GTK+ simpler? (Score:3)
The casts that most people complain about in GTK+ are actually an elegant solution to the problem of an Object Oriented toolkit in a essentially non-OOP language. This allows some very clever error handling. The odd thing is that every criticism of GTK+ I have seen is of the "the code looks ugly" variety. These people should try actually *coding* in it sometime.
As for Qt, I will reiterate my point that it is a fine toolkit. I feel that ultimately a novice will have more grasp of C than C++ and will therefore prefer GTK+ for dabbling in X programming.
As I suggested in my first post, many Windows programmers are transitioning to Linux, so C++ may not be an obstacle to using Qt. In that case both toolkits make excellent options for X applications.
As for Qt coverage in the Beginning Linux Programming book, I assume the authors fondness for the GNU license is the main reason for Qt's ommision.
Chris Wareham
Re:Churn and Burn! (Score:1)
You see, not only is all the source code from the book GPL'ed and available from Wrox's web site, but the new contributors were allowed in their contracts to publish their chapters as part of their web sites. For what it's worth, here's the Perl chapter [compsoc.net].
If individual authors don't release their work, that's their prerogative. But it isn't the publisher's fault.
And that doesn't just go for Wrox - O'Reilly authors are permitted to publish their work under whichever license they like. Most of them choose not to publish under open licenses because they know they will receive less royalties. :)
(I don't get royalties for the Perl chapter, so I can say what I like.
In both cases, the publishers have been committed to Open Source, and have allowed their authors the freedom to follow through their Open Source beliefs. I've done that with the Perl chapter. Look around on the web sites of the other contributors. I'm not saying you will find anything, only that you might.
But don't blame the publishers.
Help, which book? (Score:1)
Re: You call this a comment? (Score:1)
Looks like the last was not 'nuf said'.
yack0
More Linux Books (Score:1)
Linux Application Development"
Johnson and Troan
http://www.amazon.com/exec/obidos/ASIN/02013082
Developing Linux Applications with GTK+ and GDK
http://www.amazon.com/exec/obidos/ASIN/07357002
Advanced Programming in the Unix Environment
Steven.
http://www.amazon.com/exec/obidos/ASIN/02015631
Please moderate the parent post as informative.
Kernel commentary (Score:1)
Good book for Beginer? (Score:1)
Re:Churn and Burn! (Score:1)
Secondly, many companies and ESPECIALLY Microsoft do give you value for previous investments. It is called 'the upgrade version'. Microsoft has a long tradition of supplying full price versions and cheaper upgrade versions on it's software. Were you somehow ignorant of this well known fact, or did you just spout off without thinking? As for Red Hat, you can download the newest version for free or order it from someplace like CheapBytes for a couple of bucks. I just don't see the 'churn and burn' that you are talking about.
Thirdly, how would you propose that they supply the second edition changes to you for only 'a nominal fee'? Should they publish a small booklet with the extra chapters? There is a lot of fixed costs in creating a book big or small. The booklet will have to be priced high enough to cover all the costs including these fixed ones. They'd lose their shirt on it anyway because no one is going to buy the stupid booklet, and no stores are going to carry it anyway.
The only real option would be soft copy on a web site, available to everyone since there isn't any real way of checking to see if you bought the first edition. Not many people would be interested though, and all it could do is harm sales. No real point.
Fact is, if you don't want the second edition, don't buy it. If it doesn't have enough new material for you to justify spending the cash then you don't have to. If you do buy it, then obviously the new material added enough extra value for it to be worth your while to spend the dough, and you have no complaint coming.
Arrrgghh!! (Score:1)
Time to quit playing so dern much Quake3...
Qt is *very* simple! (Score:2)
While I have not actually programmed with GTK+, it does appear to be a lot more verbose than Qt, and somewhat reminiscent of Motif/Xt programming...
It's an expanded reference and quick tutorial (Score:2)
I used to use it as a quick tutorial for things I had never done. The examples start out as simple as possible and expand through the chapter. It would be great for learning socket programming, for example, but once you've mastered it, better get Stevens and keep on learning -- it definitely won't cover the real nitty gritty.
I really appreciate that even tho the examples are dead simple, the authors don't talk down to you as those 24 hour books do.
I am going to buy two copies of this 2nd edition; one for me, and one for a friend's 16 year old who is learning C and Perl on Linux.
--
I have the first version, it sucks... (Score:1)
A smattering of this and that. (Score:2)
Based on this book you are not likely to be able to program much beyond a few simple utilities that make use of the most basic features of a given programming environment.
The good news is that if you really are unfamiliar with the topics it covers, this book lays out the sign posts needed for you to get started in learning the topics it covers. I bought it for that purpose, and I am pretty happy with it.
The worst part about this book... (Score:1)
Re:Help, which book? (Score:1)
It's really more complimentary to BLP. I've never
really felt the need to buy the L&O book. You
can learn most of that stuff as you go along, and the info pages on this material are really quite good.
Note that despite the "Beginning" title you need to be quite comfortable with C
before tackling BLP. For instance, they don't
explain some of the simple modular programming
techniques they use. You might check out the
"Linux Programming in 24 Hours" book if you
are interested in a more intermediate text that I think is good for those who only know "schoolbook" C.
Re:I am reading this book right now.. (Score:2)
Re:Beginners only? (Score:1)
Re:Kernel commentary (Score:1)