What is software engineering?
Software engineering is the systematic design, building, testing and maintenance of software, especially large systems built by teams over years. Writing code is only part of it; most effort goes into requirements, design, reviews, testing and changing existing code.
The term was popularised at a 1968 NATO conference called to tackle the "software crisis": projects running late, over budget and full of bugs. Many of its lessons are about people and communication as much as technology.
Every new person adds a conversation with everyone else
A team of n people has n(n−1)/2 possible communication lines. Each one costs time in meetings, messages and misunderstandings. Grow the team and watch the lines multiply faster than the people.
Clean up code without changing what it does
Refactoring improves a program's structure while keeping its behaviour identical, ideally with tests proving nothing broke. Apply each step to this checkout function and watch the metrics.
function checkout(c, i) { let t = 0; for (let x = 0; x < i.length; x++) { if (i[x].type == "book") { t = t + i[x].p * i[x].q * 0.95; } else if (i[x].type == "food") { t = t + i[x].p * i[x].q * 1.0; } else { t = t + i[x].p * i[x].q * 1.2; } } if (c.member == true) { if (t > 100) { t = t * 0.9; } } if (t > 50) { return t; } else { return t + 4.99; }}