[clug] July Programming SIG: the fourteen principles for new programmers

Sam Couter sam at couter.id.au
Tue Jul 15 21:34:14 GMT 2008

Paul Wayper <paulway at mabula.net> wrote:

Most of what you've written here is very good. I've only got a couple of
comments, one of which is pretty important.

> Be liberal in what you accept, and strict in what you output.

This is sometimes a good principle, but can't be applied as generally as
you make out. It leads to things like the prevalence of HTML tag soup
because most parsers mostly put up with it, or programs that fail
mysteriously after trying to deal with dodgy input instead of validating
it and spitting the dummy on the spot.

I prefer the fail fast principle. If your input isn't what you expect,
fail immediately and with a message that makes the error obvious.

> You may find it easier to not tell your
> management about the first one in case they want to keep it.

NO!! It isn't your job to second-guess management. Doing this just leads
to programmers gaining the reputation of cowboys, being unprofessional,
needing micromanagement to ensure they're really doing the job they say,
etc. Bad mojo all round. Don't conceal stuff from your management. This
is very important.

Tell your management exactly what you're doing. If you're writing a
prototype or proof of concept to get a better handle on the problem
domain, tell them that. Make sure they understand it's not intended to
be fully functional or even relatively bug free, but that it will help
you create a higher quality system for less effort (paid time) in the end.

It's often very hard for non-technical people to accept that you're going
to throw away what looks to them like a system that very nearly works.
You need to explain to them that the value isn't in the code, it's in
what you and your organisation learned building it. The next one will be

If they don't seem to understand or don't agree, maybe you explained it
poorly, maybe they're incompetent, or maybe they're just making different
decisions about the business than you would like. You don't get to
overrule them by subterfuge, you have to work with them (or quit) instead.
Sam Couter         |  mailto:sam at couter.id.au
OpenPGP fingerprint:  A46B 9BB5 3148 7BEA 1F05  5BD5 8530 03AE DE89 C75C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20080716/886a3c5f/attachment.bin

More information about the linux mailing list