Best Practices for BML Scripting
Readable code is easier to debug, extend, and modify, thus increasing the productivity.
1. The Function Header should describe the entire script's salient properties.
2. Follow conventional indentation and bracketing practices (alignment).
3. The name and format of a BML local variable should immediately communicate its purpose, intended behavior, and usage.
Ex: totalListPrice is the sum of all line item list prices
4. There should never be more than one statement on one line that is, never more than one semicolon ending a statement).
5. Print statements should be extricated from convoluted code and separated into a debug-flag controlled if block, and if it doesn't cause the code to become less readable.