Chapter 2. Writing Code

Writing code is, without a doubt, a very important part of software engineering. And while the act of coding is widely taught, the nuances of writing good code aren’t as evenly distributed. Just because you can write code to solve a problem, doesn’t mean you should write code to solve a problem! For better or worse, developers often have very strong opinions on what constitutes good code or bad code, but metrics and tooling can give you insights and guidance. Tests are some of the best documentation money can buy. Code reviews, done well, can ensure your team doesn’t rely on error prone forms or overly clever code. Ultimately, code should be written to be read.

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” — Martin Fowler

Don’t Reinvent the Wheel

Before you start pounding out line after line of (undoubtedly excellent) code, take some time ...

Get Fundamentals of Software Engineering now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.