Old site was 10+ years old, copied this – still relevant.
- THINK Above all else think about what you are doing. Don’t blindly follow patterns. Make sure what you are doing makes sense. Trust your own brain.
- Code different things differently, same things the same.
Don’t force a DRY pattern on something that is really different, but if the pattern is really the same use the same code for it. - Better is the enemy of done.
Code as best you can, but don’t be afraid to ship it. Code is a tool to be used. Nobody can use your code if you don’t let them. - Unwritten code has no bugs.
Don’t write code unless you have to. Nobody is perfect; your code will have unforeseen effects. Determine before hand if the problem really needs code to be solved. - Do not repeat yourself (DRY).
Make sure your code is neat and separated so it can be reused. Don’t type (or copy/paste) the same code twice. Actually any time you copy/paste code it better be for a good reason. - Don’t be afraid to delete code, it’s in source control.
(It is in source control right? Seriously it better to use bad source control over no source control). Undeleted code just clogs up the code base. Delete code that isn’t needed and lean on source control for history. Too may times have I see old code hang around because nobody was sure why it was needed in the first place. - It’s just bits and bytes.
Don’t be afraid to refactor. The raw materials for code are cheap. - Take pride in your work. Don’t be sloppy.
Coding is a craft. Pay attention to the code you wrote and take some pride in it. - Bugs happen.
Nobody can plan for the future completely. Bugs will happen and that’s OK. Fix them when they arise. - Have fun.
Not every task will be fun, but strive to find fun in what you are coding. It will keep you sane and create a better product.