Clean Code and single character variable names
Julian Edwards
julian.edwards at canonical.com
Tue Aug 27 00:33:09 UTC 2013
On 27/08/13 09:26, Andrew Wilkins wrote:
> Traditionally I've also avoided abbreviated names (preferring context
> over ctx, transaction over tx/txn). I'm not 100% convinced that this is
> necessary, though, in these cases where there's a *conventional* and
> obvious abbreviation. I mean, ctx is pretty obvious. "c" not so much
> (though I use "c" a *lot* in llgo to shorten "compiler"; not great, but
> at least I'm pretty consistent about it, so it's a project-specific
> convention).
YMMV. I find "txn" far more obvious than "ctx".
Talking of "c", I was astounded the first time I found a struct called
"C" being used in juju tests.
> Minimising cognitive overhead is more important than saving a few keystrokes.
I believe this is exactly what Tim is trying to say :)
More information about the Juju-dev
mailing list