The Weirdest Programming Principles You’ve Never Heard Of

We’ve already walked you through the most essential programming principles you need to know about, but there’s another class of programming principles that may prove even more beneficial than those. computer science

Whereas the aforementioned principles teach you how to be smart with your code, the following principles will teach you to be wise with your code. Some of them are strange, and many of them are humorous, but they’re all equally practical and important. Take heed! computer science computer science computer science computer science

1. The Bloat Principle

This one has so many variations that it’s hard to pick one as the main one. Perhaps the most “official” version is the Law of Software Envelopment, more commonly called Zawinski’s Law, named after Jamie Zawinski and mentioned in The Art of UNIX Programming: computer science computer science computer science computer science 

“Every program attempts to expand until it can read mail. Those programs which cannot so expand are replaced by ones which can.” computer science computer science computer science computer science

It’s talking about the tendency of programs to attract more and more features over time and inevitably drift towards increasing complexity. You may know this as feature creep, which is the ongoing addition of new features that have nothing to do with the main purpose of the program. Feature creep leads to bloat, and bloat is often undesirable.

This can also apply to software performance:

“Software expands to consume all available resources.”

Back in the 90s, hard drives and CPUs and RAM were far more restrictive than they are today and programmers worked hard to fit as much as they could within the limits. Yet now that we have bigger drives and faster CPUs and more RAM, we still struggle to respect limits. Everything gets bloated over time. It’s your job to keep that in check.

2. The “Worse Is Better” Mentality

Almost as if in response to the Bloat Principle, we have the Worse Is Better mentality, first coined by Richard P. Gabriel in an essay he wrote about software quality:

“Software that is limited, but simple to use, may be more appealing to the user and market than the reverse.”

In other words, it’s wise to figure out the one problem your software aims to solve and then be very good at that one thing. Keep it simple. The more you spread yourself thin, the more unmanageable the project will become, and the more undesirable it becomes for users.

What happens when you ignore this? You end up with the Software Peter Principle:

“A overly complex project will eventually become too complex to be understood even by its own developers.”

It comes from the broader Peter Principle, which states that when employees are promoted based on their current competency and not their expected competency at their next position, all employees eventually end up in a position of incompetence. Take that principle and apply it to software, and you’ll see why worse software can often be better.

Prev1 of 5Next

Leave a Reply

Your email address will not be published. Required fields are marked *