2.2. Structure helps make sense of things
I’ve had the pleasure and horror of seeing numerous code bases that weren’t full of beautiful strides of genius flowing from one source file to the next. Some of them never jumped to another source file because it was all there—all of the code and logic triggered by, say, the submission of a web form would reside in a single source file. I’ve had a text editor crash due to the size of a source file I foolishly tried to open. I’ve seen a web application vomit an error because a JavaServer Pages file had grown so big that the resulting byte code violated the Java class file specification. It’s not just that structure would be useful—the lack of structure can be damaging.
What’s common among most of these ...
Get Effective Unit Testing 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.