Skip to Main Content
Simple Object-Oriented Design
book

Simple Object-Oriented Design

by Mauricio Aniche
May 2024
Intermediate to advanced content levelIntermediate to advanced
192 pages
4h 26m
English
Manning Publications
Content preview from Simple Object-Oriented Design

2 Making code small

This chapter covers

  • Breaking large units of code into smaller pieces
  • Moving new complexity away from existing units of code
  • Documenting your code to improve understanding

Complex code is harder to read and understand than simple code. As a developer, you’ve likely experienced the mental strain of deciphering a 200-line method compared to a 20-line method. You feel tired even before you begin to read it. Highly complex code is also more prone to bugs. It’s easier to make mistakes in code that’s difficult to grasp. It’s also hard to write tests for complex code, as it has too many possibilities and corner cases to explore, and it’s too easy to forget one of them.

Making code simple and small is the first thing you should ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Object Design Style Guide

Object Design Style Guide

Matthias Noback
Design It!

Design It!

Michael Keeling

Publisher Resources

ISBN: 9781633437999Publisher SupportOtherPublisher WebsitePurchase Link