Newer
Older
labs / tiddlers / content / labs / lab01 / _labs_lab01_Naming Conventions.tid
created: 20200703090056774
modified: 20200703095103922
section: 2
tags: lab01
title: /labs/lab01/Naming Conventions
type: text/x-markdown

The following are the naming conventions that we want you to use in INFO202.  The Java conventions are industry-wide conventions.  The other conventions are to help  you to avoid common problems with conflicting bits of software.

* Project folders should be single-word (no spaces) and entirely lowercase.

  IDEs and build tools like Gradle often use shell commands to performs tasks on your files and shell commands can have problems with paths that contain spaces since spaces are usually treads as separators by these commands.

  We will, on occasion, use the command line to perform some actions on the project and you will have problems if your paths contain spaces.

  Also remember that Java is case-sensitive and both Windows and macOS only pretend to be case-sensitive.  This can cause some weird problems, particularly when you rename folders, so the easiest way to avoid those problems is to stick to all-lower case for folder names.  Linux file systems are usually case sensitive, so we can avoid a lot of weird problems by using Linux, however the network file servers that we are using are not-case sensitive, so we still have to be careful.

  Please also consider if the parent folder that you are putting your projects into contains any spaces.  Putting your projects into the <<path "My Documents">> folder on Windows is a bad idea for the reasons mentioned above.

* Java classes and interfaces should **always** start with an uppercase letter (which makes them easily distinguishable from other identifiers in your source code).

* All other identifiers: packages, fields, variables, methods; **always** start with a lowercase letter.

* Use camel case (`whereTheWordsAreSeparatedLikeThis`) rather than underscores for **all** identifiers.

  This is a standard Java convention and some libraries and tools assume that your classes will use camel case and will not work properly if you don't.