We're not too serious or strict on this, but you may find this interesting. There is some logic in coding style.

The indent style used in psyced is a K&R brought up to date with the current C/LPC syntax, which thus resembles the KNF a lot.

First of all, the 1TBS or one true brace style is employed.

void register_scheme(string scheme) {
        services[scheme] = schemes[scheme] = previous_object();
}

An opening brace is never on a line by itself. The closing brace is matched up to the code that opened it. In this case the "}" matches the "v" in "void".

All other bracing styles are based on the idea that "{" and "}" braces are easier to match up, but since they look so similar it isn't actually true. It is visually clearer to match a brace with text, as long as they are on the same level of indentation. This may be scientifically unproven as yet, so there's a thesis work left to be done in cognitive research.. ;)

A special case may be a one line function, like this one:

object find_target_handler(string target) { return targets[target]; }

It is also a good idea to have else clauses on the same line with the closing brace of the preceding if so that the if block doesn't give the impression it is semantically complete when it isn't.

if (value == "" || value == "-") {
        vDel(key);
        w("_echo_set_default",
          "Setting [_key] has been reset to its default state.",
          ([ "_key" : key ]) );
} else {
        vSet(key, value);
        ...
}

It is okay to leave out braces for single statement blocks, but be careful when you change them later!

unless (sizeof(args) >= 2)
    w("_warning_usage_activity", "Usage: /activity <person>");
else {
        t = lower_case(args[1]);
        ...
}

Blocks are indented by hardware TABs (which look like 8 spaces) while line continuations are held in 4 spaces. This is KNF conformant and the default settings of the vi editor. Sometimes, 2-6 spaces are used instead of 4, given it looks better.

If your code is so complex, that it no longer fits 80 columns, then you didn't organize your code properly (KNF/BSD rule).

Function calls are written with the ( attached to them whereas language control statements are seperated by a space. Example:

unless (is_formal(to)) to = summon_person(to);

Marenz suggests where functions are defined a space should separate the name from the arguments so that grepping for 'fname ' returns only its definition, never any call of the function. Like this:

function fruit (string food) {
     if (food == "apple") return true;
     else return bananacheck(food);
}

For better readability, variables are seperated from the operator by a space while constants are not. Example:

D("Dynamic Server UNLs: "+ myUNL +" and "+ myUNLIP +"\n");

This holds true especially for the string concatenation operator.

http://perl.pages.de/bin/indentknf is a very simple perl script that reindents C-like source codes by wild guesses at what's already there.. it expects a somewhat sane formatting as its input.