San Diego C++ Meetup #81 – December 2025 Edition

Hello everyone!

Our final meeting of 2025, San Diego C++ Meetup #81, took place on Tuesday, December 9th. It was a fantastic session to wrap up the year, featuring a deep dive into the intersection of Modern C++, AI tooling, and functional programming interpreter design.

For those who couldn’t make it, the full recording is available on our YouTube channel:

A massive thank you to our sponsor, JetBrains, for their continued support of the San Diego C++ Meetup group. They just dropped a new release with some impressive features (including a constexpr debugger!), so be sure to check it out. We also have a special coupon code from Packt for the book Software Architecture with C++ – feel free to reach out if you missed it during the session.

The Talks

We were joined by Alfonso, who walked us through two of his comprehensive personal projects that bridge the gap between academic theory and practical systems programming.

1. Beyond the Paper: A Modular Workbench for Neural Code Analysis

The first talk introduced BERT Builder, a “batteries-included” pipeline designed to transform the theoretical work of Transformer architectures into a tangible workbench.

Implementing research papers is often messy, involving hardcoded paths and fragile scripts. Alfonso demonstrated a complete tooling ecosystem that allows users to own every step of the process.

Key Highlights:

  • End-to-End Pipeline: The system covers everything from automated Corpus Engineering (fetching and sanitizing GitHub repos) to tokenization, pre-training, and evaluation.
  • Modular Architecture: Designed for “plug-and-play” experimentation. You can swap out tokenizer strategies (Char, KeyChar, SentencePiece) or masking objectives (MLM, WWM) easily.
  • Scientific Rigor: Alfonso emphasized the importance of Specification-Driven Development (using “Speckit”) to ensure the tool meets rigorous academic standards while remaining hackable for the community.
  • AI-Assisted Development: Interesting insights were shared on using Gemini 2.5 to aid in generating the specs and code, including the challenges of enforcing Test-First Development with AI agents.

2. Building Expresso: A Purely Functional, Immutable REPL

The second part of the night explored Expresso, a lightweight, interactive REPL for evaluating expressions.

Unlike traditional interpreters that rely on mutable state, Expresso is built on a strict philosophy of immutability. Every user input is treated as a pure expression that evaluates to a new value without side effects.

Technical Details:

  • Hybrid Architecture: The core runtime and CLI are built with ANSI C17, while the robust lexing and parsing are handled by C++17 and ANTLR.
  • No-Assignment Constraint: The language enforces functional purity by disallowing variable assignment, a design choice that simplifies the mental model and prevents side effects.
  • Robust Testing: The project used detailed feature specifications to guide a Test-First Development process, ensuring edge cases like numeric overflow and operator precedence were verified before implementation.

It was a great evening of learning, from neural networks to compiler theory.

Thank you to everyone who attended and participated in the discussions. I wish you all a happy holiday season and a Happy New Year! See you in 2026!

Kobi

C#-style property in C++

C# has a nice feature called class/struct property. It is a public data member but with the ability to control read/write access, underlying storage or to compute the value on the fly. You can think of it as a glorified getter/setter mechanism: a syntax sugar around get/set methods.

My idea to implement something like this in C++ started few years ago with a code review: a bunch of classes had public data members and no control over who and how they were accessed or modified. I thought to myself: there must be a better way to code it that would appear like public data but, under the hood, gave the author complete control over the variable.

My initial set of requirements was as follows:

  • Access and modification syntax must be indistinguishable from a regular member variable.
  • Access and modification seamlessly routed through user defined get/set methods.
  • The following condition is true: sizeof(T) == sizeof(property<T>).
  • Ability to subscribe to modification events.
  • Ability to bypass the custom get/set methods by explicit syntax only (explicit function call or type cast to the underlying type).
  • Works with primitive and complex types: classes with their own methods defined.
  • Works with arithmetic and bitwise operators.
  • Works with STL containers and smart pointers.

