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
The Value of ValuesIn 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

Scott Meyers – The Most Important Design GuidelineWhat’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 ...

Old Is the New New

Old Is the New NewEverything is changing. Everything is new. Frameworks, platforms and trends are displaced on a weekly basis. Skills are churning. And yet... Beneath this seemingly turbulent flow there is a slow current, strong and steady, changing relatively little over the decades. Concepts with a long history appear in new forms and fads ...

Small Is Beautiful

Small Is BeautifulSystems 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"

"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
One Hacker WayThis 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
Rethinking ExceptionsThe 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

Rethinking Design, Risk, and SoftwareOur 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

Things that MatterIn 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 ...