Writing C++ to Be Read

<p>Most developers spend more time reading code than writing code, and teams include developers with varying levels of C++ proficiency. This talk is a collection of advice on how to write simple code that states your intent clearly, so that both you and your coworkers can understand it and maintain it.</p> <p>I'll show how following the rule of zero and using aggregates can lead to code that is simpler, shorter and easier to get right, by leveraging the code the compiler writes for you. I will also illustrate how comments can be converted into code, so that they stay up to date and are read by both developers and compilers. For example, assumptions and invariants can be stated explicitly by using asserts liberally.</p> <p>Learn how to form a common understanding among your coworkers using vocabulary types like optional and recommendations from the C++ Core Guidelines. The focus will be on choosing appropriate parameter types in function signatures so that both the declaration and the call site unambiguously indicate whether the parameters are optional, whether they will be modified and who their owner is.</p> <p>Presenting these tips as part of an onboarding process should help everyone in your team contribute to a cohesive and maintainable codebase.</p>
Image

Vincent Zalzal

<p>Vincent Zalzal is a software developer with 15 years of experience in the computer vision industry. Vincent enjoys writing efficient, modern C++ to solve all kinds of math-oriented problems, especially those involving linear algebra, geometry or statistics. He likes the low-level aspects of optimizing memory access patterns as much as the high-level challenges of writing simple and maintainable code. He has an insatiable curiosity for learning about language features, programming idioms, good practices and random math facts.</p>

When

July 21-24, 2024

LinkedIn

CppNorth Group