Slashdot Mirror


Linux Programming By Example

Craig Maloney writes "Linux Programming By Example is a book aimed squarely at programmers learning how to program the Linux and UNIX system for the first time." Read Craig's review of Linux Programming by Example (below) to find his take on whether the book delivers on the promise of its title. Linux Programming By Example author Kurt Wall pages 533 publisher QUE (InformIT) rating 9/10 reviewer Craig Maloney ISBN 0789722151 summary Linux Programming by Example is a concise and solid introduction to programming under the Linux system. Excellent instructions accompany fully-working examples of code.

There are plenty of books on this topic as any trip to the bookstore will show. Where this book excels compared with other Linux programming books is its consistent focus throughout. Other books tend to explain a multitude of concepts without relating them back to a real-world example. In Linux Programming By Example, the author introduces a concept, and explains it with an example. In the last chapter, the author integrates the knowledge he's presented, utilizing many of the book's concepts in building a simple CD-Database program. Of course, not all of the concepts relate to the final CD database (The chapters TCP/IP Programming, The Sound API and Using the Mouse are not referred to in the final program), but it's helpful for beginning programmers unsure how all of these pieces fit in the bigger picture of a working program.

Begin at the beginning

Linux Programming By Example begins with topics that don't get covered until the end of many books. The book starts by discussing how to use GCC and make on a Linux machine, and how to create a Makefile. It's always puzzled me why some books don't cover the compiler or the make process until the end of the book. What's the point in that? Granted, chapters in debugging and RCS are left to the end of the book, but presenting key concepts in the development process early in the book helps the reader to get a better feel for how all of these concepts interrelate in a Linux/UNIX environment.

Moving forward

From the basics of compilation and making programs, the book moves to the basics of a Linux system in Part II: System Programming. This is where the book truly shines. In the section on processes, Wall discusses the elements that make up a process, how to manipulate a process, and why you would want to do this anyway. The book assumes no prior UNIX knowledge, but doesn't plod along like most introductory texts. In the section on signals, the book defines what signals are, early signal APIs and their issues, POSIX and Linux signal APIs, and how to use signals and signal sets. In this chapter, the author not only lists the signals supported by the Linux system, but also other signals supported by POSIX and other UNIX systems. While this might sound confusing, the author takes time out to explain which signals are really important in a Linux environment. This is a key reason why this book retains its readability without losing depth. Each chapter in the System Programming portion of the book retains this format -- not only demonstrating what the topic is, but also where this fits in a Linux/UNIX system and why you would even bother to know this in the first place.

What's good?

Linux Programming By Example is clearly aimed at getting programmers up to speed on not only programming Linux systems, but also POSIX based systems. Wherever possible, the author makes a point of pointing out the POSIX way. This book could have been easily called POSIX Programming by Example. The author also makes no bones about implementation issues with Linux and the POSIX or System V way of implementation. The book clearly states where Linux falls short of the full POSIX standard, and where pitfalls with porting code from other systems may occur. It's a refreshing change from other beginner texts which assume the reader will discover these pitfalls on their own.

So what's in it for me?

If you're looking for a quick, effective way to get up to speed in Linux and UNIX programming without breaking the bank, Linux Programming by Example is the book to take you there. This book is designed for programmers who are familiar with programming on other systems but haven't dealt with Linux before.

You might have trouble locating this book, since QUE let it lapse for a while, but there should be another batch hitting stores soon. You won't be disappointed.

You can purchase Linux Programming By Example from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

