Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Linux Books Media Software Book Reviews

Beginning Linux Programming, 2nd Edition 55

The first edition of this fine book, written by Neil Matthew and Richard Stones, remains one of the top-selling books that we've ever reviewed on Slashdot. At the beginning of this fall, the 2nd edition was introduced, to much fanfare, and a review by Kurt Gray. Click below to find out what's improved, or what's declined.
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+
...and this edition I'd say all those issues have been addressed, in fact now we have entire chapters for Perl and 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
This discussion has been archived. No new comments can be posted.

Beginning Linux Programming, 2nd Edition

Comments Filter:
  • I have used the first edition almost every day at work and its been way more useful than Steven's Advanced Programming. Not to put down Steven's tome, but its not a beginner's book by any means. Ironically, I've used the Beginning Linux Programming mostly to work with Solaris and not with Linux, there's really not too much strickly Linux about the book most of it is generic *nix stuff.
  • Well, if you ARE looking for them, you might find
    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!
  • Shall I paraphrase the review?

    "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

  • This is a great book!! I bought it a few weeks back and I have read about 3/4 of it already. The examples are good and it doesnt take an experienced C programmer to understand what is going on. Plus it just flat out covers alot of ground. My only gripe was that it did not spend alot of time on Sockets and the terminal programming. Otherwise it touches Perl, Tcl, Gnome, C, Shell programming, Html, CGI, blah, blah, blah... Being a Java/VB programmer (and a newbie to the C lang) I have learned quite a bit from this book so far. zI
  • From the depths of code mongering, it's refreshing to see a Linux development book that explores the details of linux and code semantics. I do question if this book is as useful as Linux application development(which I'm sure everyone has a copy). I've been into linux for about 3 years now and Unix for at least 7 years, and I find it very hard to find a resource (besides Dr. Linux) that explores Linux from simple howtos to kernel hacking. I will definitely check out this one at Borders.

  • by dattaway ( 3088 ) on Monday November 29, 1999 @04:45AM (#1496953) Homepage Journal
    F atbrain.com [fatbrain.com] has it for $31.95 in stock.

    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.

  • 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.

  • Shall I paraphrase the review . . .

    Damn good book. 'nuff said!
  • Aw, damn. The first edition was so great I've already bought that. The second edition addresses most of my problems with the first, so it looks like I'm gonna have to buy it too...

    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.

  • by LizardKing ( 5245 ) on Monday November 29, 1999 @04:57AM (#1496958)
    Qt was probably not covered for two reasons:

    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
  • For someone who's been doing Linux programming for some years this book may not have the same interest.

    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 bought it a few weeks ago and although I have not really gotten into the nitty gritty of doing anything with it yet, I think it is probably one of the best books I own.

    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.

  • by Anonymous Coward
    I just ordered it ...
    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?

  • > If you're the same Lothar who soundcard/system thingee, thanks. You rock hard

    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....


  • Is it? For what reason?
    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?
  • Actually, you do:

    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...

  • This is the philosophy that makes open source so good. Linux would not be worth it's salt if it didn't constantly evolve and develop. I'm still running Redhat 5.1 servers (I was not forced to upgrade) but I'm sure glad 6.0 is out, where the hell is 7.0?? The point is you can download your own Redhat, Debian, whatever for free. This speed of development is refreshing compared to Microsoft's 5 year product cycle.

    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
  • Purchased two weeks ago. Read (almost) everithing in an long intense week.
    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.
  • The first edition simply rocked. While it didn't go into complete detail on every topic (which would be impossible considering the number of areas touched on), it gave enough information to get you started. In paticular, I really liked their chapter on programming using network sockets. They offered several different approaches, starting with basic communication to more advanced servers handling multiple clients.
    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!
  • Glad you liked it. :) I'm the guy who did the Perl chapter, so if that sort of thing is your style, look out for the forthcoming Beginning Perl [amazon.com] where I do just that! Will be coming out in January.

    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

  • I remember the lack of discussion on these tools was a critizism of the first book (or I've got my books mixed up)? Does any book cover these in the detail needed for a first timer?
  • Having programmed with Qt and GTK+ (along with Motif, XView and the Athena widgets), I can confidently say that while GTK+ looks ugly to the uninitiated, it is far easier to use than Qt. 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
  • by LizardKing ( 5245 ) on Monday November 29, 1999 @07:02AM (#1496978)
    Having programmed with Qt and GTK+ (along with Motif, XView and the Athena widgets), I can confidently say that while GTK+ looks ugly to the uninitiated, it is far easier to use than Qt.

    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
  • Well, you might think that. I don't.
    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.

  • I've got a few weeks to play around with programming on my Linux machine and am trying to decide between the reviewed book (Beginning Linux Programming) and Programming with GNU Software by Loukides & Oram. Any opinions/suggestions on which book would be better to work through? Thanks!
  • Naw.. why bother posting another 'review' which is simply a bulleted listing of 'good' vs. 'bad' points of a book. It simply shows the typical review quality (or lack thereof) of many slashdot reviews.

    Looks like the last was not 'nuf said'.

    yack0

  • Here are the links for some of the books people have mentioned previously:

    Linux Application Development"
    Johnson and Troan
    http://www.amazon.com/exec/obidos/ASIN/020130821 5/qid=943900958/sr=1-2/102-1105150-5362405

    Developing Linux Applications with GTK+ and GDK
    http://www.amazon.com/exec/obidos/ASIN/073570021 4/qid=943900958/sr=1-1/102-1105150-5362405

    Advanced Programming in the Unix Environment
    Steven.
    http://www.amazon.com/exec/obidos/ASIN/020156317 7/qid=943901385/sr=1-1/102-1105150-5362405


    Please moderate the parent post as informative.
  • Just like to ask you guys, how is the linux kernel commentary book? Is it worth buying?
  • I have been looking for a good book to get into Linux programming .. I have a small c++ background but when I was taught they kept things like project management, make files and the like shielded from us. Would this book cover things like that .. or is there a better book for what I am looking for? Somehow I have a feeling I am not the only one who would like to see something like this.
  • First off, the publishing industry has nothing whatsover to do with OSS, Microsoft, or Red Hat except that they publish books on their products and so forth. Where is the tie-in here? Microsoft does have it's own publishing company Microsoft Press, but that is a pretty specific entity devoted to publishing resource kits and training kits. The practices of the publishing industry are well established and seperate.

    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.

  • and I haven't even finished the first version (which rocks).

    Time to quit playing so dern much Quake3...

  • I was writing my own Qt widgets and apps within a few hours (a lazy afternoon at work) of downloading it. It really is incredibly clean and simple (assuming you're comfortable with C++). To create a new widget, just inherit the base class and override a few methods! The signal/slot mechanism for associating actions with events is brilliant. The online documentation for Qt is superb!

    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... :-(

  • I use it as a reference when I don't remember the details, say something I seldom use, and a man page is a little too bare bones.

    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 in my opinion. What documentation they do provide is OK, but they don't go into enough depth in anything to make it really worthwhile. It can't compare to O'Rielly and Associates (ORA) books (e.g., Programming Perl, etc.). I'm of the belief that a beginner is far better off getting a reasonable foothold in one or two languages, than a superficial understanding of many. Perhaps the 2nd edition is improved (with all the recent linux attention...), but I doubt it.
  • I think that this is a good book to introduce folks to a variety of the ways of doing things under Linux. But don't kid yourself - it is only scratching the surface of the various topics it covers.

    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.

  • ...I only just bought the first edition a few months ago. ARGH!!!
  • The L&O book covers the tools rather than coding.
    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.


  • What this book really needs is a companion; advanced Linux programming ... to go into more depth in some more esoteric areas. It would be nice to have a reference guide too, but for me that's just the PERL man pages and the developer.gnome.org site.
  • are there any of these that focus on v2.2 kernels?
  • There was a review [lwn.net] on lwn.net [lwn.net] a couple of days ago. They didn't like it much.

"Beware of programmers carrying screwdrivers." -- Chip Salzenberg

Working...