Having trouble reading this email? View it in your browser.
New This Week

C++ Brain Teasers »

Unravel challenging C++ mysteries, learn to avoid common pitfalls, and put better code into production by taking on 25 fun and mind-bending puzzles. As you work through each puzzle, you will peel off some of the layers of complexity of C++, getting a fundamental understanding of how the language works. This will help you write better code and recognize issues more easily while debugging.

Spring Literary Festival »

The Spring Literary Festival is now on, and that means the fantastic deals, free events, and community-building are, too. Use promo code codebar2024 for 40% off your purchases at pragprog.com through the 16th, and register for the free events taking place on the 11th and 13th at https://ti.to/codebar/an-evening-with-pragmatic-bookshelf-author-edition and https://ti.to/codebar/an-evening-with-pragmatic-bookshelf-2nd-author-edition. You'll be helping yourself and the whole programming community! (PLEASE NOTE: The Pragmatic Programmer: 20th Anniversary Edition is not eligible for discount, as we are not that book's publisher and have no control over its pricing.)

Recently Released:

 

Best Sellers:

Make sure you haven't missed anything!

  1. Server-Driven Web Apps with htmx
  2. From Ruby to Elixir
  3. Programming Phoenix LiveView
  4. Engineering Elixir Applications
  5. Advanced Hands-on Rust

See all best sellers...

C++ Brain Teasers
June 11, 2024

C++ Brain Teasers: Exercise Your Mind

Each puzzle in the book is a complete, seemingly simple C++ program, but can you figure out the output for each, or will the answers stump you? Most of the programs compile and have deterministic, though sometimes surprising, output. Some might, however, have undefined behavior, where anything can happen, including making demons fly out of your nose! Yet others might have unspecified behavior with output that is not completely deterministic; we just know nothing as bad as nasal demons will happen.

All puzzles are accompanied by detailed discussions, taking a look under the hood at what exactly is going on to help you understand more about C++'s unexpected behaviors, as well as fundamental concepts like initialization, overload resolution, and implicit conversions. For the non-deterministic cases, we’ll explore some typical behaviors one can expect to see in practice, what causes them, and why they shouldn’t be relied on.

After working through the book, you’ll have tools and techniques to help you write better and safer code, and a better understanding of the fundamentals of the language, the background for some of C++'s apparent weirdness, and a better feel for identifying bugs and unsafe code in your own programs.

Now in print: Use coupon code "AKBRAINCOMPLETE" for 40% off the ebook at pragprog.com/titles/akbrain. For the paperback edition, please support your local independent bookstore.

Want to Write Something? Share What You Know

From paperbacks and ebooks to online courses and beyond, if you want to create technical content, we may be your perfect partner.

Leverage our 20+ years of experience, our global distribution network, our massive fan base, our relationships with industry leaders, our editorial, production, and marketing prowess, and even our reputation for excellence. Sure, you could go it alone, but with some of the highest royalties in all of traditional publishing and your own personal team, why would you bother?

Shoot us an email at proposals@pragprog.com or visit pragprog.com/publish-with-us for more details today.

Let's publish something together!

Upcoming Author Appearances

  • 2024-06-11 Andy Atkinson, Posette Virtual Conference for PostgreSQL
  • 2024-06-18 Jon Reid, Remote workshop
  • 2024-06-18 Miki Tebeka, GopherCon EU at Berlin
  • 2024-06-20 Johanna Rothman, Focus Your Distributed Component Teams to Deliver Better Products Faster
  • 2024-06-25 Johanna Rothman, Product Management Today
  • 2024-06-27 R. Mark Volkmann, KCDC in Kansas City
  • 2024-07-03 Anders Schau Knatten, C++ on Sea
  • 2024-07-03 Frances Buontempo, CppOnSea/Folkestone
  • 2024-07-16 Kenneth Kousen, UberConf
  • Be the First

    Sign up for this newsletter at https://pragprog.com/newsletter/ and be the first to hear about our newest content, best promotions, and upcoming events.

    Want even more? Follow @pragprog on Twitter and The Pragmatic Programmers on LinkedIn for commentary, news, job openings, and even puzzles.

    And, if you want, you can see what Dave Thomas (@pragdave) is up to.

    By Professional Developers, for Professional Developers
    PragProg.com

    Sent by the Pragmatic Programmers, LLC. • PO Box 271356 • Flower Mound TX 75027