Programming Principles
What do these git commands do?
Git vs GitHub
100

What does YAGNI mean?

You Aren’t Gonna Need It)

- Don’t add features or functionality until you actually need them.

-Meaning: Avoid “just in case” code that isn’t required right now — it adds complexity and maintenance cost.

-Don’t write extra methods or classes for future scenarios that might never come.

100

Push

  • Purpose: Send (upload) your local commits to a remote repository (like GitHub).

  • Meaning: Shares your saved changes with others.

100

Repository

  • A Git repository is a storage space that holds all your project’s files and the complete history of every change.

  • Think of it as: A folder that Git tracks.

  • Contains: Your source code, Commit history, Branches and tags

200

What does KISS mean?

KISS (Keep It Simple, Stupid)

-Don’t overcomplicate code.

-Meaning: Choose the simplest possible solution that works — avoid unnecessary abstractions or clever tricks.

-Example: Prefer clear loops over complex one-liners.

200

Merge

  • Purpose: Combine changes from one branch into another.

  • Meaning: Merges the history of two branches together.

200

Local repository

  • Definition: The copy of the repository that lives on your computer.

  • Purpose: Where you make changes, commit them, and test before sharing.

300

What does CRUD mean?

CRUD (Create, Read, Update, Delete)

-Basic operations for persistent data management.

-Code dealing with data should clearly implement these four core operations and nothing more unless needed.

-Database APIs or REST endpoints often map directly to CRUD actions (POST, GET, PUT, DELETE).

300

Pull

  • Purpose: Fetch and merge changes from the remote repository into your local one.

  • Meaning: Updates your local files to match what’s on GitHub or the shared repo.

300

Remote repository

  • Definition: The copy of the repository that lives on a server, usually on platforms like GitHub, GitLab, or Bitbucket.

  • Purpose: To share code and collaborate with others.

400

What is Separation of Concern (SoC)?

-Each part of your program should handle a specific concern.

-Meaning: Divide code into distinct sections/modules, each with a well-defined purpose.

-Keep business logic separate from user interface and database logic.

400

Commit

  • Purpose: Save your changes locally (in your own repository).

  • Meaning: A commit is like a checkpoint or “save point” of your work.

400

Staging area

  • Definition: A temporary holding area where you prepare changes before committing them.

  • Think of it as: A “to-be-committed” list.

500

What is DRY?

DRY (Don’t Repeat Yourself)
-Eliminate duplicate code.

-Meaning: Common logic should live in one place reuse it instead of copying it.

-Example: Extract repeated calculations into a shared utility method.