Gosu best practices checklist

Use the following checklist before you complete your Gosu coding tasks to ensure that your Gosu code follows Guidewire best practices.

Naming and declaration best practices

Best Practice to Follow

Best Practice Followed

Observe general Gosu naming conventions

                     Check box.

Omit type specifications with variable initialization

                     Check box.

Add a suffix to functions and classes to avoid name conflicts

                     Check box.

Declare functions Private unless absolutely necessary

                     Check box.

Use public properties instead of public variables

                     Check box.

Do not declare static scope for mutable variables

                     Check box.

Use extensions to add functions to entities

                     Check box.

Match capitalization of types, keywords, and symbols

                     Check box.

Commenting best practice

Best Practice to Follow

Best Practice Followed

Comment placement

                     Check box.

Block comments

                     Check box.

Javadoc comments

                     Check box.

Single-line comments

                     Check box.

Trailing comments

                     Check box.

Using comment delimiters to disable code

                     Check box.

Coding best practices

Best Practice to Follow

Best Practice Followed

Use whitespace effectively

                     Check box.

Use parentheses effectively

                     Check box.

Use curly braces effectively

                     Check box.

Program defensively against conditions that can fail

                     Check box.

Omit semicolons as statement delimiters

                     Check box.

Observe null safety with equality operators

                     Check box.

Use typeis expressions for automatic downcasting

                     Check box.

Observe loop control best practices

                     Check box.

Return from functions as early as possible

                     Check box.

Performance best practices

Best Practice to Follow

Best Practice Followed

Use the fastest technique for string concatenation

                     Check box.

Consider the order of terms in compound expressions

                     Check box.

Avoid repeated method calls within an algorithm

                     Check box.

Remove constant variables and expressions from loops

                     Check box.

Avoid doubly nested loop constructs

                     Check box.

Pull up multiple performance intensive method calls

                     Check box.

Be wary of dot notation with object access paths

                     Check box.

Avoid code that incidentally queries the database

                     Check box.

Use comparison methods to filter queries

                     Check box.

Use comparison methods instead of the Where method

                     Check box.

Use Count properties on query builder results and find queries

                     Check box.

Use activity pattern codes instead of public IDs in comparisons

                     Check box.

Create single plugin instance

                     Check box.