The basics of building software professionally: the development life cycle, version control, and testing. Press play on any sketch to watch it happen.
1 The software development life cycle
Software engineering is more than coding. Every project moves through the same activities, whether a team does them once in a long sequence or many times in short cycles.
Waterfall: each stage finishes before the next starts. Suits fixed, well-known requirements.
Iterative: build a small slice, learn, repeat. Suits changing requirements.
Maintenance: most of a system's life and cost comes after its first release.
Cost of change: a mistake found late costs far more than one found early.
Cycle diagram
1/6 Find out what is really needed.
Rule of thumb: Code is read far more often than it is written. Write it for the next person.
2 Version control with Git
Git records every change to your project, so you can go back, work in parallel and see who changed what. Every engineer uses it, every day.
Working directory: the files you are editing now.
Staging area: the changes picked for your next commit.
Commit: a saved snapshot with a message.
Remote: a shared copy, usually on GitHub.
Branch: a separate line of work that can merge back.
1/4 You fix a bug. Only your working files change.
Rule of thumb: Commit small and often, and write messages that explain why.
3 Testing basics
Tests are code that checks your code. A good test suite lets you change things with confidence. Most tests should be small and fast, with a few big ones on top.
Unit test: one function, on its own. Runs in milliseconds.
Integration test: several parts working together, such as code and a database.
End-to-end test: the whole system, as a user would use it. Slow but realistic.
Test-driven development: write a failing test first, make it pass, then tidy up.
Test pyramid
1/4 A change arrives with a bug in it. Unit tests run first, and take only seconds.
Rule of thumb: When you fix a bug, first write a test that catches it. That bug can never return unnoticed.