I don’t want to go over the implementation line by line, it’s almost 700 lines of code and growing. But it is useable enough that I feel comfortable sharing it. Here are the language mechanisms I used to make it work:

  • property<T> is a class template that uses policy-based design to specify the get/set control mechanism.
  • The property’s policy class allows for full control over the underlying storage: T can be a member variable or anything else capable of storing values: a file, Windows registry, web resource, etc. Currently member variable and file storage are provided but I’m happy to accept other implementations if you feel like contributing!
  • property<T> relies on concepts heavily to enable or disable member methods and operators.
  • Helper methods are provided such as make_property, strip (gain unrestricted access to the underlying type), and as_volatile.
  • Few template type deduction guides are provided such that creating a property<const char*> results in a property<std::string> and more.
  • Macros help define a whole bunch of member operators as well as standalone unary and binary ones.

P.S. Today’s blog post brought to you by my friend’s one and only NoSpam Android App! Tired of unwanted calls blowing up your phone day and night?! Tired of picking up numbers you don’t recognize and hearing nothing but static?! Don’t wait! Install today and start sending spammers and scammers to /dev/null

Complete source code:
property.hpp | property.cpp



San Diego C++ Meetup #80 โ€“ November 2025 Edition – 2025-11-18

Hello all!

Our latest San Diego C++ Meetup took place on Tuesday, November 18th, 2025. This was the 80th meeting of our group!

It was a slightly shorter session than usual as I’ve been quite busy, but we managed to pack in some great discussions on Agentic AI, review some fascinating C++ news/blogs, and solve a tricky quiz.

A huge thank you to JetBrains for their continued sponsorship of our meetup group! Their support allows us to keep this community going.

Thank you Packt for providing coupons for the upcoming seminar by Patrice!

The meeting event page can be found here.

The Main Topic: Agentic AI and C++

I spent some time sharing my personal experience over the last nine months working with Agentic AI (specifically using tools like Cursor and Cloud Code).

We discussed how this is changing the way we write, document, and interact with code. My experience has been overwhelmingly positiveโ€”bordering on “science fiction” at times. We talked about the shift in workflow: writing less code manually but spending more time “planning” with the model and verifying the output.

Key takeaways discussed:

  • Planning is crucial: Spending time brainstorming and writing a “spec” (often in Markdown) with the AI before generating code leads to much better results.
  • Verification: You end up reading more code than you write. It is essential to understand what the AI generated to avoid technical debt.
  • Skillset Shift: Learning to interact with these models is a skill developers should start building now.

Links & Discussion Points

We reviewed several interesting articles and resources during the session:

  • Undo Agentic Debugging: We looked at a poster from CppCon regarding “Agentic Debugging”โ€”using AI to explain backtraces or reverse-debugged states in plain English.
  • Free Functions Performance: An interesting analysis on whether free functions are faster than member functions. The conclusion? Generally, no difference, unless the this pointer push overhead is significant in very tight loops.
  • C++20 Concepts & Forward Declaration: A fascinating edge case blog post by Andreas Fertig. It explores how a forward-declared type interacts with Concepts and auto vs void return types.
  • Conan & Sanitizers: We discussed how to properly integrate sanitizers into your Conan 2.0 profiles.
  • C++26 Reflection: We touched on the massive potential of C++26 Reflection.
  • GenAI Skepticism/Pragmatism: Two posts by Kevlin Henney on the importance of thinking for yourself when using LLMs.

C++ Quiz

We tackled CppQuiz Question #400.

  • Topic discussed: Threads, std::jthread, and sequencing.
  • The Question: Does the increment of a non-atomic variable across threads cause a race condition or undefined behavior in this specific snippet?
  • The Answer: It outputs 2.
  • Why? The standard guarantees specific “happens-before” relationships between thread construction, lambda execution, and join(), ensuring a well-defined sequence of operations even without explicit atomics in this specific case.

Recording

For the full discussion, check out the recording on YouTube:

If you are in the San Diego area, feel free to reach out on Discord! I still have a few printed books to give away.

Thank you!

Kobi

tags: [C++, Meetup, San Diego, AI, Reflection, Conan]

San Diego C++ Meetup: Meeting #79 โ€“ October 2025 Edition – Hosting Hubert Liberacki!

Hello all!

This time, our 79th meeting Oct 22 2025, we were hosting Hubert Liberacki who gave a fantastic presentation on “Cracking Open the Black Box: Legally Testing the Privates in C++”.

A huge thank you to everyone who attended and participated in the discussion!

