Total Pageviews


11 tips for better code

1. keep methods short
2. never ever ever reuse a variable for different purpose
3. use self-descriptive variable and method names
4. define variables as close as possible to the place of their usage
5. no magic numbers
6. be friend with your language
7. don’t fight the convention
8. watch out for premature optimization
9. always refactor the code after you test it
10. don’t get sucked into overengineering
11. learn new things by prototyping

No comments: