Some common things that I have learnt through out my coding experience —
- Check for Multi-threaded issues – like no instance variables in a service class.
- File names should have date and for whom the file is being generated.
- Check where the file is being stored and what will happen to it.
- If the objects are not string then control the output to the file– like for BigDecimal and Dates. It may be changed to other notations.
- Add hard coded strings in properties files or make them as constants
- Use StringBuffer instead of string
- Use BigDecimal instead of double for more complex math calcs.
- For BigDecimal use scale and RoundingMode when dividing or multiplying
- If creating a file then either set delete on exit property or create files in temp directory.
- Use apache StringUtils and DateUtils for quick string and date formatting.
Please feel free to add to this list and this will help others too. 🙂