GNOME Programming Guidelines

Federico Mena Quintero

    federico@nuclecu.unam.mx
  

Miguel de Icaza

    miguel@kernel.org
  

Morten Welinder

This article contains several guidelines and suggestions for GNOME programmers, as well as certain policies that should be followed when writing GNOME programs. This is intended for programmers to know about the GNOME development process and its philosophy. GNOME is a team effort, so it will be useful for programmers to know "the way things are done".


Table of Contents
Introduction
The Importance of Writing Good Code
Coding Style
Correctness and Robustness
Security Considerations
Performance
Localization
Binary Compatibility in Libraries
Modifying Other People's Code
Maintaining a Package
Why You Should Worry About Memory Leaks.

Introduction

GTK+, the basic user interface library for GNOME, has taught us some important lessons in software design. The GTK+ code is clean, consistent, maintainable, and makes sense. Such code is not only a pleasure to work with, but also encourages good programming practices on those who extend and modify it.

In this article we try to present some suggestions and guidelines that you should take into account when writing code for the GNOME project. We present some of the policies that must be followed when modifying other people's code, using the CVS repository, and making sure your code is fit for inclusion in GNOME. We also present information that will be useful to package maintainers.

Please make sure you read the GNU Coding Standards in addition to this document. These are available as the (Standards) info node in the standard GNU documentation.