155 comments

  1. Chicken and egg by Ed+Avis · · Score: 4, Funny

    But where is the 'Reading By Example' that tells you how to read this book?

    --
    -- Ed Avis ed@membled.com
    1. Re:Chicken and egg by mr_z_beeblebrox · · Score: 1

      But where is the 'Reading By Example' that tells you how to read this book?

      More importantly, I do not understand examples, what about "examples by example".

    2. Re:Chicken and egg by aridhol · · Score: 1

      Yup. Just log in as a user, go to your preferences page, and select 'messages'. You can chose how many virtual points you want to add or subtract for each mod type.

      --
      I can't say that I don't give a fuck. I've just run out of fuck to give.
    3. Re:Chicken and egg by blancolioni · · Score: 1

      Wasn't there some talk about being able to filter out comments moderated as "funny"? Did anything ever come of that?

      On your user page, preferences tab, comment options, there's a section called "Reason Modifier", in which you can penalize funny posts.

      Of course, everybody's going to call you a curmudgeon, but you can probably filter that out too.

    4. Re:Chicken and egg by Ed+Avis · · Score: 1

      Maybe there should be two distinct moderation options, 'Slashdot funny' and 'actually funny'.

      --
      -- Ed Avis ed@membled.com
    5. Re:Chicken and egg by alkali · · Score: 1

      Like bananas, the color red, and Kazakhstan.

    6. Re:Chicken and egg by krisguy · · Score: 1

      More like "funny -haha!" and "funny -ewwwwwkay?"

      --
      I'm a hamker. Hams, hackers, same ethos, different medium. == 73 de KB0STG
    7. Re:Chicken and egg by Anonymous Coward · · Score: 0

      Ha! You beat me to the punch!

  2. WROX press books also very good on the subject by vasqzr · · Score: 4, Informative


    I've always liked the the red books.

    B&N

    1. Re:WROX press books also very good on the subject by Anonymous Coward · · Score: 0

      Exactly my thoughts.

    2. Re:WROX press books also very good on the subject by Anonymous Coward · · Score: 0

      They suck. They also have bad pictures of (bad looking) developers on the cover.

    3. Re:WROX press books also very good on the subject by Anonymous Coward · · Score: 0

      Their cover sucks, agreed. But their beginning linux programming is excellent book.

    4. Re:WROX press books also very good on the subject by PleaseDontBeTaken · · Score: 1

      And the WROX Linux programming book features...a dvd store database. Hmmm...

      --
      --
  3. Excellent by TerryAtWork · · Score: 2, Interesting

    I've been looking forward to a book like this - I hope it'll wean me off my years of windows programming and step up into the majors...

    --
    It's Christmas everyday with BitTorrent.
    1. Re:Excellent by Pfhreakaz0id · · Score: 0, Offtopic

      no mod points today, but -1 Troll

    2. Re:Excellent by mr_z_beeblebrox · · Score: 1

      I hope it'll wean me off my years of windows programming and step up into the majors...

      I'll bite, so why do you feel that years of Windows programming has left you in the minor leagues? I would think your league is somewhat indicated by pay check and years of windows development should pay nicely.

    3. Re:Excellent by TerryAtWork · · Score: 3, Insightful

      Maybe I'm pathetically striving for geek chiche, but I have always felt that the *nix school is the next level up.

      They seem so free of the weird little troubles that plague windows people, they are in charge of their own systems and not spoon fed like windows users, they run the entire Internet (at least the bedrock of it), and they have a system that has remained fundamentally almost unchanged for 30 years in this turbulent industry.

      I interpret that as a sign of evolution into perfection, or something like it.

      --
      It's Christmas everyday with BitTorrent.
    4. Re:Excellent by spectecjr · · Score: 2

      Maybe I'm pathetically striving for geek chiche, but I have always felt that the *nix school is the next level up.

      They seem so free of the weird little troubles that plague windows people, they are in charge of their own systems and not spoon fed like windows users, they run the entire Internet (at least the bedrock of it), and they have a system that has remained fundamentally almost unchanged for 30 years in this turbulent industry.

      I interpret that as a sign of evolution into perfection, or something like it.


      Don't get mixed up between perfection and people who affect an air of superiority/snobbery.

      There's a big difference. Perfection? Unix ain't it.

      Simon

      --
      Coming soon - pyrogyra
    5. Re:Excellent by Moloch666 · · Score: 1

      It's the closest you'll find to perfection.

      --
      Understanding is a three-edged sword. -- Kosh Naranek
    6. Re:Excellent by spectecjr · · Score: 1

      It's the closest you'll find to perfection.

      In what régime?

      It's certainly not the 'perfect' OS by any stretch. There are systems with more cohesive GUIs out there. There are systems with better handling of removable media out there. There are systems with better real-time support out there. And woebetide you if you try to run Linux on a parallel processor machine.

      There's no such thing as perfection. It's an abstract concept. Everything is a shade of gray somewhere in a continuum of choices.

      --
      Coming soon - pyrogyra
    7. Re:Excellent by Moloch666 · · Score: 1

      It's the closest you'll find to perfection.

      Sorry if that's not clear. I never said it was the perfect OS. In fact it is far from perfect, but read the first sentence again. Closest to perfection.

      In reply to better GUIs. Most Unices exceed in their lack of GUI. Nothing like a headless machine when you are limited on keyboards and monitors. If you need a GUI there is plenty of window managers out there.

      --
      Understanding is a three-edged sword. -- Kosh Naranek
    8. Re:Excellent by Anonymous Coward · · Score: 0

      Unix has the worst GUI ever created. The only thing it's good for is changing the look and feel of the windows. And who cares about that?

    9. Re:Excellent by be-fan · · Score: 2

      It's an academic thing. Windows might be a commercially successful platform, but from an academic point of view, it's ugly. One look at Win32 is enough to see that it is a utilitarian API, not a clean, elegant one. Sure, Windows development may pay well, and I don't mean to slight Windows developers in the least, but there is a difference between a VB code monkey and a professor of computer science. In most people's minds, Windows and UNIX are representative of that distinction. Is this view arrogant? Undoubtedly. However, that arrogance is not entirely unjustified, and may be useful in pushing people to a higher standard.

      --
      A deep unwavering belief is a sure sign you're missing something...
    10. Re:Excellent by Moloch666 · · Score: 1

      You don't get it UNIX doesnt have GUI (Graphical User Interface) that's its strong point. Its the UI where it excells. I setup a freebsd box with sshd running within an hour. Go to work ssh into it and finish configuring, recompile the kernel, install software, etc.

      But if you really want a GUI, you have the option to install it. Windows just doesn't have these capabilities.

      --
      Understanding is a three-edged sword. -- Kosh Naranek
  4. I have this book and it has brought me great joy by PhysicsGenius · · Score: 4, Informative
    His examples are clear and useful and I look forward to the day when most Linux programmers will have been taught using this book. I wish there was a way to get current Linux programmers to read it, because his advice is very sound and would make for much higher quality software than you see in the Linux world today.

    The current Linux programming wisdom comes from Richard Stevens, a know-nothing hack who spends more time talking about the out-dated concept of filesystem permissions and socket programming than he spends on GUI design! I mean, for crying out loud, Dick, this is the Aughts! We "aught" to be optimizing for the user experience, not ivory tower "engineering principles"!

    Anyway, throw away your copy of Linux Kernel Internals because this book replaces it...and then some!

  5. Outdated? by ksplatter · · Score: 5, Informative

    This Book Was published in 1999.

    It might be a little outdated. This review seems to be a couple of years late

    1. Re:Outdated? by Anonymous Coward · · Score: 0

      This review seems to be a couple of years late Hey, doing all the examples took time, okay!

    2. Re:Outdated? by TheKubrix · · Score: 4, Funny

      its only been 3 years out of date, its not like linux has gone through that many changes......

      :\

      next review: VAX programming by example, circa 1978

    3. Re:Outdated? by Anonymous Coward · · Score: 0

      According to Que's website (www.quepublishing.com):

      Linux Programming by Example
      List Price: $24.99
      Author: Kurt Wall
      Published: JUL 02, 2002
      ISBN: 0789722151
      Pages: 560

      So that's only 3 months ago, not 3 years...

    4. Re:Outdated? by Anonymous Coward · · Score: 0

      In other news, faculty members finally dropped teaching assembly with a 25 year old VAX assembly book. Seriously.

    5. Re:Outdated? by Anonymous Coward · · Score: 0

      It's copyright (c)2000 on my copy, so there must be a new release or a scecond edition.

  6. Programming by Example? O.K! by Anonymous Coward · · Score: 0
    Here we go. Example number one:

    #include <stdio.h>

    int main(int argc, char* argv[]);

    int main(int argc, char* argv[])
    {
    printf("Hello World!\n");
    return(0);
    }

    I just thought I'd get that in before the morons come climbing out of the woodwork and start demonstrating their complete inability to code.
  7. I enjoyed... by cerebralsugar · · Score: 5, Informative

    Advanced Linux Programming, from CodeSourcery/New Riders. It wasn't a "beginning/intro" book but still very easy to read and quite informative. Lots of great code samples too. The finale of the book is actually coding a bare-bones http server.

    --
    Easy guys, I put my pants on one leg at a time. The difference is after I put on my pants I make gold records!
    1. Re:I enjoyed... by Anonymous Coward · · Score: 1, Informative
  8. Other good Linux programming books by TraderElron · · Score: 5, Informative

    I've used two Linux programming books, and would recommend both: 1. "Linux Application Development" by Johnson and Troan. A bit more advanced than "Linux Prog by Example," but I was able to use it effectively coming from NO linux/UNIX programming experience. 2. "Advanced Programming in the UNIX Environment" by Stevens. An excellent reference.

  9. Linux Programming By Example????? by isa-kuruption · · Score: 3, Funny

    Who is Example? Is that some kind of hacker nick? What qualifications does he/she have to write a book about Linux programming? I'm confused!

    1. Re:Linux Programming By Example????? by A+nonymous+Coward · · Score: 4, Funny

      You, Confused, wonder who Example is. I am Enlightened. Pleased to meet you.

    2. Re:Linux Programming By Example????? by RealAlaskan · · Score: 2
      You, Confused, wonder who Example is. I am Enlightened. Pleased to meet you.

      But who's on first?!

    3. Re:Linux Programming By Example????? by stor · · Score: 1

      >>You, Confused, wonder who Example is. I am Enlightened. Pleased to meet you.

      >But who's on first?!

      Exactly!

      Who throws it to Enlightened, Enlightened throws it to Example, Example throws it to Confused and Confused throws an exception. 8)

      Cheers
      Stor

      --
      "Yeah well there's a lot of stuff that should be, but isn't"
  10. Finally. by kpansky · · Score: 2, Informative

    Its nice to have an acceptable concise and accurate book that holds your hand through learning how to program in *nix. Programming is one clear advantage that *nix has over windows, especially since the tools are free and come installed by default.

    --

    --Kevin
  11. You're just attracted to... by MondoMor · · Score: 3, Funny

    ... the hideously ugly, deformed mutant greaseballs on the covers.

    At least, that's why I buy WROX Press publications. I've got a whole library, and it looks like the bleedin' Chernobyl yearbook exploded on my bookshelf.

  12. Re:Why another book? by dar · · Score: 2, Informative

    Because in programming as in many other things, you gnerally need more than one book.

    --
    My other Slashdot ID is much lower.
  13. Outdated?? by Parsa · · Score: 0, Redundant

    I've been looking for something exactly like this. But when I went to www.bn.com is says the book was published in 1999? As far as C++ has come in that time wouldn't this book be outdated? I just upgraded to Mandrake 9 that comes with gcc 3.2 so this book might not be Standard C++?

    I would like to point out that I know this book is for Programming in general not specific to C++ but still if there were examples they could be wrong.

    --
    Abiit, excessit, evasit, erupit.
    1. Re:Outdated?? by Anonymous Coward · · Score: 0

      The C++ Standard has not changed since '99, GCC's c++ support has, big difference!

    2. Re:Outdated?? by ninthwave · · Score: 3, Informative

      I bought the book in late 2000
      and the changes are small.
      The book deals very well with the state of linux programming. The basics of make gcc and the different programming tools available. The changes in the programs since then are easy to pick up. It is more about programming technique, how the tools are organised in Linux and how they generally work. gcc 3.2 hasn't taken light years away from gcc 2.95xxx and I have found references for those differences. This book is now one of my favorite quick references.

      This is a starting block and a quick reference for many types of programming but it is not the end all reference.

      --
      I was thinking of the immortal words of Socrates, who said: "I drank what?" - Chris Knight (Val Kilmer)- Real Genius
    3. Re:Outdated?? by arkane1234 · · Score: 1

      Good point...
      C++ has been basically stagnant as a standard... just that everyone else is trying to optimize to that standard.

      Of course, to really go with a C++ standard, you have to turn on ANSI in the flags.

      --
      -- This space for lease, low setup fee, inquire within!
  14. learning by example... by MosesJones · · Score: 3, Funny

    I have always found that the best way to manage a team is by example. First person who breaks the build, smash his hands. Second person, shoot in the head... sure enough everyone learns from that example and works extra hard.

    --
    An Eye for an Eye will make the whole world blind - Gandhi
  15. Makefiles.... by idfrsr · · Score: 5, Insightful

    Probably the most evil and wonderful thing of programming in *nix environments.

    I am going to get this book because it covers make in the begining. I have always had trouble getting my makefiles to work properly in the few instances of linux programming that I have done. And even then I copied an existing one and adjusted it to my needs.

    I suppose the "there is only 1 makefile" saying exists for a reason...

    --
    "The large print giveth, and the small print taketh away" -Tom Waits
    1. Re:Makefiles.... by psavo · · Score: 2

      hm. I don't know a shit about makefiles, but I use autoconf & automake rather succesfully in my applications. And I'd suggest same to you =)

      --
      fucktard is a tenderhearted description
    2. Re:Makefiles.... by ville · · Score: 2, Insightful

      Learn how to use autoconf and automake ( http://www.gnu.org/ ) then you don't have to do the Makefile by hand. These tools will create the depencies for each object etc. // ville

    3. Re:Makefiles.... by __past__ · · Score: 2
      Ick. Learn to structure your programs well, and to write portable code, then you don't have to ship tons of convoluted autocrap with your sources.

      The "just let automake take care" mindset is getting really annoying. There are already too many packages out there with an half-an-hour-./configure and shell scripts starting with #!/bin/bash. Duh.

    4. Re:Makefiles.... by Zathrus · · Score: 3, Informative

      The problem is, even if your code is portable the compiler may not be. Or the linker. Not everyone is up to full ANSI compliance still.

      Ever worked on AIX using xlC? And libtool? They're totally different from the rest of the known universe and so even if your code will happily compile on Linux, Solaris, etc. then the makefiles have to be absurdly complex to handle AIX's weirdness.

      Of course, you may want to do dynamic linking since libtool and templates don't play well together. But, looky, xlC doesn't play well either so you have to have a separate .cpp that excercises all the templated functions you're going to use on a per-library basis. Don't need that for any other OS, but you damn well do for AIX.

      Automake and autoconf save us from most of the nightmare here. Oh, and we're also linking against Oracle and MQSeries. More fun.

      Yes, avoiding things like #!/bin/bash (or even ksh) is wise, but automake/conf have come into existence for a very good reason. Makefiles are godawful.

    5. Re:Makefiles.... by Lathi- · · Score: 1
      The problem is, even if your code is portable the compiler may not be. Or the linker. Not everyone is up to full ANSI compliance still.


      This is why almost every shop I've worked in (which is several in a variety of industries) uses gcc. Even when I worked for a company that was actually antagonistic towards free software the projects that were Unix based use gcc.

      This is also why it seems like most of the shops are closing down their compiler teams. Maybe I'm wrong. I know Sun used to have their own compiler (that cost extra), HP used to have their own (that was extra), IBM had their own as well (what do you know, it cost extra). I don't know how many companies still sell their own compiler; however, I don't see how they can afford to any more.
    6. Re:Makefiles.... by Zathrus · · Score: 2

      Because the compilers generate code that is considerably faster than gcc.

      We have gcc compiled here... but it takes twice as long to compile our code as it takes xlC, and the resultant code core dumps as soon as something actually happens. We haven't had time to trace the issue down yet, but we still hope to move to gcc because of issues we have with IBM's xlC and dbx (as in - dbx usually doesn't work).

  16. Not Stocked by TheKubrix · · Score: 3, Informative

    The link to BN.com doesn't have the book in stock, get it at amazon.com instead, only $9

    1. Re:Not Stocked by Anonymous Coward · · Score: 0


      I'd reccommend buying it on eBay for like $5, but they bilk you so bad on shipping...

      Book rate is like....$2

      $9 to ship? LOL

    2. Re:Not Stocked by Anonymous Coward · · Score: 0

      Ugh - Amazon - Bad. Use something patent free: Bookpool

    3. Re:Not Stocked by e1en0r · · Score: 2

      careful, that's linux socket programming.

  17. Re:Programming by Example? O.K! by Anonymous Coward · · Score: 2, Funny

    Don't prototype main like that. You've obviously been told to prototype your functions, but you don't really understand why, do you?

    You didn't check the return value of printf.

    Your indentation style sucks.

    I just thought I'd get that in before the morons come climbing out of the woodwork and start demonstrating their complete inability to code.

    Hey, you got First Moron!

  18. Re:Programming by Example? O.K! by Anonymous Coward · · Score: 0
    int main(int argc, char* argv[]);

    Aarrgggh....

    int main(int argc, char *argv[]);

    Will never forgive Stroustrup for foisting this char* nonsense on the world. Consider the following:

    char* x, y; <--- What's y?
    char *x, y; >--- Ah, now I know

  19. 9/10 ? by Brandon+T. · · Score: 5, Informative

    I have this book, and I definetly would not give it a 9/10. The text is plagued with errors. Most of them are corrected easily enough, but it is still a hassle to type in some sample code and not even be able to compile it without debugging first. To make matters worse, the url in the book given to download the sample code (and the errata) doesn't work. Take a look at some of the amazon reviews to gauge popular opinion on the book. I picked up my copy on sale for $10 at frys, but I would wait for a second edition or look at another book if you're planning to pay full price.

    1. Re:9/10 ? by Anonymous Coward · · Score: 0

      I have this book, and I definetly would not give it a 9/10.

      I thought the book was a complete disaster, so I gave it 9/11.

    2. Re:9/10 ? by __past__ · · Score: 4, Funny
      it is still a hassle to type in some sample code and not even be able to compile it without debugging first.
      That is the "learn to debug broken programs by example" part.
  20. Make ? by tmark · · Score: 3, Informative

    I don't know about other readers, but when I hear that a book has a section on Makefiles, I really wonder whether it is specialized and focused on a specific programming area (as "Linux Porgramming" would suggest), assuming general programming knowledge, or whether it is a general programming book aimed at capitalizing on interest in the particular subject area. Sounds like it is the latter. Is the book more about "Linux programming", or more about "programming on machines that happen to be running Linux" ??

    Here's the acid test, does it contain a "Hello world" program or something similarly trivial ?

    1. Re:Make ? by Anonymous Coward · · Score: 1, Insightful

      There are lots of operating systems out there, but in the world most beginning programers are in, there are two, linux and windows, if a begginning programmer is coming from the windows world s/he won't have the slightest clue what a makefile is. So I find it a tad difficult to understand your logic here... and to me, linux/unix programming by example sounds like a begginners text no matter how you cut it. I've never heard of an advanced "by example" book. Advanced programmers should be able to figure out how to code their own examples and should be able to expect them when needed from a decent book.

  21. You are either mistaken or lying by Anonymous Coward · · Score: 0

    I mean, there I was, trying to order some good old liver and onions, or maybe a nice Steak & Kidney pudding

    No self-respecting Italian would eat at a restaraunt that served liver & onions and steak & kidney pudding.

    That must be the reason you people have rotten, brown teeth.

  22. Re:I have this book and it has brought me great jo by Anonymous Coward · · Score: 0

    I would hardly call Rich Stevens a 'know-nothing hack'. I doubt that he will be complying with your request since he died in 1999.

  23. this can also be had by da_Den_man · · Score: 3, Informative
    --
    You keep going until you die..."Me".
  24. What's in a name? by Anonymous Coward · · Score: 2, Insightful

    Can we stop saying "Programming Linux" or "Programming Unix" and start saying "Programming _in_ Linux" or "Programming _in_ Unix"? The former makes me think this is a book on programming an operating system.

    1. Re:What's in a name? by highcaffeine · · Score: 3, Insightful

      Actually, "in" would be inappropriate for the use you describe. Using "in" would imply that "Linux" or "Unix" are programming languages. It would be better to use "under" or possibly "on". "Programming under Linux" or "Programming on Unix in C".

      I agree with your basic point, however, that simply saying "Programming Linux" implies development work on the core components of a Linux system. If you really wanted to be pedantic about it, it would imply simply the Linux kernel.

    2. Re:What's in a name? by jsfetzik · · Score: 1

      "Programming for Linux" would be even better because it specifies the target environment. I can program "under" or "in" Linux or Unix without the target being Linux or Unix. So the best choose would really be "Programming for Linux using Linux".

    3. Re:What's in a name? by gosand · · Score: 2
      I suppose if you want to get really technical, if you are programming (in) Linux, you are kernel programming.

      --

      My beliefs do not require that you agree with them.

    4. Re:What's in a name? by Anonymous Coward · · Score: 0

      How about, "Programming Inside A Unix-Like Environment For Use Inside A Unix-Like Environment".

    5. Re:What's in a name? by Anonymous Coward · · Score: 0

      Programming for Linux in Linux Useing the GNU Toolchain?

    6. Re:What's in a name? by assmeat · · Score: 0

      No, you don't want to use "under", because that would imply that the program lies under Linux/Unix, which it doesn't. The program runs on top of Linux/Unix, so one should say "Programming over Linux", or "Programming on top of Unix."

    7. Re:What's in a name? by be-fan · · Score: 2

      Actually, you can also read the statement as in "Programming Linux - to do something". In that case, the title is entirely valid.

      --
      A deep unwavering belief is a sure sign you're missing something...
  25. great by tps12 · · Score: 5, Funny

    I've been looking for good working examples of source code for Linux programs.

    --

    Karma: Good (despite my invention of the Karma: sig)
    1. Re:great by PhysicsScholar · · Score: 2, Insightful

      Try SoresForge for starters.

      --

      Department of Physics and Atmospheric Science, Dalhousie University, Halifax, N.S., Canada, B3H 3J5
    2. Re:great by *xpenguin* · · Score: 2

      Try SoresForge [sf.net] for starters.

      No wonder i've been getting all these sores on my feet.

  26. Standard Store Linkages by BShive · · Score: 2, Interesting

    Amazon: Used & New from $8.49 [referral]
    B&N: Not Stocked [referral]
    Bookpool: Not Stocked

    Looks like the best bet is going to be half.com or a used bookstore - kind of an old text.

  27. Re:I have this book and it has brought me great jo by Rumagent · · Score: 1
    a know-nothing hack who spends more time talking about the out-dated concept of filesystem permissions and socket programming than he spends on GUI design! I mean, for crying out loud, Dick, this is the Aughts! We "aught" to be optimizing for the user experience, not ivory tower "engineering principles"!


    BE SILENT spawn of MSCE! A good user experience is dependent on a good design. A bad GUI in a good design can be replaced/redesign easily. A good GUI in bad design is hopeless.

    It is just like a woman - you need a good body for that pretty face. (Thats the best analogy I could think of. It is not very good, however. I don't think it is easy to replace the head... No matter how good the body might be) /Rumagent
  28. You're either dumb or...well...dumb by Anonymous Coward · · Score: 0

    Clearly he was IN an Italian Restaurant, hence why they were trying to feed him pizza. Idiot.

  29. Re:I have this book and it has brought me great jo by mr_z_beeblebrox · · Score: 2

    The current Linux programming wisdom comes from Richard Stevens, a know-nothing hack who spends more time talking about the out-dated concept of filesystem permissions and socket programming than he spends on GUI design! I mean, for crying out loud, Dick, this is the Aughts! We "aught" to be optimizing for the user experience, not ivory tower "engineering principles"!

    Linux programs are by and large written in c and c++. These require very little UNIX knowledge as Linux is built for portability. The "current Linux programming wisdom" comes from a variety of places not from one place. I learned C on my one and what I know of OS design I learned from Tanenbaum. "Engineering principles" can be used while designing for user experience, if they are not the end result is an OS that crashes when a program errors out (remember Commodore 64?).

  30. Re:I have this book and it has brought me great jo by Anonymous Coward · · Score: 0

    He's very obviously being sarcastic. If nothing else, the line about how a beginner's book on linux should replace books on the kernel (specifically "Linux Kernel Internals") should make that blatent. Perhaps YHBT. More likely, you somehow missed the sarcasm or are trolling yourself. Regardless, HAND.

  31. Alternatively... by vbweenie · · Score: 5, Informative

    The Wrox P2P title Beginning Linux Programming, by Richard Stones and Neil Matthew, covers some similar ground: makefiles, shell scripts, some basic C, Perl and TCL (not really basic - they show you how to use these languages to do some typical linux-y things, rather than explain about structs and scalars), an introduction to GTK and a chapter at the end on writing device drivers. If you're an intermediate-level programmer unfamiliar with Linux as a programming environment, this book offers a good way in; recommended for VB weenies with a conscience.

    --
    Experience is a hard school, but fools will learn no other.
    1. Re:Alternatively... by JohnnyCannuk · · Score: 3, Informative

      As a non-VB weenie (;) -> Java and formerly C/C++ - I can't but agree with you. Stones and Matthews book is a reference when I need to bone up on things like multi-threading and signals under POSIX.

      A really great book.

      I wonder how their 2nd book Professional Linux Programming is? (Hint hint /. )

      --
      Never by hatred has hatred been appeased, only by kindness - the Buddha
  32. Re: Hacking the BMW Series 7 by ites · · Score: 1, Offtopic

    Yeah, that was a great book. I tried the motor rev mod on one of my 752i, but the example in the book had a bug in it, and my car exploded.

    --
    Sig for sale or rent. One previous user. Inquire within.
  33. system level programming by yonnage · · Score: 3, Interesting

    Discusses how LINUX works at the system level by learning how and when to manipulate processes, send and catch signals, and use calls, and how to manipulate and read pipes and FIFOs.

    This book actually sounds really good, for advanced and beginner programmers that are new to linux/unix...

  34. Book selling out! by Sean+Clifford · · Score: 5, Funny

    Man, did everyone just go to Amazon and order this? Read BN was out, now Amazon - I was lucky enough to get one for ~$14; seems like every time I added to my cart a book was gone a few seconds later. Damn, this is the first time I've seen inventory slashdotted. :)

    1. Re:Book selling out! by Tablizer · · Score: 1

      seems like every time I added to my cart a book was gone a few seconds later. Damn, this is the first time I've seen inventory slashdotted. :)

      Such a cart does not model the real world very well: somebody can take stuff that you already have in your cart?

      Perhaps it is based on New York shopping culture.

  35. Standard My Ass by Anonymous Coward · · Score: 0

    I didn't know that the "standard store linkage" to Amazon contains BShive's associates ID.

    I can't stand these Slashdot readers who try to make it look like they're posting something for the benefit of the community, when all they're doing is trying to trick people into sending commissions their way.

    Somebody pleae moderate this BShive guy down. What a scumbag.

    1. Re:Standard My Ass by BShive · · Score: 1

      Not 'tricking' anyone - I state that they're referral links instead of the people who do hide it, heh. Such hostility ...

  36. Re:I have this book and it has brought me great jo by Xpilot · · Score: 2

    Uhm.... is the parent post +4 informative or +4 sarcastic?

    I have another book for beginners called "Beginning Linux Programming" by Wrox press. It too had an example of a CD database. I guess CD databases make great real life examples.

    --
    "Backups are for wimps. Real men upload their data to an FTP site and have everyone else mirror it." -- Linus Torvalds
  37. amazon sold out, amazon uk has it by e1en0r · · Score: 3, Informative

    it looks like everyone is buying up all the copies. i'm sure amazon uk will be selling out soon too, but it cost me $13 including shipping to california.

    and as an added bonus you get to read everything with an english accent.

  38. My Impressions of this book by starX · · Score: 3, Informative

    Neither outstanding or terrible, it ranks as a decent, average book on programming on the linux system. Although I would recommend Beginning Linux Programming by Wrox over this one, based solely on the fact that it covers so much more material in roughly the same amount of detail. Still, Linux Programming By Example costs a little bit less (at least when I got it), and while the Wrox book covers more, LPbE does cover a few things that the Wroc book doesn't.

    On the whole I would say it really deserves a 6.5 or a 7. It's worth getting if you're looking to learn about programming on a POSIX system, but if you already have a book on the topic, you might want to save your money.

  39. Kernighan and Pike also good by pjc50 · · Score: 3, Informative

    I'd reccomend "The Unix Programming Environment". Despite being written in 1978, it's still an extremely good introductory text.

  40. Re:I have this book and it has brought me great jo by MrResistor · · Score: 2

    "Engineering principles" can be used while designing for user experience, if they are not the end result is an OS that crashes when a program errors out (remember Commodore 64?).

    Remember Windows? You know, there are a lot of slashdotters that simply aren't old enough to remember the C-64. Around here you might as well say "Remember the PDP-7?" I mean, geez, you could at least use an example people can relate to!

    (FWIW, I am old enough to remember the C-64, but I never used one. I was too busy hacking Basic on my TRS-80 (the cartridge slot didn't work, so there was nothing else I could do with it!). In fact, the only Commodores I ever used were the PET in my 4th grade classroom and my friend's Amiga 1000 (now that was a sweet machine!))

    --
    Under capitalism man exploits man. Under communism it's the other way around.
  41. BN, what about Amazon? by Chacham · · Score: 3, Interesting

    You can purchase Linux Programming By Example from bn.com

    I started to purchase books from Amazon.com once I realized that BN doesn't post bad reviews. Maybe they do now though.

    As much as Amazon may have patented a stupid thing, they don't seem to censor comments. Many books have many bad comments. And, that is why I am happy to buy from them.

    1. Re:BN, what about Amazon? by shic · · Score: 2

      Amazon censored my comment...

      I submitted a seriously thought through review on "Dekalog" (these are my favourite films I've ever seen) - though no-one could call them "happy!"

  42. Re:I have this book and it has brought me great jo by wiredog · · Score: 2

    No. +4 Troll.

  43. Linux In a Nutshell by Gaboo · · Score: 1

    "Help me, I can't get out of this nutshell."

    *sorry Austin*

    1. Re:Linux In a Nutshell by CoolVibe · · Score: 2

      Linux runs on nutshells? Who did the port?

  44. Re:who would want to program for linux? by ctimes2 · · Score: 5, Interesting

    If your getting modded down it's because you bring nothing to the table. Take for example your post here:
    subject: who would want to program for linux?
    you don't get paid..

    First, that's a troll if we ever saw one. Because 1) there are millions upon millions who program for linux now. 2) they do it for fun, not money. 3) some do it for money too. 4) some do it just for the money. 5) who ever wrote a program they got rich off of? Careful here, remember that Bill Gates bought his first program to sell, and stole many others (or built on the work of others) after that. Microsoft makes money by SELLING software. Not writing it. There is a significant and subtle difference.

    Moving on:
    Welcome to America, land of capitalism..Is Microsoft hiring?
    If I'm not mistaken, America is the land of the free, not the land of capitalism. Capitalism (in it's purest form) has nothing to do with money. A capitalist form of finance stops being capitalism as soon as any one person or company has the ability to create an artificial barrier to competition (and that's whether or not they do actually create the barrier - it just has to be possible). In short - Capitalism depends on a free market, which you don't have if there are barriers to competition in an industry. So much for America being the land of Capitalism. Indeed, you misunderstand capitalism entirely. Capitalism centers around the individual. The individual has the final say and right in _any_ situation - Microsoft on the other hand is anti-capitalist in that whatever the programmer makes belongs to the company he works for. This is a violation of the programmers right to do what they want their own ideas. For example, if you helped write Microsoft's media-player, and had an ingenious idea on how to do it better, you could not leave the company and create this new player based on the knowledge you gained at Microsoft. You'd get sued into oblivion, even if you didn't use Microsofts IP to do it.
    The GPL on the other hand entitles the original author some degree of control over his work - if you wrote the original you (the individual) have the right to use the GPL or not (you can even re-licence _your own_ code to companies who don't want the restrictions of the GPL... just make sure it's ALL your code that your re-licencing), and entitles you (the individual) to place restrictions on how your work is used. Get it? Capitalism depends on the individual having rights that supercede the greater interest. Corporations supercede the right of the individual for the good of the company.

    And finally, if Microsoft is hiring, what difference does that make to you? Even Microsoft has standards.

    --
    My cube. My friend. My solace. My prison.
  45. Yes buy it. by Shack95 · · Score: 1


    Bought it back in 2K, definately a good read (and helpfull). Having a chapter on NCurses and screen manipulation was a bonus.

  46. Linux Lacks a Solid API by egg+troll · · Score: 1, Troll

    One of the flaws that I've found while dealing with Linux - and to a lesser extend, the BSDs - is that they lack a comprehensive API. Having a solid API framework is one of the reasons that Windows and the Macintosh OS have been so successful.

    One of the hurdles that Linux has been unable to overcome is the fact that the various parts of the OS are kludges together. There is no synergy. X for example isn't well integrated into the rest of the OS. Consequently one winds up with inconsitent behavior: Sometimes right clicking cuts-and-pastes; othertimes it doesn't. There are other examples of this. A quick search of Google can help you find them.

    I would like to see Linux succeed. Hopefully the main development team will work on getting a solid API in place so that when I develop for Linux I can spend my time writing my program, not writing code that should already exist.

    Thanks,

    ET

    --

    C - A language that combines the speed of assembly with the ease of use of assembly.
    1. Re:Linux Lacks a Solid API by entrigant · · Score: 1

      X for example isn't well integrated into the rest of the OS.

      And for a damn good reason too. X should not be integrated into any other part of what makes up most Linux systems as X is an addon. I should not need X to have a working Linux system and X should not need Linux to work itself. They are designed to be seperate.

      Sometimes right clicking cuts-and-pastes; othertimes it doesn't.

      Hmm ya.. right clicking has never cut os pasted anything for me before... perhaps it has something to do with the fact that the middle mouse button pastes, and the simple act of highlighting copies. This works everywhere too... uncanny how it works eh? If you are speaking of the inconsitancies say between desktop environments such as gnome and kde well... they extend the basic X clipboard in different ways. Gnome and KDE are two different systems, and if you mix them you'll get inconsistant behavior... it's the way these things work. You want consistancy... choose one and stick to it. Besides KDE and Gnome copy and paste are starting to work together lately.

      Hopefully the main development team will work on getting a solid API in place..

      Who? You mean the kernel developers? The XFree86 developers perhaps? Perhaps GNU (they do make glibc and gcc)? Maybe the KDE/Gnome teams... You're post is kind of awkward... I'm having a hard time telling if you are intentionally trying to be funny or really don't have a clue.

      Not even your reveered windows has an all inclusive API. They have GDI, DirectX, etc. etc. Different API's for each job and they usually don't communicate much with eachother either. So I must ask...

      What exactly are you talking about?

    2. Re:Linux Lacks a Solid API by spitzak · · Score: 3, Informative
      You have no idea what you are talking about.

      There are problems and the problems are that some API's are not designed well. But this has nothing to do with "comprehensive API" or whatever you are blathering about. Rest assurred that Windows uses a different call for cut/paste than it does to read files, just like Linux.

      X is "integrated" in that it actually uses communication calls that exist in the system and are used by other parts of the system. This is why it works remotely. In this area Linux is vastly superior to Windows for "comprehensive API", in Windows there is NOTHING below the graphics interface that is reusable by anything other than graphics. The fact that X has a horrible interface is certainly true but irrelevant to "comprehensive".

      Also I don't think right-mouse pastes in ANY program. Middle mouse does, and it works in every X program I have ever seen. The inconsistencies are in what Ctrl+V does, not in what middle-mouse does. The fact that you did not know this indicates that you know little or nothing about Linux.

    3. Re:Linux Lacks a Solid API by kris_lang · · Score: 1
      I'm replying to spitzak's comment I don't think right-mouse pastes in ANY program, and not the parent comment or about Linux APIs.

      Right-mouse works as paste in the virtual consoles (ALT-F1 through ALT-F6, if those are the virtual ttys you've configured). Middle-mouse does NOT paste in the virtual consoles, but DOES paste in X-windows, if you've set up your X windows in that manner which is the default.

    4. Re:Linux Lacks a Solid API by spitzak · · Score: 2
      Well the virtual consoles were written when the 2-button MicroSoft mouse was popular on PC's. I just tried it and it looks like both the middle and right mouse buttons paste. In any case I think for the average user "any program" means "any X program".

      There is no X preference for what mouse does paste, so there is no "setup" either (unless you are counting xmodmap, but if you mess with that you will change a lot more than just what key does paste). The programs either get it right or get it wrong. As far as I can tell they all agree.

    5. Re:Linux Lacks a Solid API by Anonymous Coward · · Score: 0

      Blah, blah.
      The bottom line is that copy/paste routinely fails on Unix and almost never fails on Windows.
      Either specifications are confusing or incomplete or Unix programmers are fucking idiots who just can't get things right.
      Frankly, I don't give a shit.

    6. Re:Linux Lacks a Solid API by Anonymous Coward · · Score: 0

      Sorry, it is difficutly to trust opinions of a guy who created C++ based event model based on "static locations".

    7. Re:Linux Lacks a Solid API by be-fan · · Score: 2

      He he. Some people like the Java/Win32 way of implementing everything under in one set of APIs. They find it cohesive, consistant, and easy to reference. Other people abhor that model, preferring the C/UNIX way of providing a powerful core and depending on third party extensions. They find it cleaner, more accepting of competing implementations, and easier to maintain over time. The first type of people see the second type of API as a hodge-podge of complexity and redundant effort. The second type of people see the first type of API as monolithic, inflexible, and a sure route to bug-heaven.

      I'm not going to suger-coat the situation in "I'm okay, you're okay" crap. The second type of people are right. The first style of API has its uses (for example, it's not a terribly bad idea in Java, which is used for end-user applications rather than systems programming) but is overall a crappy idea for a system-level API. Just note the difference between UNIX and Windows. How many API's has Microsoft had over less than two decades? DOS, Win16, Win32, MFC, ATL, WTL, .NET, etc, not to mention all the special purpose APIs like DirectX, Windows Media, etc. Compare this to the situation in UNIX. A UNIX developer circa 1980 could, with a little updating, be right at one in a circa 2002 Linux environment. The UNIX APIs, decades after they were invented, are still clean, while the Windows APIs (and even the Java ones, think about AWT or the initial container classes) are unclean even though each only has a shelf life of 10 years at most. Beyond that, bundling all libraries together discourages competing implementations. In UNIX, there are several libraries for every task. Competition breeds libraries that are better than others for particular uses. Lack of competition leads to a "One True Library (TM)" for each purpose that really isn't optimal for any given situation.

      --
      A deep unwavering belief is a sure sign you're missing something...
    8. Re:Linux Lacks a Solid API by spitzak · · Score: 2
      It's good to see somebody who actually checks what people have done!

      An event structure that is passed by reference may be a reasonable change to fltk, but it would break a huge amount of software already written. Also I have not really had the need to think about more than one event at a time, and the static locations greately assist checking the event without having to have an event argument added to every single call.

      Where the idea fails is when events vary depending on what widget they are sent to. In fltk2.0 the x/y are being modified so they are relative to the corner of the widget, unfortunately for compatability this is done by changing the static locations back and forth. If it were not for compatability I would make a method on a widget that figures out and returns the x/y from the static global x/y. But this would still allow the x/y to be in static locations.

  47. Someone had to say it by Exatron · · Score: 1
    I suppose the "there is only 1 makefile" saying exists for a reason...

    One makefile to rule them all
    One makefile to find them
    One makefile to bring them all
    And in the darkness bind them

    Don't get mad. It was either that or "All your makefile are belong to us."

    --
    "I think so, Brain, but 'instant karma' always gets so lumpy." - Pinky
    "Decepticons FOREVER!!!" - Ravage
    1. Re:Someone had to say it by Isle · · Score: 2

      I've seen that makefile. It evolved from the hands of one of my fellow tutors when we were teaching kernel-programming. It was only a single makefile but it compile an entire kernel, not by itself, but by spawning offsprings into every subdirectory and then executing the new makefiles one by one.

      I am not sure, but after a year or so, I think it grew concious and started modifing itself. I didnt understand it or any of it's offsprings any longer, but I am quite sure it was evil. And it never liked me! In the end I had no choice but to kill it and there was much rejoycement as the students had feared it as well. I had to write new makefiles for the subdirectories myself And though the new makefiles was simpler, had less features and required a more rigid structure of subdirectories everybody breathed more easily after that.

      I just fear some careless student might have a taken a backup and that it is still breeding evil offspring somewhere. Someday it might come back to revenge the murder of it's copies everywhere. So beware!

  48. Surprising to see a good QUE book by James+Youngman · · Score: 3, Informative

    I'm very surprised to see a good review of a QUE book. I find that the ones I've read - and that includes a QUE book of which I was one of several authors - are pretty dire.

    The problem with QUE books (and other Macmillan Computer Publishing imprints) is attention to detail. Their production processes tend to introduce errors (for example, by loading the text into Word and having it change all the backticks to apostrophes - that happened to me!). Also, they don't usually seem to do reprints correcting errors, they just seem either to produce a new edition ("Special Edition", whatever) with a "Featuring FooMatic 97!" badge on the cover.

    Another problem with QUE books is that they just tend to be written and published too fast - no time for doing a good job.

    I should emphasise that Macmillan Computer Publishing, who produce QUE books, are as far as I know completely unrelated to the British publisher, Macmillan.

    Disclaimer: You should know that I've had a bad experience as a contributing author of several MCP books, and have vowed not to have anything to do with them again. So as you can see I'm very biased against them. I have not read the "Linux Programming by Example" book and indeed haven't made any comments about this book in particular.

    1. Re:Surprising to see a good QUE book by Anonymous Coward · · Score: 0

      - you are absolutely correct and i agree with everything you've said...

      - i also know this from personal experience with Sams and Que...

      - they want the books written in 60 days or less, and then reviewed for comments before production in two weeks...

      - the contracts are also very nasty, especially if you do more than one book... any subsequent title costs can be charged against royalties for other books!

      - the royalty rates also suck (about half of what O'Reilly pays)

      - i have just finished my last book with Sams (which is now Pearson)... all the old editors i've worked with there are gone, the management has been replaced, and morale there sucks...

      - it's been fun writing, but no more... i'm fed up...

  49. humor by Anonymous Coward · · Score: 0

    Hey, I didn't post the parent, but damn it, moderators, get a sensoe of humor. The comment was not off topic, it was a JOKE.

    Maybe slashdot needs a "-1, Joke not funny" mod.

  50. Re:I have this book and it has brought me great jo by mr_z_beeblebrox · · Score: 1

    Remember Windows? You know, there are a lot of slashdotters that simply aren't old enough to remember the C-64. Around here you might as well say "Remember the PDP-7?" I mean, geez, you could at least use an example people can relate to!

    Well, if you mention windows or Linux you have stuck yourself in one group and joined an ideological argument as far as most are concerned. Also, fwiw, I have never met any serious computer enthusiast who did not know what C 64 was.

  51. its just programming by meta-w by myowntrueself · · Score: 1

    all fancied up ;)

    --
    In the free world the media isn't government run; the government is media run.
  52. Re:Programming by Example? O.K! by arkane1234 · · Score: 1

    heh.. I know what you mean.. Almost every coding book I've read since C++ came around has had the asterisk up against the descriptor instead of with the actual variable. I HATE that...
    even Hungarian Notation isn't as irritating as that.

    --
    -- This space for lease, low setup fee, inquire within!
  53. Annoyances with this book by archnerd · · Score: 1

    Overall, I'm satisfied with this book, but there are a few annoyances:

    *When they say "by example", they mean it! The discussions are quite brief - most of the book is sample code.

    *I could do without the chapter on makefiles. It's not very informative and doesn't mention GNU autotools. You're much better off RFTM.

    *Likewise, the RCS chapter is a waste. Does anybody actually use RCS anymore?

    *The information on Berkeley DB is very outdated.

    The rest of the book is quite useful, but I'd recommend the Linux Programming Bible instead.

  54. Solid API? On Windows? by tarmo · · Score: 1

    I'm not sure what you're talking about. Your makeshift example about clipboards only tells us that different programs behave differently. I've seen Windows programs that didn't support copy-paste, albeit rarely - it's not an OS feature. And this has nothing to do with the OS (as in Operating System), but everything to do with a graphical user session and inconsistencies found there, which are admittedly a major problem for Linux in the desktop market.

    When you talk about Linux's API, you're on fuzzy ground. Do you mean the kernel, or possibly libc6 or some other centrally standardized libraries? Or all of them together? Which libraries, in that case?

    If you're worried about reinventing the wheel, don't be. Linux is equipped with pretty standard libraries that do much more than stock Windows libraries do. You just need to know which library contains the functionality you need. Just like in Windows, except you'll need to start making your own code much later, since the libraries provide you with much more ready-made functionality.

    Anyway, the library APIs are free (as in speech) for one thing! You can actually look at the source and see that the method the API documentation talked about actually exists, and you can see exactly what it does.

    Of the thousands of Windows libraries, only a portion is documented. MS has huffed and puffed this autumn and released several hundred new libraries with press releases to boost. But still parts of Windoze are undocumented to the developers at large. And rare are the people who have actually seen the source code that makes up even a minor part of Windows. And you call this a "solid API"?

    1. Re:Solid API? On Windows? by Tablizer · · Score: 1

      When you talk about Linux's API, you're on fuzzy ground. Do you mean the kernel, or possibly libc6 or some other centrally standardized libraries? Or all of them together? Which libraries, in that case?

      (Begin obligatory rant)

      Why focus on the OS? API's and tools should try to be OS-independent. True, if you are writing device drivers or fast games it matters. However, for most things I think we are at the stage where API's and protocols can *hide* most of the OS guts. File systems, GUI's, etc. should all be OS-neutral protocols. We already have such more or less for HTTP and databases, for example.

      Kill Windows by making it irrelavent or invisible, not by adding yet more incompatible features to *nix. That won't work.

  55. Yes... by Anonymous Coward · · Score: 0

    You, too, can program for 0.24% of desktop users instead of 95% of desktop users.

    Welcome to the "big leagues."

  56. Re:Programming by Example? O.K! by Anonymous Coward · · Score: 0
    Don't prototype main like that.

    It is not illegal to do so. I can declare main() as

    int main(void);
    if I wish to ignore argc and argv of course. I can also omit the forward declaration of main() as you suggest. All are legal.

    You didn't check the return value of printf.

    Indeed, a fair point. However, I do not care about the return value of printf() and it is legal for me to ignore the return value if I wish.

    Your indentation style sucks.

    Ahhh, the 1TBS flame. Indentation was missing due to Slashdot striping my spaces I was using to indent the code block. If you have a clever way of placing tabs or non-breaking spaces inside of ecode tags, please let me know.

    For your pleasure, a corrected version:
    #include <stdio.h>
    #include <errno.h>

    int main(){
    if(printf("Hello World!\n")<0)
    return(EFAULT);

    return(0);
    }
    This can be compiled with

    gcc slash.c -Wall -O3 --ansi --pedantic -o slash

    Without error or warning. Enjoy!
  57. QUE?!! by stonedown · · Score: 2, Interesting

    I will never buy a QUE book. They publish a lot of "me too" crap, so they can jump on the bandwagon and make money off of whatever is the hot new thing. New Riders and Wrox, on the other hand, have a number of valuable titles on programming. I've bought a few, including: "Beginning Java" (WROX), "Beginning Linux Programming" (WROX), "Advanced Linux Programming" (New Riders), "VI Improved - VIM" (New Riders). These are all very high quality books (especially the VIM book - absolutely outstanding!!!). Well organized and easy to follow. I've noticed that QUE books have the appearance of containing a lot of information, but are disorganized when you sit down to read the material, and they just don't do a good thorough job of covering the topic.

    Interestingly, you can read online the full versions of the New Riders books I mentioned here.

    (If you have trouble with that link, go through the New Riders home page and search for the titles.)

  58. publisher QUE (InformIT) by Garen · · Score: 1

    Next...

  59. Unix Systems Programming for SVR4 by Zurion · · Score: 4, Informative

    I have to write C/C++ code daily for Tru64 and Linux. Unix Systems Programming and Programming with POSIX Threads are two very good books. They aren't Linux-specific books, but I've used these books on a weekly (or daily) basis for a couple of years despite the USP book being written in '96.

  60. Re:Programming by Example? O.K! by Anonymous Coward · · Score: 0

    return is not a function. Thus you can do:

    return 0;

    Instead of

    return(0);

    Yes, K&R did it in their first book. No, that book is no longer current. I mean, you don't do (x)++, do you?

    Also, the only portable return values from main() are 0 (success), EXIT_SUCCESS, and EXIT_FAILURE (the last two are obvious); In addition, EFAULT is not defined by ISO C. But this paragraph is largely irrelevant since this is Linux programming, not standard C programming.

    HTH, HAND.

  61. respect RMS! by nebenfun · · Score: 1

    the real title should be
    "Programming GNU/LINUX"
    or
    "Programming GNU/LINUX with GNU tools"
    or better yet
    "Programming GNU/LINUX with GNU tools while using
    GNU/EMACS"

    nbfn

  62. One of the advantages of (L)inux. . . by kfg · · Score: 2

    over other *nix's though is that there are no such "defaults." Everybody rolls their own. Ain't it cool? I've used a number of small distros, for various advantages they held, that did *not* include gcc as a default and by not doing so performed certain design parameters of the distro all the better for it.

    gcc is *typically* installed by default by the major distros. There is something of a "protocol" to do so ( and even then a couple of distros aimed at the desktop newbie have also failed to include it at all, even as an install option).

    No matter what though, even if it isn't included with your distro as an *option* at install you can always just go download it.

    Now *THAT* is what is the coolest about Free/Open/Artistic/Whatever software.

    KFG

    1. Re:One of the advantages of (L)inux. . . by drgnvale · · Score: 1
      >>No matter what though, even if it isn't included with your distro as an *option* at install you can always just go download it.

      Yeah... but how do you compile it?

  63. $12.00 at Fry's by Crusty+Oldman · · Score: 1

    This book is in the bargain bin at Fry's for $12.49. The Industry store has about 10 of them in stock as of 2:00 this afternoon.

  64. Linux Programming Unleashed... by KewlPC · · Score: 2

    ...is another book by Kurt Wall (along with a few other people). It covers the same topics as Linux Programming by Example, and a good deal more. In fact, because one of Linux Programming Unleashed's authors worked on both books (Kurt Wall), several of the sections in Linux Programming by Example were word for word copies of the same section in Linux Programming Unleashed.

    This isn't meant to bash the author. Linux Programming by Example is a very good book for people who know how to program in C, but have never done it for Linux before. I consider it to be the "lite" version of Linux Programming Unleashed. Linux Programming Unleashed contains almost the same information as Linux Programming by Example, in the same accessible, easy-to-understand presentation, plus a good deal more (like how to write man pages for your programs).

    If it comes down to whether to buy one or the other, if you can afford Linux Programming Unleashed ($50, whereas Linux Programming by Example is around $30) buy that. If not, go ahead and get Linux Programming by Example.

  65. Good beginners book on gdb? by Anonymous Coward · · Score: 0

    Anybody know of a good book for complete beginners to gdb and debugging?

  66. whoa by trybywrench · · Score: 1

    I picked this book up at fry's today for 12 bucks ( it was on the discount rack ). I bought it cause i have been doing a lot of java proramming the last few years and my C sharpness ;) has decreased. Plus I have always been interested in systems programming with a hard core systems language like C.

    --
    I came to the datacenter drunk with a fake ID, don't you want to be just like me?
  67. Re:who would want to program for linux? by Anonymous Coward · · Score: 0

    "The GPL on the other hand entitles the original author some degree of control over his work "

    Yeaaaah. Sure. Too bad that with all this "incentives" there is hardly any innovation coming from the GPL crowd - to the contrary , just about every interesting application/idea in the last 10 years came from commercial circles.

  68. Re:who would want to program for linux? by fussman · · Score: 0
    for the love of all that is praiseworthy and of good report --

    MOD THE TROLL PARENT DOWN!!!

    --
    Support Israeli punk bands. Man Alive.