EmpowerApps.Show
Managing Code Quality with Anne Cahalan
Guest
Related Episodes
- Episode 36: Upgrading Your Skills in 2020 with Paul Hudson
 - Episode 34: Server-Side Swift with Tim Condon
 - Episode 24: Continuous Integration with Kyle Newsome
 - Episode 14: iOS App Architecture with René Cacheaux and Josh Berlin
 
Related Links
Sponsors
BrightDigit- Specialize in helping businesses build apps for iPhone, iPad, Mac and Apple Watch
 - 10 years of experience developing for a variety of Apple platform
 - Helping dev shops which lack experience with Apple platforms and Swift
 
We have an opening for sponsors
- Do you have a product or service which can target our ever growing community of developers as well as technology and business leaders?
 
What is Code Quality
- Making Code that's easy to maintain
 - Low Cyclomatic Complexity
 - Making your code easily testable
 - Your code should read like sentences
 - Avoid fancy short code for more wordy code
 - Messy code is easier to fix then over-engineered code
 - While the integration may be complex, keep your code separated into simple parts
 
Why is Code Quality Important
- Saving Time = Saving Money
 - Easy to Maintain and Easy to Update
 - Shorter Onramp for New Developers
 - Code Rots over Time (Delegation Patters vs Subscriber/Publisher Model)
 - Addresses Tech Debt
 
When should you upgrade your code
- When it makes sense
 - Use Interoperability (bridge headers, HostingControllers, ViewRepresentable, etc...) to slowly bridge the gap
 - Be careful leaving too much old code behind
 
Good Swift Code Quality
- Use argument labels and parameter name correctly
 - Avoid ternary operators
 - Avoid switch statements with too much logic and cases
 - Use Generics judiciously
 - Extensions are great for separating Protocol implementation
 
Good Code Reviews and Pull Requests
- Clear your mind
 - Use pull requests and templates
 - Add context and details to the pull requests
 - Use screen shots to show what the result is
 - Communicate clearly what is going on
 - Let them know what to look at and what is a work-in-progress
 
What Can Managers Do
- Set a great example
 - Provide enough time to the team for quality code
 - Have some background and experience with quality code
 - Be attentive and open to what your developers say
 - Allow time for unit testing
 
Code Quality Tools
- SwiftLint and SwiftFormat
 - Codecov - for code coverage
 - CodeFactor and CodeClimate - for code quality
 - Having a human look at code is always best
 - Be thoughtful and considerate for each decision
 - Leo's Swift Package Automated CI Template - WIP
 
Social Media
Emailleo@brightdigit.com
BrightDigit - @brightdigit
Leo - @leogdion
BrightDigit
Leo
Instagram - @brightdigit
Patreon - empowerappshow
Credits
Music from https://filmmusic.io"Blippy Trance" by Kevin MacLeod (https://incompetech.com)
License: CC BY (http://creativecommons.org/licenses/by/4.0/)
EmpowerApps.Show