Abandoned

Since infogami has been abandoned by its creators, I’m out too. Back to web.fisher.cx for me. Everything that was here is there.

Robert Fisher

Just thinking out loud

On variable naming conventions

If you register and log in you can add comments to my pages. If viewing the main blog page, click the # underneath an entry to comment on it.

I have decided that the only variable naming conventions worth while are:

  • Use a common prefix for all global names (types, constants, variables, functions, &c.) in a module. This is really just a workaround for a lack of namespaces. If the language has namespaces, use them instead.
  • In object oriented languages, use a common convention to distinguish member variables. This is helpful because member variables have weird scope. Unless the language forces your to fully specify (this->var, self.var) member variables.

When an abbreviation occurs in camel case, this is what I tend to do: If it is at the end of the identifier, use all caps. If it is in the middle of the identifier, only capitalize the first letter of the abbreviation. e.g. fooHTTP but fooHttpBar

This wasn’t a reasoned choice, but merely an observation. Although, now that I’ve recognized it, perhaps it isn’t so bad as I thought.