Some random thoughts on computer programming.
- Keep log files, configuration files, and data files
in plain text whenever possible. Plain text is readable
and editable by a human with crude tools when all else
fails.
- If you are using a language that offers it, regular serialization
of your objects is almost always a big win. All real world
software systems exist in an environment where other processes,
data sources, and data sinks fail. Frequent checkpointing
increases reliability by allowing faster recovery from catastrophe.
- There is no trade-off between ease of implementation and ease of use.
Computers are tools. People shouldn't have to adapt to tools, tools
should adapt to people.
- Documentation is worthless if it is not maintained. You are better off
not writing it at all than writing it and letting it fall out of date.
- Public APIs are your friend. Your users want to extend your software
into applications that you never dreamed it could be good for. They can't
do this if there aren't hooks to hang their code from.
- Network transparency is good. Instead of named pipes, unnamed pipes,
shared memory, or signals, implement inter-process communication via
standard TCP sockets. That way, when your application's workload later
grows in volume, it is easy to distribute across more than one node.