If you are looking for an introduction to programming for Linux, I highly recommend this book.
This book aims to introduce some of the topics that are important when developing applications for Unix/Linux systems. (The book itself sometimes refers to Unix and sometimes to Linux; I suspect a lot of the contents will apply to both. I'll refer to Linux here as that's the only system I can be sure the book does apply to.) It assumes that the reader has some programming experience and if you do not know C then only a few chapters will be of interest.
I think the book is most useful if regarded as a tour of the facilities available on a typical Linux system. Having worked through the book, you'll have an idea of what's available and can choose the most appropriate option for the problem you need to solve. It's quite possible the information provided about that facility in the book will be adequate, but if it's not you can consult other sources (the man pages, for example) more easily since you then know what you're looking for.
The book contains plenty of example code. This is very well laid out - the code examples aren't excessively long and are broken down into small chunks by descriptive paragraphs. In addition to small example programs, several chapters use a common example of a CD database application to provide a more substantial illustration of their contents. All the code can be downloaded from the WWW and is licensed under the GPL.
If you are looking for an introduction to programming for Linux, I highly recommend this book.