Naming Conventions: How We Name Things in This Course

Every programming language and team has habits around how things get named — variables, functions, files. These habits are called naming conventions. They're not enforced by the computer (mostly), but following them matters more than it might seem.

The Main Styles

StyleLooks likeUsed for
snake_case favourite_language, day1_make_it_yours.py Python variables, functions, and file names
camelCase favouriteLanguage JavaScript, Java — not the Python convention
PascalCase FavouriteLanguage Python class names (once we get there)
kebab-case favourite-language Web URLs, some config file names — hyphens break Python variable names (Python reads - as subtraction)

Why It Matters

1. Consistency makes code readable — for you, for me, and for AI.
When every variable in a file follows the same pattern, your eyes stop having to think about how something is named and can focus on what it does. Mixing styles in the same file (favourite_language next to favouriteColor) is a small thing that adds up to real friction when reading code later — including your own code, a month from now.

2. Python has an official style guide, and it says snake_case.
It's called PEP 8, and it's the closest thing Python has to a rulebook. Following it means your code "looks like Python" to anyone else who reads it — including the person grading it, and including AI tools, which are trained on millions of files that mostly follow this convention. Code that matches the convention is easier for AI to help with correctly, too.

3. File names cause real bugs, not just style complaints.
Some systems are case-sensitive and some aren't — Portfolio.py and portfolio.py might be the same file on your laptop and two different files once it's on GitHub. Spaces in file names cause problems with a lot of tools (including git). Sticking to lowercase snake_case for file names sidesteps both problems entirely.

What to Use in This Course

  • Variables and functions: snake_case — student_name, calculate_average()
  • File names: snake_case, no spaces — magic_eightball.py, day1_make_it_yours.py
  • Class names (later in the semester): PascalCase — StudentRecord

Organizing Your Repo by Unit

As the semester goes on, keep your repo organized by unit — one folder per unit, prefixed with its number, so everything stays easy to find (yours, and anyone looking at your repo).

  • Unit 0 — Launch & Diagnostic: 0_getting_started
  • Unit 1 — Python Foundations: 1_python_learning
  • ...and so on, one numbered folder per unit as the semester continues

Same rules apply as file names: lowercase snake_case, no spaces.

If AI Writes Code for You

AI tools don't always default to the convention a specific course or team wants — some lean camelCase out of habit from other languages. If AI hands you camelCase in a Python file, that's worth noticing and fixing, not just accepting. Part of showing your understanding is catching things like this, not just making sure the code runs.