I think it’s the little habits that define a good programmer.
- Think globally. It’s hard to implment a new feature without seeing how it fits in the big picture.
- Act locally. When adding a new feature, change as less code as you can. It will be much easier to maintain it later. No, your code is not perfect. You will have to maintain it.
- Document your code. This means internal API documentation, and some comments around hard-to-understand parts of your code. Decide on a documenting infrastructure, and use it always when adding new classes, functions, etc. You are doing it for future you. Also, take my favourite quote seriously: “Write code like the one who will maintain it is a maniac psychopath who knows your address.”
- Remove unused code. This is especially true for long-time projects. If there is a code piece no one uses anymore (including your own code), remove it. If you happen to need it later, you can get it back from…
- Version Control. Seriously, you should put everything under VC. Even your smallest side project. Even a tutorial project. It provides you valuable save points.
- Take notes. Every time you have an idea, write it down (preferably by hand, although this advice goes more for meeting notes).
- Read your notes. Obviously, taking notes worth nothing if you don’t read them. Ditch obscure and outdated ideas (but don’t delete them; just strike them through, mark them cancelled, etc.) and add your current thoughts.
- When you have time, make those ideas happen. If you don’t implement them, they are just words. Everyone can write down words. Look, I already wrote 280 of them!
- Read. Read, read, read. About everything. Your favourite technologies (so you can get better at them), your hated technologies (so you can get more ideas from them), non-technologies (because learning is fun), and pretty much everything. Being informed is a must in today’s world.
- Criticise yourself. This doesn’t mean you should beat yourself up whenever you write bad code. Instead, learn from your mistakes, so you get better. Also, a positive critique is a critique, too!
- Be awesome. (Hint: you already are)
That’s all that comes to mind right now. Have fun coding!