0% found this document useful (0 votes)
19 views5 pages

Module 2

Uploaded by

allansaboke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views5 pages

Module 2

Uploaded by

allansaboke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Module 2 — Detailed Notes

1) What a software developer does (role overview)

 Core responsibilities: design, write, test, deploy, and maintain software; participate in
requirements conversations; debug and improve performance; document code and
support users/teams. These activities form part of a software development lifecycle
(SDLC) and vary by team size and product stage. (devry.edu, Indeed)

Key learning goals for this module

 Understand the developer’s place in a product team.

 Be able to use version control (Git) for tracking and collaboration.

 Use an IDE effectively to write, test, and debug code.

2) Version Control — Why it matters

 What: Version control systems (VCS) track changes to files over time, let you revert to
earlier states, and enable collaboration without overwriting each other’s work.
(Atlassian, NBIS Sweden)

 Benefits: teamwork at scale, audit trail/history, safer experiments (branches), easier bug
investigation (blame/log), and support for CI/CD workflows. (Atlassian)

Quick terms

 Repository (repo): storage for project history.

 Commit: a recorded snapshot of changes.

 Branch: an independent line of development.

 Merge: combine branches.

3) Git (focus) — essentials & workflow

 Official source: Use the Git docs and tutorial for canonical syntax and concepts. (Git)

Common local Git commands (practical)

# start a repo
git init

# clone remote repo

git clone https://github.com/username/repo.git

# check status

git status

# stage and commit

git add file.py

git commit -m "Short, imperative summary"

# view history

git log --oneline --graph --decorate

# create and switch branch

git checkout -b feature/awesome

# merge feature into main (from main)

git checkout main

git merge feature/awesome

# sync with remote

git pull # fetch + merge

git push origin main

(Commands and usage patterns: official Git docs and Git tutorial). (Git)
Practical tips

 Make atomic commits (one logical change per commit).

 Use git status and git diff often.

 Keep local branches short-lived if using CI/CD workflows.

4) GitHub — common operations & collaboration flow

 GitHub hosts Git repos and adds collaboration features (issues, PRs, actions). Learn the
quickstart (create repo → branch → commit → open pull request → merge). (GitHub
Docs)

Typical team flow (short)

1. Fork or branch from main.

2. Implement change on a feature branch.

3. Push branch to remote.

4. Open a Pull Request (PR) — request review and show diffs. (GitHub Docs)

5. Address review comments, update branch, and merge after approvals.

6. Delete merged branch.

Important ops to learn on GitHub

 Clone, Push, Pull, Branch, Pull Request (PR), Merge, Resolve conflicts, Use Issues for
tracking. (GitHub Docs)

5) Branching strategies & commit messages (best practice)

 Branching choices: Gitflow (structured releases, longer-lived branches) vs Trunk-based


development (short-lived branches, frequent merges). Choose based on team release
cadence and CI/CD maturity. Many modern teams prefer trunk-based for CI/CD agility.
(Atlassian)

 Commit messages: Use concise, imperative subject lines (≤ ~50 chars), blank line, then
body (wrap ~72 chars). Consider Conventional Commits for machine-readable history
(e.g., feat:, fix:). Good commit hygiene helps future debugging and release automation.
(cbeams, conventionalcommits.org)
6) IDEs — what they are and why use one

 Definition: An Integrated Development Environment (IDE) bundles an editor, debugger,


build tools, and project management into one application to speed development.
Examples: Visual Studio Code, IntelliJ IDEA, PyCharm, Visual Studio. (JetBrains, Visual
Studio Code)

Key IDE features to leverage

 Syntax highlighting & IntelliSense / code completion. (Visual Studio Code)

 Integrated debugging (breakpoints, call stack, watch variables). (Visual Studio Code)

 Built-in or easily-added version control (Git integration). (Visual Studio Code)

 Extensions / plugins (linters, formatters, test runners, language servers). (Visual Studio
Code)

Practical setup advice

 Install language-specific extension (e.g., Python: Pylance in VS Code or PyCharm).

 Enable format-on-save + a linter (e.g., black/flake8 or ESLint).

 Use IDE-run tests and debugger before pushing big changes.

7) Hands-on mini-lab (do-it-yourself)

1. Install Git and create a GitHub account. (Follow official guides.) (Git, GitHub Docs)

2. Create a repository on GitHub, clone it locally. git clone <url>. (GitHub Docs)

3. In an IDE (VS Code recommended): open the folder, create hello.py, add code, git add →
git commit -m "feat: add hello program", git push. (Visual Studio Code, Git)

4. Create a feature branch, change code, push branch, open a PR on GitHub, request a
review, address comments, merge. (GitHub Docs)

Mini-exercises to check competence

 Can you resolve a simple merge conflict locally?

 Can you run debugger and set breakpoints in your IDE?

 Can you create and merge a PR with at least one review comment?
8) Common pitfalls & how to avoid them

 Big, unfocused commits: break into atomic commits. (cbeams)

 Long-lived branches that drift: prefer short branches + frequent merges (trunk-based) if
you use CI/CD. (Atlassian)

 Not using .gitignore: commit only necessary files (exclude build artifacts, credentials).
(See Git docs for .gitignore patterns.) (Git)

9) Suggested learning resources (primary / authoritative)

 Git (official): Pro Git book and docs — start here for command details. (Git)

 GitHub docs & Hello World quickstart: hands-on PR workflow. (GitHub Docs)

 Atlassian Git tutorials: version control concepts, branching strategies. (Atlassian)

 IDE docs: VS Code docs (IntelliSense, debugging, extensions) and JetBrains overview
(IntelliJ family). (Visual Studio Code, JetBrains)

 Commit docs & conventions: Conventional Commits and readable commit guidelines.
(conventionalcommits.org, FreeCodeCamp)

10) Quick checklist to pass this module

 Explain the role of a developer and list 5 day-to-day tasks. (devry.edu)

 Initialize a Git repo, make 5 commits with clear messages. (Git)

 Create a branch, open a PR on GitHub, go through review + merge. (GitHub Docs)

 Debug a small program in an IDE and run tests locally. (Visual Studio Code)

You might also like