Use whitespace effectively
Guidewire recommends the following best practices for effective use of whitespace:
- Add spaces around operators.
premium = Rate + (minLimit - reductionFactor) // proper formpremium=Rate+(minLimit-reductionFactor) // improper form - Add no spaces between parentheses
and operands.
((a + b) / (c - d)) // proper form( ( a + b ) / ( c - d ) ) // improper form - Indent logical blocks of code by two spaces only.
- Add a blank line after code blocks.
- Add two blank lines after methods, even the last method in a class.
