Good programmers build up a store of principles, often expressed as short-hand acronyms. Here are some of the most helpful.
KISS — Everyone knows that this one means "keep it simple, stupid." The KISS principle tells us, most obviously, that the simplest solution that actually works for a given problem is generally best. It also warns us about our own human limitations. Nevertheless by its nature, software, and the realities that we must model, are not simple.
We overcome complexity by breaking problems down into manageable chunks that do one and only one thing and can be tested in isolation. But this is only part of the solution. Complexity reasserts itself as large numbers of small, simple elements are combined. We must therefore create larger architectures where responsiblities are clearly assigned. This leads to layered designs and — another acronym: OOP — "object oriented programming."
Complexity is also in the mind of the beholder, and the KISS principle tells us that user interfaces must be kept simple, uncluttered and intuitive. This can be best accomplished when the design embraces and tracks the user's thinking, regardless of the internal implementation of the program.
DRY — Don't repeat yourself. This is a phrase the bears repeating. This bit of coding wisdom applies on many levels. Within a single database, we avoid recording the same information more than once using a process called "normalization." At the interface level, we expect the user to enter or update information once and only once, and for updates to be reflected instantaneouly throughout the application. Within a large enterprise, we strive to avoid the common error known as "islands of data" that must be continuously synchronized.
More profoundly, within code, we extract all common logic into a single process. This is called "refactoring." Refactoring allows us to prune the bushy branching structures that code naturally evolves into, shifting any repeating logical elements from the twigs to branches to trunk of the tree. Since repetitous code is ofter similar, but not identical in intent, refactoring is the art of extracting common elements, while allowing specific implementations to vary or override core functionality. Within object oriented programming this is known as polymorphism and is sometimes accomplished via subclassing and inheritance, but there are many ways to skin a cat. In web design CSS is a form of refactoring, extracting common stylistic elements, while permitting overriding or "cascading" variations. It is not so much the specific technique that matters, but a way of thinking about appropriately simplifying designs by minimizing redundancy.
YAGNI — You ain't gonna need it. This principle admonishes us not to climb mountains just because they are there. The most common mistake programmers make is to correctly code the wrong thing!
A corrolary to YAGNI is the proven wisdom that the sooner you start to code, the longer it will take. Code lives with an ecosystem. Good frameworks allow us to set aside the big picture and code straight-ahead, but only temporarily. Ultimately every element must fit into place in a larger application.