Very often the importance of the code quality is underestimated especially by business people who usually don’t see the business value of it. In this session we will try to discover all the advantages of well written code and discuss how coding standards, code reviews and static code analyzer can help to maintain the level of quality and bring the business value.
2. #CD22
● Born in Uzbekistan, live in Prague
● Graduated from Computer Physics
● Working with Salesforce since 2016
● 4,5 years in consultancy
● 4x Salesforce certified
● Passionate about code quality
Nikita Belov
Salesforce Technical Lead
3. #CD22
● What is code quality?
○ Low quality origin
○ Low quality issues
● Why it is important?
● How to improve it?
○ Coding standards
○ Code review
○ Static code analyzer
● What is business value?
● Q&A
Agenda
4. #CD22
● Good code or bad code?
○ no unified definition
● Good code
○ Simple
○ Readable
○ Performant
○ Secure
○ Reliable
○ Well tested
○ Bug-free
○ Scalable
○ Documented
What is code quality?
20. #CD22
● Hidden bugs and security vulnerabilities
● Lack of good tests
● Unstable code base for new features
● Salesforce governor limits exceeding
● Data issues
● Unreadable and confusing code
● Higher maintenance efforts
● Longer delivery time of new features
● Demotivated developers
● Performance impacts
Why it is important?
21. #CD22
A set of rules, techniques, and best practices to
create cleaner, more readable, more efficient
code with minimal errors.
Benefits
● Uniform format
● Easier to detect errors
● Reusable code
● Easier to maintain
● Developer efficiency
How to improve it? – Coding standards
22. #CD22
How to improve it? – Code review
A quality assurance activity where someone
other than the author of a code reviews that code
Benefits
● Quality of code
● Finding bugs and security vulnerabilities
● Knowledge sharing
● Collective ownership
24. #CD22
● Scans your code to detect common bad practices, catch bugs, find
vulnerabilities and make sure development adheres to coding
standards.
● Analyzers for Salesforce
○ PMD
○ SonarQube
○ CodeScan
○ Veracode
○ Salesforce Code Analyzer
● IDE plugins or part of CI/CD pipelines
How to improve it? – Static code analyzer
25. #CD22
What is business value?
● Stable and secured code base
● Less maintenance efforts
● Faster delivery of new features
● Optimized performance
● Easier migrations or upgrades
● Less time for developer on-
boarding
● Highly motivated development
team
26. #CD22
What is business value?
● Stable and secured code base
● Less maintenance efforts
● Faster delivery of new features
● Optimized performance
● Easier migrations or upgrades
● Less time for developer on-
boarding
● Highly motivated development
team
Does it still bring no business value?
28. #CD22
● How many Salesforce developers does it take to change a light bulb?
Bonus
29. #CD22
● How many Salesforce developers does it take to change a light bulb?
● As many as you want! It doesn’t count against Salesforce governor
limits.
Bonus
32. #CD22
● Very often the importance of the code quality is underestimated
especially by business people who usually don’t see the business
value of it. In this session we will try to discover all the advantages of
well written code and discuss how coding standards, code reviews and
static code analyzer can help to maintain the level of quality and bring
the business value.
Abstract