11.1. Optimize for People First, Resources Later

Note that we didn't say, “…how to avoid running out of ….” There's a good reason for this: If you worry about it from the beginning, you're optimizing for the wrong thing. While you'll see a lot of carping from seasoned professionals on Usenet arguing that such-and-such code isn't as efficient as their latest mutation of it, understand that they're coming from a place where the mind-bending code they've just written is as clear to them as anything else. More often than not, they're coming up with these performance enhancements to make the problem more interesting for themselves.

They would not disagree with the advice we're about to give, however:

Optimize your code for readability and maintainability ...

Get Perl Debugged 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.