Skip to content

File Naming Conventions

Shawn Harrison edited this page Mar 25, 2017 · 4 revisions

← Previous topic: Coding Conventions | Next topic: Directory Naming →

This memo describes conventions developed in the CIL for the naming of variables and program files. This strategy was developed as a result of much wasted time trying to guess what filenames might be, for example findxyz, or findXYZ, or Findxyz or Find_xyz, etc. By having predictable standards much time is not wasted.

  1. Names should be long enough to be descriptive but not so long that it becomes really painful to type.

  2. Names should give at least enough information about what the function does that the name can be used to find it.

  3. Matlab .m files should have a short comment at the top of the file that will describe the function in reasonable detail when you type “help fName” (where fName is the actual file name). Non-.m functions should have a .m counterpart with this comment.

  4. Names are capitalized based on the following hints: a. all letters lower case, except: b. acronyms are capitalized (e.g. DB, FOV) c. first letter of second or following words capitalized. d. no underscores.

  5. By convention, some variables are expected to be capitalized in function names, for example XYZ and UV

    Examples: parseFilename, findArgusFiles, myFavoriteVariable

    Examples: DBGetCameraByID, findUV. (DB stands for database in CIL routines, UV is caps by convention)

    Examples: DuckGetTides (Duck is a proper noun)

← Previous topic: Coding Conventions | Next topic: Directory Naming →

Clone this wiki locally