Tolstoy, Emerson, Style, and Maintainability

Happy families are all alike; every unhappy family is unhappy in its own way.

— Leo Tolstoy, Anna Karenina

I've noticed that most folks who default to Perl tend to write Perl in a manner largely inconsistent with the next guy's.

eropple, Hacker News discussion of Puppet, Chef, Ruby, Python, and Perl

A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines.... "Ah, so you shall be sure to be misunderstood." — Is it so bad, then, to be misunderstood? Pythagoras was misunderstood, and Socrates, and Jesus, and Luther, and Copernicus, and Galileo, and Newton, and every pure and wise spirit that ever took flesh. To be great is to be misunderstood.

— Ralph Waldo Emerson, Self-Reliance

I suspect, but cannot yet prove, that the internal consistency of a program is an emergent property discovered through active development, maintenance, feedback from real users, and the concomitant reframing of features and refactoring of code.

I believe, from long and often painful experience, that every good program is good in its own way, while bad programs are all alike.

I understand that I will understand my problem domain better as I learn more by solving it in parts. (But I'm happy to borrow a well-tested implementation of the All Points Shortest Path algorithm when it's obvious I have a graph traversal problem.)

I laugh at the people who recoil in mock horror at the use of sigils and variable declarations and the general principle of TIMTOWTDI, but encourage everyone else to monkeypatch global classes to create their own parser-abusing "internal DSLs".

Then again, the dominant criticism of Lisp seems to be "Look at all the parentheses!" and not "Wow, you mean I have to learn the semantics of this series of macros and their possible combinations before I can help maintain this program?"

May we laud our languages and tools and ecosystems for the ways in which they support our discovery and promotion of deep consistencies.

Modern Perl: The Book

cover image for Modern Perl: the book

The best Perl Programmers read Modern Perl: The Book.

sponsored by the How to Make a Smoothie guide



About this Entry

This page contains a single entry by chromatic published on October 3, 2011 11:27 AM.

When Forking is Not an Act of Love was the previous entry in this blog.

Why Test::Harness Should Not Enable Global Warnings is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by the Perl programming language

what is programming?