Keynote GoingNative 2012 C++

We know how to write bad code: litter our programs with casts, macros, pointers, naked new and deletes, and complicated control structures. Alternatively (or additionally), we could obscure every design decision in a mess of deeply nested abstractions using the latest object-oriented programming and generic programming tricks. Then, for good measure, we might complicate our algorithms with interesting special cases. Such code is incomprehensible, unmaintainable, usually inefficient, and not uncommon. But how do we write good code? What principles, techniques, and idioms can we exploit to make it easier to produce quality code? In this presentation, I make an argument for type-rich interfaces, compact data structures, integrated resource management and error handling, and highly-structured algorithmic code. I illustrate my ideas and guidelines with a few idiomatic code examples. I use C++11 freely. Examples include auto, general constant expressions, uniform initialization, type aliases, type safe threading, and user-defined literals. C++11 features are only just starting to appear in production compilers, so some of my suggestions are conjecture. Developing a "modern style," however, is essential if we don't want to maintain newly-written 1970s and 1980s style code in 2020. This presentation reflects my thoughts on what "Modern C++" should mean in the 2010s: a language for programming based on light-weight abstraction with direct and efficient mapping to hardware, suitable for infrastructure code.

Related Talks

The Value of Values

Rich Hickey
32 minutes
In this keynote speech from JaxConf 2012, Rich Hickey, creator of Clojure and founder of Datomic gives an awesome analysis of the changing way we think about values (not the philosphoical kind) in light of the increasing complexity of information technology and the advent of Big Data. The broad subject ...

Scott Meyers – The Most Important Design Guideline

What’s the single most important design guideline for the creation of high-quality software? For Scott Meyers, it’s all about interface design. That includes user interfaces, of course, but also APIs, i.e., class interfaces, function interfaces, template interfaces, etc. The guideline is simple: make interfaces easy to use correctly and hard ...

Small Is Beautiful

Systems get bigger, technologies reach further, practices mature, advice changes... or at least some of it does. Some guidance remains unaffected by the passing of paradigms, the evolution of technology or the scaling of development: break your software into small, cohesive parts defined by clear interfaces and sound implementations, all ...

"How we stopped SOPA"

Aaron Swartz keynote - "How we stopped SOPA" at F2C:Freedom to Connect 2012, Washington DC on May 21 2012. http://freedom-to-connect.net/ ...

One Hacker Way

Erik Meijer
an hour
This presentation was recorded at GOTO Copenhagen 2015 http://gotocph.com Erik Meijer - Founder at Applied Duality, Inc. ABSTRACT Erik challenges the basic ideas on Scrum & Agile and how developers should be developing code for the future. In the next decade every business will be digitized and effectively become a software company. Leveraging software, ...

Rethinking Exceptions

Jason Turner
an hour
The C++ programming language is accelerating with amazing new features, but sometimes it can feel like these features are out of reach. Unfortunately, many C++ developers are stuck using old C++ compilers, runtimes, and tools. They are missing out on some of the best features the language has to offer. ...

Rethinking Design, Risk, and Software

Our increasingly complex needs have led us to build increasing complex software. We’ve done this in an incremental fashion, building code on top of code. We write understandable snippets of code built on programming languages we know well and then bundle them into program structures to perform complex tasks. This ...

Things that Matter

In the 45+ years since Scott Meyers wrote his first program, he’s played many roles: programmer, user, educator, researcher, consultant. Different roles beget different perspectives on software development, and so many perspectives over so much time have led Scott to strong views about the things that really matter. In this ...

The Many Meanings of Event-Driven Architecture

Martin Fowler
an hour
Towards the end of last year I attended a workshop with my colleagues in ThoughtWorks to discuss the nature of “event-driven” applications. Over the last few years we've been building lots of systems that make a lot of use of events, and they've been often praised, and often damned. Our ...