LEGO •Break code into the smallest little blocks possible. •Lots of blocks are far more versatile than whole structures. •Blocks can be combined with all other types of block.
•Everything should do one thing, one thing only, and one thing well. •Allows for greater amounts of combinations of smaller things. •The basis of Unix. Single responsibility principle
•If a thing does three separate jobs, it needs three separate hooks. •Allows you to stay more granular. •Build more combinations more quickly. •Keeps CSS’ size down. More classes
•Changing a dozen classes in your HTML is a lot simpler (and nicer) than picking apart a tangled stylesheet. •Use tools (command line (grep, sed, etc.), global find and replace, etc.) to help you. 1. HTML is simple
•As a developer you are expected to maintain and work with code; why get so scared by the idea? •Embrace ways to make it easier. •Split the load between HTML and CSS. It’s your job…
Housekeeping •Factor in tidy-up and refactor time to any feature estimates. •Regularly create tech tasks to maintain and tidy up your codebase. •It’s not just about shipping new code, it’s also about looking after the code you already have.
Don’t stress •Nothing is 100% right first time. •Things get worse as time progresses. •You can’t do better than your best. •Stop caring too much; it’s just code.