Coding Best Practices
- learn@rightKlicks
- May 4, 2022
- 1 min read
Code should be easy to read and understand, whenever possible. Follow any formatting standards. Think about how others may use it in the future.

Comment Your Code
Use White Space
Write Simple Statements
Create Small, Modular Components
Construct Reusable Functions
Use Descriptive Variable and Function Names
Use Variables to Store Function Results
Verify Values Exist Before Using Them
Return Values
Avoid Dynamic JEXL Expressions in an Evaluate
Avoid the eval Function
Database: Avoid Complex GlideRecord Queries
Database: Use GlideAggregate for Simple Record Counting
Database: Avoid Complex Queries on Large Data Sets
Database: Let the Database Do the Work
Comments