Linux Programming Bible
Author: John Goerzen
Publisher: IDG Books Worldwide
Price: $39.99 US
Reviewer: Ben Crowder
As anyone who has spent some time with Linux knows, our favorite operating system is a programmer's heaven. With dozens of free compilers and interpreters for practically every language in existence, source code available for most programs and the programmer-oriented philosophy behind the system, Linux can easily be described as a programmer's dream come true.
Sometimes, however, because there's so much out there, it's hard to keep track of everything, especially for a newbie. That's where the Linux Programming Bible comes in. In clear, concise writing, it shows both the forest and the trees of the exciting world of Linux programming. Note in advance that only a few topics are covered in deep detail; this book is more of a reference and tutorial for beginners, not a comprehensive mammoth of a book on one particular subject.
To start off the book, Chapter 1 introduces the Linux environment and how it relates to programming, including how to find documentation. The second chapter covers basic shell programming and is enough to get you started writing simple scripts which can serve as launchpads into more advanced shell programming. The third chapter, which could very well be one of the most important in the book, describes regular expressions in a fair amount of detail. It also explains how to use them in Perl, sed, awk and C/C++. Chapter 4 introduces the program that, in a sense, started the whole Open Source movement: Emacs. Finally, to conclude Part I, the fifth chapter covers the Linux file system layout, data files (such as /etc/passwd and /etc/group) and initialization scripts.
The second part of the book is devoted to the C/C++ environment. Chapter 6 gives an aerial view of gcc, with a few close fly-bys as well; it covers the different parts of the compiler, as well as some of the more commonly used options. The seventh chapter introduces a tool that has made many projects far easier to manage: GNU Make. It explains the basics of makefiles and goes through a handful of examples, which are enough to get you started. Chapter Eight covers memory management in Linux, statically and dynamically allocated memory, as well as some fun with those beloved pointers. The ninth chapter introduces both static and dynamic libraries and tools to help you manage the latter. When the inevitable bugs pop up, Chapter 10 is there to help you squash them—it explains how to use gdb, the GNU debugger.
Part III covers the Linux model, as the author describes it. The eleventh chapter explains the UNIX philosophy of “everything is a file”, and shows how to read and write from files. Chapter 12 introduces Linux processes: the basics, how to fork, synchronization and security-related items. Chapter 13 covers signals—handlers, sending/receiving and some dangers that programmers need to be aware of. Chapter 14 introduces the Linux I/O system, describing simple stream I/O, memory-mapped I/O, and select() and poll(). Chapter 15 closes Part III with an explanation of terminals and how to make sure your program acts nicely toward telnetters as well as toward those accessing it directly.
Nice programs talk with other programs, and that's what Part IV is about. Chapter 16 goes over shared memory and semaphores; Chapter 17 explains how to use pipes and FIFOs; and Chapter 18 introduces you to TCP/IP (Internet) sockets. Sockets are covered in more detail in Chapter 19.
Part V describes one of the most popular glue languages: Perl. Chapter 20 introduces the language, explaining the data structures and basic usage. Chapter 21 covers data manipulation—reading data, parsing and processing it, storing it and spitting it back out again. Perl has, in the eyes of many, been inseparably associated with CGI, and that's what Chapter 22 is about. Finally, Chapter 23 explains how to use Perl's database interface (DBI) to access SQL databases.
While command-line interfaces are quite useful and sufficient for many tasks, there are times when a graphical interface would be better suited. The sixth part of the book contains two chapters on the basics of X Windows from a programming viewpoint, Perl's (and Python's) graphical toolkit (Tk) and basic Gnome programming.
make made our lives easy. CVS made them even easier. The first chapter of Part VII explains the basics of CVS, including setting up your own repository, checking out and committing code, and branching/merging code. Chapter 27 describes some good security practices when writing code for Linux and Chapter 28 covers optimization. At the end of the book is a nice glossary that explains some of the more common terms used in the book.
Is it worth it? Unless you're a wizened kernel hacker with six or seven years of experience under your belt, the answer is yes. The book is a good overview of many topics, covers the most important subjects and can open your eyes to new, previously unseen horizons. This is a must-have book if you're interested in Linux programming.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Petros Koutoupis' RapidDisk
- ServersCheck's Thermal Imaging Camera Sensor
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- Oracle vs. Google: Round 2
- The FBI and the Mozilla Foundation Lock Horns over Known Security Hole
- Privacy and the New Math
- Varnish Software's Varnish Massive Storage Engine
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide