ID:31553
 
At one point, I provided a couple sample snippets of code from Newtopia. For evidence that my quirky programming humour knows no bounds, I provide further evidence of how pervasive the problem is.

A code snippet follows from one of my DM files for my space game.

    J_Unit
desc = "J-Units are standard spare parts. They yield a specific amount \
of resistance to a power connection system."


K_Unit
desc = "K-Units are standard spare parts. They operate as non-conductive \
cantilevers to support \"hot\" electrical systems."


L_Unit
desc = "L-Units are standard spare parts. They're very important units. \
Without them, space travel is but the fevered dream of a madman."
Some nice stuff there.
I have a tendency to very descriptive names for procedures, regardless of whether or not it makes the name too long. I'll go and dig up a few. <_<
From the expression evaluator I'm currently working on. -collect_valid_operator_ascii()

All from the previous version of the FizzFuzz interpreter, which is getting rewritten -
evaluate_for_embedded_expression(string)
invalid_variable_name_characters(variable)
evalute_vars_in_expression(expression)


From pif_MapLoader - produce_reference_strings()

From the screen text program I'm currently working on - get_character_dimensions(a)

[Edit]
Note: This stuff never actually has to be dealt with by the people who use my libraries, by-the-way. I just prefer to do it this way for some reason. Usually everything can be manipulated via procedures I provide, so people can skip using the overly-descriptive function names.
I've ended up drifting towards slightly longer names. Not nearly as long as yours though, fizz. =P

Nothing worse than a name that is ambiguous as to its meaning.

For some reason I name variables using underscores, but functions/procs with camelCase (or whatever).

var/my_name_is_fred
proc/myNameIsFred()

I dunno why though.
Trivia: The proper term for that is "medial capitals".

I also name variables with underscores (except really simple ones, on occasion, such as "xcoord"), and name client-program procs in MedialCapitals and library-like procs in alllowercase.
Medial Capitals capitalises every word? Only because the format I use capitalises every word *after* the first one.

I name my classes with every word capitalised though... a java influence, I think.

xcoord would be okay, but sometimes underscores are useful- for example, if you're working with, say, a map's dimensions, "max_x" is clearer than "maxx".
But maxx is easier to write than max_x and makes for faster coding. Also, you don't need your vars to be clear. If all goes well, no one but you will be seeing your source anyway.
Elation wrote:
Medial Capitals capitalises every word? Only because the format I use capitalises every word *after* the first one.

No, medial capitals just refers to the style. The actual capitalisation scheme doesn't matter, as long as words are capitalised and concatenated with no spaces or underscores. Even "iPod" is a medial capital scheme.


Squeegy wrote:
Also, you don't need your vars to be clear. If all goes well, no one but you will be seeing your source anyway.

Bad idea. Always use descriptive variable names. Even if it's only you seeing the source code, you'll eventually have to come back to it, and I can guarantee it won't be fresh on your mind by then. Also: http://www.bash.org/?6824
Incidentally, did no one catch the Futurama reference?