For those who couldn’t make it or would like to review the talk, the full recording is available on YouTube:

About the presentation: Cracking Open the Black Box: Legally Testing the Privates in C++

Introduction: Encapsulation is a cornerstone of C++, yet private members often pose challenges in real projects. When refactoring legacy code, working with third party libraries, or debugging complex systems, gaining access to internals can be necessary to establish tests and enable a test driven workflow. In these situations, developers inevitably face the question of how to “test the privates” without breaking the rules.

Relevance: This is not an edge case but a recurring scenario in production code. Developers frequently reach for shortcuts such as #define private public or memory layout tricks. Those shortcuts are mostly undefined behavior leading to portability problems, or even changes in object layout across compilers. There are well known examples in widely used projects where such hacks have caused failures. This talk brings these issues into focus with real world references and demonstrates safer alternatives.

What did Hubert cover in this session:

  1. Why developers sometimes need access to private members (legacy code, third party libraries, debugging, instrumentation, and refactoring with TDD).
  2. Common techniques to achieve the access.
  3. Showcase (live) the dangerous side-effects: macro leakage, ABI mismatches, portability failures.
  4. Discovering the standard loophole.
  5. Live coding: step by step demonstration of this technique in practice, with explanations of how it works under the hood.
  6. Q&A and open discussion with attendees.

Completion state: Implementation is ready as github library – cpp-member-accessor

Support materials:

  1. https://github.com/nlohmann/json/issues/913 – โ€œerror due to #define private publicโ€
  2. https://godbolt.org/z/Pjs1Y4cdv – โ€œmacro leak, size differenceโ€
  3. https://pvs-studio.com/en/blog/posts/0146/ – โ€œYour code can breakโ€
  4. https://eel.is/c++draft/macro.names#2 – โ€œItโ€™s UBโ€

and one more: https://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.html?m=1

About the presenter: Hubert Liberacki

Hubert Liberacki is a Lead Software Engineer with over a decade of experience in C++ development across automotive and robotics, focusing on performance-critical and distributed systems.

At Apex.AI he worked on automotive-grade software-defined vehicle frameworks, and he is currently working at HERE Technologies on maps and rendering in large-scale C++ projects. His current interests also include Rust and its applications in high-performance and distributed systems.

A special thanks to our sponsors:

  • JetBrains for their generous and continued sponsorship of the San Diego C++ Meetup group.
  • Packt for providing exclusive discount codes to our attendees for their vast library of C++ books and resources.

San Diego C++ Meetup: Meeting #78 โ€“ September 2025 Edition

Hello all!

Our latest San Diego C++ Meetup took place on Tuesday, September 24th, 2025. It was another great virtual session where we dove deep into some of the lesser-known features and types in Modern C++. A massive thank you to everyone who joined, participated in the quizzes, and contributed to the discussion!

For those who couldn’t make it or wish to review the topics, the full recording is available on YouTube:

  • Meeting Event Page: here

YouTube Recording:

Meeting Summary

