Sunday, March 2, 2014

Learned from mistakes

This is republication of an old post. Lessons learned from my mistakes.

1. Never have uncommitted code, when switching context.
2. Never ignore a peice of untrusted code because it works.
3. Before providing the access specifiers make sure that its appropriate.
4. Minimize hard coded paths and Sql queries, put them in configuration files.
5. Never ignore/suppress errors/warnings if it can be fixed or improved.
6. Pay attention to Naming convention of Classes, Methods, Variables and the packages.
7. Always have the Implementation Class named after the interface.
8. Sort members according to visibility and dependency.
9. Try to minimize the number of lines of code and make it more readable.
10. While making loops make sure that most appropriate condition is being checked.

No comments: