[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 6502 illegal opcodes questions



Michael J. Mahon wrote:
> Lyrical Nanoha wrote:
> > I use several metasyntactic names for throwaway variables (foo, bar,
> > grill; travel, travel2, travel3; i, j, k; x, y, z), but usually it's
> > something like "nolin" (number of lines), "curlin" (current line), etc.
> > - an abbreviation, since I don't like to type any more than I have to.
>
> For a small namespace, simple schemes can be workable, but for large
> namespaces, with many hundreds of identifiers, naming conventions help
> keep things straight, avoiding conflicts and, even more importantly,
> providing instant recognition to a reader who understands the naming
> convention.

Saving keypresses in the way LN describes can really waste brain cycles
elsewhere. Years ago I tired of the proclivity for programmers to
abbreviate into 3 letters even 4 letter words (etc), just to fit a
pattern. Those days are long gone for me, and today's IDEs it's easy
enough to type the first few letters then ctrl-space to complete the
rest.

Using "no" within a variable name is confusing, because as we all know,
no means no. A "Num" suffix is much clearer IMO. As for foo, bar and
other "throwaways", I find there is almost always a better word for
such a temporary variable, otherwise just call it what it is "temp".
This might seem trivial, but like MM says, get a huge project and watch
the "obvious" abbreviations start to collide. Heh, I remember
refactoring someone's code, and having to work out what purpose was
served by the variable
"i_cant_be_bothered_thinking_of_a_f*cking_name_for_this_one". ;-)

Cheers,
Nick.