Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

C++ Code Smells

NDC Conferences via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore code smells in C++ programming through this 56-minute conference talk by Jason Turner at NDC Conferences. Learn to identify and avoid common pitfalls in C++ development, including raw loops, multi-step functions, non-canonical operators, and improper use of const. Discover how to improve code quality by recognizing weak types, unnecessary casts, and missed compiler warnings. Gain insights into best practices for construction separate from assignment, proper use of constexpr, and alternatives to raw new and delete. Analyze code samples and participate in a bonus code review to reinforce your understanding of writing cleaner, more maintainable C++ code.

Syllabus

Jason Turner
C++ Best Practices
Construction Separate From Assignment - Ben Deane
Raw Loops
Multi-Step Functions Multi-step functions are hard to reason about, debug, and maintain
Non-Cannonical Operators
Code With Conversions
Casting Away const
static const
extern const
Raw new and delete
Code Smells
Let's Update This Code Sample #2
Do You const Value Parameters?
Do you const Temporary Values?
Do You const Value Return Types?
Missing and Ignored Compiler Warnings Special checks for many of these things
Missing const and constexpr, Misplaced const . Why isn't that value or member function
Weak Types And Casts Unfortunately the C++ standard Ubrary does not help us here
Bonus Code Review

Taught by

NDC Conferences

Reviews

Start your review of C++ Code Smells

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.