-
Notifications
You must be signed in to change notification settings - Fork 2
Coding conventions
janimattiellonen edited this page Nov 22, 2012
·
2 revisions
If possible, write tests and then some more. Unit test powered code is so much easier to work with, change, refactor - without the fear of breaking something somewhere not knowing about it.
Document your code using doc blocks. Don't over-comment. For example, if method name is getUsername() then there is no need to add a comment like "Gets the username".
Don't. Ever. Leave. Commented. Code. Behind! It confuses people.
Don't Repeat Yourself. If you see yourself copy pasting code, refactor it somewhere, where it can be re-used.