Loading…
This event has ended. View the official site or create your own event → Check it out
This event has ended. Create your own
Registration is open every day from 7:30 a.m. until the close of the day’s sessions.
Breakfast will be served starting at 6:30 a.m. for conference registrants in the Columbine Restaurant.
30-minute refreshment breaks are at 10:00 a.m. and 2:30 p.m. daily.
Lunch is 12:00-1:00 p.m. daily in the Columbine Restaurant.
View analytic
Wednesday, May 3 • 10:30am - 11:00am
Refactoring with Cognitive Complexity: The New Option for Measuring Understandability

Sign up or log in to save this to your schedule and see who's attending!

For 40 years, cyclomatic complexity has been the de facto standard for measuring testability and maintainability. While it's absolutely accurate for testability, the same can't be said for maintainability. Cognitive complexity solves the problem and returns "fair" relative measurements of control flow complexity. In this session, you'll learn what the cognitive complexity methodology is and why you should add it to your metric suite. You’ll see how it applies to a number of code samples from open-source projects on SonarQube.com. And you’ll learn how to use a method's cognitive complexity score as a guide to designing better code and refactoring existing code to be simpler and more maintainable. Because there's no "cost of entry," high class-level cognitive complexity is a reliable indicator that a class contains a lot of logic, not just a lot of methods. That is, you can use cognitive complexity to sift domain classes from the logic-intense classes that impose a higher maintenance burden. Cognitive complexity is already available as a new rule in some Sonar code analyzers and should be available throughout the SonarQube ecosystem by the end of 2017.

See the slides.


Speakers
avatar for G. Ann Campbell

G. Ann Campbell

Product Manager, SonarSource SA
G. Ann Campbell is a Product Manager at SonarSource SA, the company behind SonarQube, SonarLint, the Sonar Language Analyzers, and SonarQube.com. She has coded in Perl, C, and Java as well as the usual assortment of web development technologies. In the process, Ann has seen some... Read More →


Wednesday May 3, 2017 10:30am - 11:00am
Conference Room D

Attendees (18)