The evening kicked off with a fun C++ quiz to warm up the brain(#360), followed by the main presentation which I titled: “C++ Esoterica: A Tour of Special Keywords & Features.”

Here is a brief overview of the C++ features we explored:

C++ Esoterica: A Tour of Special Keywords & Features

This talk was an exploration of lesser-used types, attributes, and language features that can significantly improve code safety, clarity, and expressiveness. We covered the following topics:

  • std::extent [00:11:00]: A type trait used to get the number of elements in a specific dimension of a C-style array at compile time, particularly useful in template metaprogramming.
  • std::valarray [00:13:00]: We looked at this container designed specifically for high-performance numerical computing and element-wise mathematical operations, noting its niche role compared to std::vector.
  • The Spaceship Operator ( <=>) [00:15:00]: A discussion on how this C++20 feature simplifies object comparison by generating all relational operators from a single definition.
  • std::monostate [00:17:00]: We explored this empty type from the <variant> header, primarily used to represent the “empty” or default state in a std::variant, and even showed an advanced pattern for creating custom RAII resource handles using std::monostate within a std::variant to manage a std::unique_ptr with a custom deleter.
  • std::nullptr_t [00:26:00]: A reminder that this is the distinct type of the nullptr literal, which prevents the pre-C++11 ambiguity that could occur when passing NULL (often defined as ) to overloaded functions.
  • std::intptr_t / std::uintptr_t [00:28:00]: We discussed these types for low-level pointer arithmetic and manipulation, emphasizing the use of the unsigned std::uintptr_t for memory addresses due to its defined wrap-around behavior.
  • std::ignore [00:30:00]: The placeholder object used with std::tie to discard unwanted elements when unpacking a tuple or pair.
  • std::enable_shared_from_this [00:32:00]: A crucial pattern for safely obtaining a std::shared_ptr to the current object from within its own member functions, thus preventing double deletion.
  • Ranges Placeholders ( std::ranges::dangling, std::ranges::empty_view) [00:34:00]: We looked at these C++20 range components that promote safer code by preventing the use of iterators into temporary ranges ( dangling) and providing a clean, standard way to return an empty sequence ( empty_view).
  • std::identity [00:38:00]: This simple C++20 function object returns its argument unchanged, making it an excellent default “projection” for generic algorithms.
  • [[fallthrough]] [00:42:00]: The C++17 attribute used inside a switch statement to explicitly declare an intentional fallthrough, suppressing compiler warnings and clarifying intent.
  • Experimental Features [00:44:00]: We briefly touched upon std::experimental::scoped_exit as a generalized RAII mechanism and std::experimental::propagate_const for addressing const-correctness loopholes with raw pointers inside class members.
  • std::bit_cast [00:48:00]: The modern, safe C++20 way to perform type punning, reinterpreting the bit pattern of an object while avoiding the undefined behavior associated with reinterpret_cast and strict aliasing rules.
  • Iterator Utilities ( std::next, std::prev, std::advance) [00:50:00]: A review of these iterator helpers, distinguishing between the “peekers” ( next/ prev) that return a new iterator, and the “mover” ( advance) that modifies the original iterator in place.

A special thanks to our sponsors:

  • JetBrains for their generous and continued sponsorship of the San Diego C++ Meetup group.
  • Packt for providing exclusive discount codes to our attendees for their vast library of C++ books and resources.

Thank You for reading!

Kobi.

San Diego C++ Meetup: Meeting #77 โ€“ August 2025 Edition

Hello all!

Our latest San Diego C++ Meetup took place on Tuesday, August 19th, 2025. It was another great session with engaging discussions on modern C++ features, standard library improvements, and a fascinating look into the world of AI-assisted development.

A huge thank you to JetBrains for their continued sponsorship of our meetup group. Their support is invaluable.

We’d also like to thank our partner, Packt, for providing our members with exclusive discounts on their extensive library of C++ books and courses.

For those who couldn’t make it or wish to review the topics, the full recording is available on YouTube:

Meeting Summary

We covered a lot of ground during this meeting. Hereโ€™s a brief overview of what we discussed:

First, we warmed up with a couple of C++ quizzes:

  • Quiz #153: We explored the intricacies of assigning a string literal to a non-const char*, a remnant from pre-C++11 days.
  • Quiz #342: This quiz sparked a discussion on the fundamental rule that references must always be initialized.

Next, we dove into the nuances of the constexpr and static keywords across different scopes: namespace/global, function, and class/struct. We referenced some excellent benchmarks from Jason Turner’s C++ Weekly series to guide our conversation and converged on the best practices for using these keywords for performance and clarity.

Following that, we explored a practical example of metaprogramming by building a simple compile-time TypeList using recursive structs. We also demonstrated how C++20 concepts can significantly clean up and constrain such constructs. This segment was inspired by a recent LinkedIn post from Hakan Gedek.

We then highlighted a significant safety improvement in libc++, which now produces a compile-time error when std::prev is used with an iterator category that doesn’t support it (like a forward iterator). This is a fantastic change that helps developers avoid stepping into Undefined Behavior.

Finally, the highlight of the evening was a live demonstration of using CLion’s AI assistance to build a complete, working “Game of Life” from scratch. I walked the group through the process I’ve been refining over the past six months, which has completely transformed how I build software. The key steps included:

  1. Planning & Brainstorming: Engaging with the AI in a “planning phase,” where I described the goal and let the model ask clarifying questions to build a robust design.
  2. Iterating on the Plan: Collaborating with the AI to refine the architecture, data structures, and logic, resulting in a detailed plan.md file.
  3. Implementation: Starting a new, clean session and feeding the plan.md to the AI to generate the full C++ implementation, complete with unit tests.

The result was a fully functional application, built in a single session, showcasing the incredible power of using AI as a development partner. This agentic approach, where the developer guides the high-level design and the AI handles the detailed implementation, is a paradigm shift in software creation.

Thanks to everyone who attended and participated in the great discussions. I look forward to seeing you at our next meeting!

Kobi

San Diego C++ meeting #76 – July 2025 edition

Hello everyone,

Last week we met for another San Diego C++ meetup session. I was super busy with tons of other obligations, so this blog post summary of the meetup session comes a bit late.

The meeting took place on July 15 2025, 5PM Pacific. Virtual meeting.

Meeting page can be found here.

Recording can be found here:

Agenda and items discussed:

  • I mentioned this website: https://cppdoctor.com/ that also published an ebook on C++ lambdas. Check it out!
  • We discussed C++ quiz #338 – “constexpr if” with branches that returns different types. Difficulty is marked as hard!
  • I mentioned https://mementum.github.io/cpp17-iterating-problems/ and showed few snippet of code from the blog. Check it out – This is published by “Daniel Rodriguez” and worth browsing!
  • We discussed C++26 compile-time reflection and discussed “Daniel’s L“. blog post Discover C++26โ€™s compile-time reflection โ€“ Daniel Lemire’s blog – If you did not read it yet, I highly recommend doing so. It’s easy enough to read and realize the potential of C++26 reflection proposal. I’m looking forward to see what kind of utilities, and applications people would come up using this language feature! go std::meta!
  • We discussed “Enum-discriminated unions with nlohmann::json” by “Jakub Neruda“. Check this blog post here. It shows Deserialization of JSON using nlohmann::adl_serializer<> specialization. Nice trick that I personally was not aware of.
  • And last discussion was about padding. Inspired by this X/tweet. Here is a small peek at the padding structure that we showed during the meeting:

Couple thank you:

  • Thank you Packtpub for your generous coupons offers to the meetup attendees.
  • Thank you JetBrains for sponsoring the meetup! JetBrains has generously sponsoring the yearly Meetup fees!

Thank you!

Kobi

C++ Meetup Meeting #75 – hosting Mike Shah – Understanding large and unfamiliar codebases

Hello everyone!

On Tuesday, June 10th 2025, we were honored to host Mike Shah

The topic was “Understanding large and unfamiliar codebases“. A very interesting talk discussing and demonstrating multiple tools and techniques when working with large, unfamiliar code.

The meeting page can be found here

The recording can be found here:

Abstract of the talk: It’s your first day on the job as a new employee. You set up your workstation and then download a repository of over 1,000,000 lines of code. Even more intimidating, the code has been around for 20 years and has parts of it in legacy C++ and also using tentative C++ 26 features from various libraries. You feel overwhelmed! Don’t fret however! In this talk, I provide you a collection of tools to help software engineers of all levels understand what is going on in large unfamiliar codebases. The audience will leave this talk with a few simple and advanced tricks for navigating large and complicated codebases.

Bio: Mike Shah is currently a teaching faculty at Yale University with primary teaching interests in computer systems, computer graphics, and game engines. Mike’s research interests are related to performance engineering (dynamic analysis), software visualization, and computer graphics. Along with teaching and research work, Mike juggles occasional consulting work as a 3D Senior Graphics Engineer in C++ and producing programming content at his YouTube channel https://www.youtube.com/@MikeShah

Highlight of the discussion points:

  • How to approach a new code base, the challenges.
  • Conway’s low
  • Using debugger, reverse debugging like Undo, RR.
  • Tools like valgrind, callgrind, cloc and more …
  • Demonstrating the techniques using OpenTTD, approaching open source code and getting familiar with the codebase.

Check out the recording for more details!

Thank you JetBrains for sponsoring the group!

Thanks for reading and watching the recording!

Kobi

C++ Meetup Meeting #74 – Uninitialized is cool!

Hello Everyone!

Took me some time to write this post since I was on travel for few days.

We met on Tuesday May 13 2025 and discuss std::uninitialized_xyz() function family.

The Agenda:

  • Quiz
  • Uninitialized is actually good!
  • Constructing Objects Separately: Understanding `std::uninitialized_*
  • Efficiently Managing Object Lifetime in C++

Meetup page for the event is here.

Thank you CLion JetBrains for sponsoring San Diego C++ Community! Very much appreciated!

Details

  1. Quiz – we went over cppquiz #298 and #334. #298 highlighted the implicit noexcept of destructors, while #334 was about UB when you have a function that should return a value but it does not.
  2. CLion is free for non-commercial usage! no more need for my 100% free coupons ๐Ÿ™‚
  3. I still have few hardcover books to give away, ping me if you want it.
  4. The main talk was discussing:
    • C++ Allocation vs Construction
    • How to work with Uninitialized memory? Can it boost performance in some cases?
    • Standard algorithms need constructed, existing objects (that have their lifetime started)
    • For example – the usage of std::copy() vs std::uninitialized_copy()
    • The motivation – avoiding wasted work!
    • Many code examples, mentioning all kinds of std::uninitialized_xyz() functions.
    • std::destroy(), std::destroy_at(), std::destroy_n()
    • Exception safety gurantee!
    • Using std::ranges::uninitialized_xyz()

The great book from Patrice is a great resource! read it!

Thank you for reading!

Kobi

San Diego C++ Meetup #73 – RAII – How hard could it be?

Hello everyone!

Here is the summary of the last session, took place on Tuesday, April 15 2025.

The session had few topics discussed.

First, I’d like to announce that we have a new Sponsor to our meetup!

Jetbrains has generously agreed to sponsor the yearly Meetup fees!

It is super fun to have your favorite editor being the one sponsor it. Such a win win for me ๐Ÿ™‚

Thank you Maria and the team from Jetbrains helping me on that!

Meetup page can be found here

The recording can be found here:

Discussion points in the meetup:

  1. What am I snacking – I talked a bit on Patrice Roy‘s new book “C++ Memory Management” which is an excellent book! Grab it!
  2. AI Assistant and vibe coding. Gave some insights from my experience working on multiple tools, evaluating multiple plugins to IDEs. And it’s fantastic. I’m so scared! The future is here and things IMO will only get better. Senior engineers will have super powers, Junior engineers would need to make sense of what is given to them and I’m afraid that w/o enough experience, this is a challenging part.
  3. Quiz How much impact RTTI (class types w/ or w/o virtual functions) has on typeid?
  4. RAII. Here is what we covered:
    • Simple RAII class
      • I realized after the meeting that I missed having =delete for the copy ctor so we do not mess up copying the handle and risking in double cleanup of the same handle.
      • Better to = delete your copy/op= so you are on the safe side.
    • Using simple SFINAE
    • Using simple concepts
    • Using static_assert
    • Why different instantiation of the RAII class fails.
      • Function pointers
      • References to functions
      • add_pointer_t
      • decltype(auto), return (x), decltype((x))
      • What did Scott Meyers had to say in his last book (Effective Modern C++: C++11/14)
      • Using https://cppinsights.io/ to decipher templates.
    • Using unique_ptr<> with custom deleter.
    • Using gsl::finally
    • Capture-less lambdas in un-evaluated context.

Patrice Roy’s book:

Thank you for reading!
Kobi

San Diego C++ Meetup #72 – Refactoring with C++

Hello everyone!

Tuesday March 18 2025 evening was all about Refactoring with C++ by Dmitry Danilov.

But before we dive to the summary – we’ll mention that there was a Job posting presented by Parker Lanning – Looking for Mid Sr. C++ Developer Role – contract role. Please feel free to contact Parker.

We also mentioned the following:

You can find the recording here:

Link to the meetup page.

I’ll start by saying that I really like Refactoring business, and especially in C++. A clear evidence that there is indeed something wrong with me. (Un?)Fortunately, Refactoring is part of our life. Code evolves, rotten and not maintained correctly. There is some joy in taking such code and making it better, more readable, modern, more maintainable and sometimes even faster!

The book is good. It has a lot of good information in Design choices, reasons for tech debt, how to avoid it, SOLID and more! Grab the book!

So what did we discuss?

  • First, checkout the variety of books available on this subject.
  • Checkout Refactoring.Guru – great site! also has the Design Patterns aspect.
  • We discussed clean code, technical debts, why this is happening, what happens with personal taste? How about the gaps in ones knowledge of the language, the libraries, good practices?
  • People who don’t know about the tool, have questions and concerns. How would I know that std::accumulate is actually doing the right thing and not shooting a rocket to the moon (well, as part of the accumulate operation?)
  • What is a boring but effective API? How about consistent API, const-correct API?
  • What is SOLID? Why it’s so important and not just a buzzword or a Software marketing term. (It’s not just marketing term, it’s super important foundation!). Also think about KISS!
  • How about C++ Core Guidelines ? Yes, these are good and important to know!
  • We discussesed Strategy Pattern, Dependency Injection, Interface Segregation and of course, I mentioned the C++ Design pattern bible of the modern days: C++ Software Design: Design Principles and Patterns for High-Quality Software, by Klaus Iglberger
  • We closed with some low hanging fruits for refactoring Legacy code.

There is no universe where we can cover everything in < 1hr. So please take a look at the book and other useful resources. Do it for yourself, future self and your team.

Oh yes – AI might save us and write better, more idiomatic code for us. I want to believe this would happen soon (well you could argue that it is already happening).

Thanks for reading,

Kobi

Debunking C++ Myths: Dispelling Misconceptions and Embracing Modern C++

San Diego C++ Meetup, February 14th 2025. yes, Valentine day, because we love C++ ๐Ÿ™‚

Link to the meetup page here.

Recording uploaded to San Diego C++ Meetup (sdcppmu) YouTube channel:

Hello everyone!

February 2025 was dedicated to a new book from Packpub publication: “Debunking C++ Myths: Dispelling Misconceptions and Embracing Modern C++” by Alex Bolbaoca and Ferenc Deak.

Amazon link here.

During the meeting Alex and Ferenc shared their career stories, how they were introduced to C++, what other languages have influenced their work and answered various questions on the book., and their favorite chapters in the book.

Tune into the the recording to learn more about Alex, Ferenc and bunch of details from the book itself.

Enjoy the recording!

Kobi

San Diego C++ Meetup #70 – Decorator Pattern

Hello all,

I’m late on this report. I’ve been traveling a lot in the past week and did not have a chance to sit down and write this report.

The meeting info on meetup can be found here. Took place on Tuesday, January 14, 2025.

Recording is uploaded as usual to our sdcppmu Youtube channel:

Topics discussed during the meetup:

In this meeting, we’ve discussed the Decorator pattern.

This is heavily inspired by Klaus’ excellent book (which I consider is the bible of Modern C++ Design Patterns). The book can be found on Amazon/O’reilly as printed or soft copy. If you do not own a copy, run, don’t walk to grab one and read!

More things discussed… :

Packtpub publication announced 2 new C++ books which we mentioned (and had coupons to share):

Next, Rich Yonts, the author of a manning’s title 100 C++ Mistakes and How to Avoid Them, called for volunteers to participate in a study. Please contact Rich for more information (hopefully this is still applicable when you read this).

Quiz time – We looked at cppquiz-352 which demonstrates how typedef is not a … new type!

I went through the previous meetup content to clarify few things related to mapping runtime values to compile time, in order to be used as NTTP like in func<val>(). BTW – it’s really cool and you should probably check it out. Lots of fun!

The main talk was about “C++ Decorator Design Pattern”. This is an important and very useful Pattern. Few highlights:

  1. We looked at C++ decorator vs Python function decorator. Not related to each other, comparison was just for fun ๐Ÿ™‚
  2. Gang Of Four Decorator Pattern – Structural design pattern used to dynamically add behavior to objects.
  3. Supports OCP and SRP! this is a huge bonus!
  4. We looked at specific use case of adding Decorator.
  5. Decorators can be thought of compositions of features/behavior. Think f(g(h(x))).
  6. C++17 STL allocators also implement such mechanism!

And of course, we always need to highlight shortcoming of this pattern:

  1. Every level in the hierarchy is another level of indirection. Perfs might be impacted but MEASURE!
  2. You could make silly mistakes like applying decorator twice.

That’s it for reading!

Kobi