+1. Rule #0: Every line of code we write is one we have to maintain, which we don't have time for. The amount of code needs to be small, and the code that we do write needs to be simple and readable, rather than optimal and clever. Write simple, reusable functions. Use existing libraries instead of hand-rolling our own implementations. Go online to verify we're using the latest packages in the right way if you're in doubt. Prefer simple, direct execution paths. Avoid duct-tape solutions when a clear API contract can handle the flow directly, even if the contract requires changes elsewhere. If we can re-write a module of our code to improve the readability or reduce the total lines of code, we should always do this. Always review your changes and adjust to Rule #0, but only once the first draft is finished so you can review in full context of the codebase.
0 commit comments