5. Code Presentation Conventions

In addition to the standard document conventions covered in Section 4 Document Conventions, there are some additional conventions related specifically to discussing source code:


This is the name of a class in an object-oriented (OO) programming language. For example, the class com.arsdigita.categorization.CategoryTreeNode.

method name

This is the name of a method in an OO programming language, e.g. the method getBaseDataObjectType.


The name of a function or subroutine, as in a programming language. For example, the function SecurityLogger.warn().

variable name

The name of a variable. For example, the variable BASE_DATA_OBJECT_TYPE.


An option for a software command or Method. For example, a user has been granted read privileges on an object.

return value

The value returned by a function. For example, a method returns null.

program listing

A literal listing of all or part of a program:

extern void sem_exit (void);
extern struct task_struct *child_reaper;
int getrusage(struct task_struct *, int, struct rusage *);
static void __unhash_process(struct task_struct *p)
        detach_pid(p, PIDTYPE_PID);
        detach_pid(p, PIDTYPE_TGID);
        if (thread_group_leader(p)) {
                detach_pid(p, PIDTYPE_PGID);
                detach_pid(p, PIDTYPE_SID);
        p->pid = 0;
first term

The first occurrence of a term, such as the first time we introduce a bulletin-board and note its abbreviated form, bboard.