Appendix C - Best Practices
Errata
Table of Contents
Best Practices - 943
- General Programming - 943
- Use Meaningful Variable Names - 944
- Variable Naming Exceptions - 945
- Use Constants Instead of ‘Magic Numbers’ - 945
- Reorganize for Easier Maintenance - 946
- Rework Repetitive Code - 946
- Break Apart Long Functions - 947
- Use Consistent Programming Style - 947
- Lua Tips - 948
- Use Local Variables - 948
- Minimize Garbage - 949
- How to Reduce Garbage - 949
- Reuse Objects - 954
- Recycle Tables - 955
- Other Fine-tuning Optimizations - 956
- Check Expected Conditions First - 956
- Exploit Shortcut Evaluation - 957
- Use Tables as a Logic Structure - 957
- The WoW Environment - 959
- Use What You’re Given - 959
- Localize with Global Strings - 959
- Avoid Deprecated Systems - 960
- Global Widget Handler Arguments - 960
- SecureStateDriverTemplate - 961
- bag and slot Attributes on item Type Action Buttons - 961