DEV Community

EmpowerApps.Show

Managing Code Quality with Anne Cahalan

Guest

Related Episodes

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
Contact me if you need help today.
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? 
Contact me today if you are interested in sponsoring or go to our Patreon page.

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

Social Media

Email
leo@brightdigit.com

Twitter
BrightDigit - @brightdigit

Leo - @leogdion

LinkedIn
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/)

★ Support this podcast on Patreon ★

Episode source