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.
Practical Task Scheduling Deployment
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.View Now!
|The Firebird Project's Firebird Relational Database||Jul 29, 2016|
|Stunnel Security for Oracle||Jul 28, 2016|
|SUSE LLC's SUSE Manager||Jul 21, 2016|
|My +1 Sword of Productivity||Jul 20, 2016|
|Non-Linux FOSS: Caffeine!||Jul 19, 2016|
|Murat Yener and Onur Dundar's Expert Android Studio (Wrox)||Jul 18, 2016|
- The Firebird Project's Firebird Relational Database
- Stunnel Security for Oracle
- My +1 Sword of Productivity
- SUSE LLC's SUSE Manager
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- Parsing an RSS News Feed with a Bash Script
- Google's SwiftShader Released
- Doing for User Space What We Did for Kernel Space
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide