Welcome!

Linux Authors: Elizabeth White, Pat Romanski, Michelle Drolet, Kevin Benedict, Liz McMillan

Related Topics: Linux

Linux: Article

Linux Programming by Example: The Fundamentals

If you know nothing about Linux development, this book will get you started

In this installmant of the Book Rookery, LWM Editor-in-Chief Kevin Bedell talks with Arnold Robbins about his new book, Linux Programming by Example: The Fundamentals, which will be invaluable to those just learning to develop under Linux.

Which programming languages are most popular for developing Linux applications and why?

  1. C. C is the language used for developing Linux and the basic libraries are all intended for use from C.
  2. C++. C++ is upwardly compatible with C, making it easy to use all the exisitng libraries and facilities. However, it provides considerable additional power and the ability to use multiple programming paradigms (object-oriented, generic, procedural) within one language.
  3. Perl. Perl is highly popular for application development, since it works across a huge range of systems and can access libraries written in C via dynamic loading.

What kind of applications are people developing using the techniques in your book?

Just about anything. The book deals with the fundamental Linux/Unix APIs: files and I/O, data about files, users and groups, sorting, searching, signals, times and dates, process creation, and management.

After reading this book, a programmer will understand enough to write an application as complicated as a basic shell for doing process creation and I/O redirection, including pipelines and wildcarding. I feel that the chapters on internationalization and basic debugging are particularly valuable for someone just learning to develop under Linux.

Will your book help me develop KDE or GNOME applications?

Not specifically; it’s not aimed at GUI development. However, as KDE and GNOME applications are likely to do file I/O, the book provides a foundation of the basic Linux concepts upon which to build.

How can I get started developing Linux applications? What are the first things I need to learn?

  1. The C or C++ languages. My book assumes you know C.
  2. How to use a text editor such as Emacs or Vim for entering programs.
  3. How to run the C compiler. The basic GCC command line is similar to that of C compilers everywhere, and you can do something as simple as

    gcc -O *.c -o myprogram

    to compile your source.

  4. How to use make and Makefiles. The online Info documentation on GNU Make should be enough to get started.
In the longer term, an understanding of Unix portability issues and how to use Autoconf and Automake is useful. I plan to write a separate book on the portability and "development infrastructure" issues (as one might call them).

What are the most popular development tools used by people writing Linux applications?

  1. GCC, for both C and C++ compilation
  2. Emacs or Vim for text editing
  3. GNU Make to build software
  4. Autoconf and Automake for portability and configuration
  5. GNU Gettext for internationalization
  6. GNU Libtool for managing shared-library issues for programs that need to deal with shared libraries
  7. GDB or a graphical debugger built on top of it for debugging
  8. Gprof for performance profiling

Will learning the material in your book help me get a job? What kind of job?

If you know nothing about Linux development, this book will get you started. The job you’d be doing would be programming, not administration or support, although understanding the way Linux works is useful for understanding how the basic command-line tools work, which in turn is very helpful for doing system administration.

About Arnold Robbins

Arnold Robbins is a professional programmer. He has an MS degree in computer science from Georgia Tech and has been working with C, C++, many kinds of Unix systems, and GNU/Linux since 1980. He has worked in both industry and academia, doing software development and teaching continuing education courses in the C, Unix, and networking areas. As a long-time volunteer for the GNU project, he maintains GNU Awk (gawk) and its documentation. He is the author of several other books, including UNIX in a Nutshell.
arnold@skeeve.com

More Stories By Kevin Bedell

Kevin Bedell, one of the founding editors of Linux.SYS-CON.com, writes and speaks frequently on Linux and open source. He is the director of consulting and training for Black Duck Software.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.