C++ Code Smells
Offered By: NDC Conferences via YouTube
Course Description
Overview
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
Related Courses
UNSW Computing 1 - The Art of ProgrammingOpenLearning C++ For C Programmers, Part A
University of California, Santa Cruz via Coursera Beginning Game Programming with C#
University of Colorado System via Coursera Introduction to Computing 计算概论A
Peking University via Coursera Comprendre les Microcontroleurs
École Polytechnique Fédérale de Lausanne via Coursera