- Thou shalt not put queries in for loops
- Thou shalt not put DML in for loops
- Thou shalt have a happy balance between clicks & code
- Thou shalt only put one trigger per object
- Thou shalt not put code in triggers other than calling methods and managing execution order
- Thou shalt utilize maps for queries wherever possible
- Thou shalt make use of relationships to reduce queries wherever possible
- Thou shalt aim for 100% test coverage
- Thou shalt write meaningful and useful tests
- Thou shalt limit future calls and use asynchronous code where possible
And I just have a couple of comments to add for color.
Comments on #7
I haven't tested this hypothesis yet, but... does this commandment still hold with large data volumes? Especially in the context of batch Apex? One certainty is that executing a single query like this is convenient for the developer. But when the query would return thousands of records that reference a small set of parent records, perhaps at larger data volumes a more efficient approach would be to split the query and leverage commandment #6 instead.
Comments on #10
The future annotation is slowly become obsolete with the introduction of the Queuable interface in Winter '15, although general guidelines for designing asynchronous automation still hold true.