This are some "new" pattern which I have been using and not yet documented:
1. Separate methods in I/O methods and calculation methods.
2. Once those methods are separated, separate classes into I/O classes and calculation classes.
3. Make transformation so that no information is lost. That is, be able to undo operations at any time, because information can be reconstructed.
4. A corollary of the above is not doing operations at all, but do as little as possible to conserve the old information and add the new information as requested. Whenever you need to show the information in a certain way, do the calculation on the fly. This could also be called "Lazy calculation".
5. Avoid storing repeated information. It may become inconsistent and it is waste of time and space.
6. Optimize at the end, when all functionality has been implemented and have been tested.
7. Only introduce significant optimnizations (10x, 5x, etc.). If optimizations only introduce 2x performance improvements, remove them and try new ones.
8. Move repeated code into libraries. Code always have bugs, and one way to reduce the bug count is to test the code throughly. When code is in libraries it is tested more often, therefore it can only contain fewer bugs. Besides repeated code is a maintainance nightmare.
9. Move optimizations into libraries to make sure they are not introducing subtle bugs and to make sure those optimizations can be reused.
10. Convert programming problems into configuration problems, so that they are easier to handle and test and so that they can be changed without breaking the old functionality.
11. Make sure configuration may be changed on the fly, so that testing becomes easier.
12. Introduce interceptors for logging, permissions, validations, ejbs, sql queries, etc.
13. Make sure you are working on real requirements and not something that nobody will test or nobody will use.
lunes, 6 de agosto de 2007
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario