Video & On-Demand

Dive into C++11 (#3)—Automatic lifetime, pointers, dynamic allocation

[Note: Automatic lifetime is indeed the right default -- correct and efficient. When you need to use the heap, however, note that you should now use unique_ptr (or if necessary shared_ptr via make_shared) instead of explicit new and delete. -- Ed.]

 

Hello again, I’m Vittorio Romeo, a computer science student, hobbyist game developer and C++ enthusiast.

I’ve uploaded the third episode of “Dive into C++11” on my YouTube channel.

In this episode we'll take a break from game development to delve into C and C++'s memory and lifetime management.

We'll talk about automatic variable lifetime, pointers in general and dynamic memory allocation.

The intended audience for this tutorial/screencast are people who have some experience with C++ in general, and who watched the previous episodes. This episode may be very interesting for those with experience with C++ who want to learn more about variable lifetime and memory management.

I greatly appreciate comments and criticism, and ideas for future videos/tutorials.

Feel free to fork/analyze the source code at: https://github.com/SuperV1234/Tutorials

You can find the previous episodes here:

Dive into C++11 (#2) -- Frametime/FPS, constexpr, uniform initialization, and more

Hello again, I’m Vittorio Romeo, a computer science student, hobbyist game developer and C++ enthusiast.

I've uploaded the second episode of "Dive into C++11" on my YouTube channel. You can find the first episode here.

You can find the complete playlist here.

In this episode we will learn more about two previously mentioned new awesome C++11 features: "constexpr" and "uniform initialization syntax".

Most importantly, we will also deal with a very big issue that every game developer must face: FPS/frametime, and how to avoid the game from behaving differently on slower/faster machines.

In addition, we'll also briefly learn about "const-correctness" and using the "noexcept" keyword.

We will analyze the "time-slice" method to allow the game to run smoothly and consistently on every machine.

In the last code segment, we will also "refactor" our code by creating a `Game` class, making our source much easier to read and maintain.

I greatly appreciate comments and criticism, and ideas for future videos/tutorials.

Feel free to fork the game's source code at: https://github.com/SuperV1234/Tutorials

Dive into C++11 -- Arkanoid clone in 160 lines of code (SFML2)

arkanoid.PNG

I'm Vittorio Romeo, a computer science student, hobbyist game developer and C++ enthusiast.

I've created a 40 minute tutorial/screencast on the creation of a complete game using C++11 and SFML2. The end result is a playable Arkanoid/Breakout clone with a paddle, a ball and destroyable bricks.

I divided the code in 9 segments, that I analyze and execute individually.

The point of the video is showing how easy it is to create something playable thanks to the C++11 standard, and to show a possible train of thought that can be taken during game development.

I greatly appreciate comments and criticism, and ideas for future videos/tutorials.

Also, feel free to fork the game's source code here: https://github.com/SuperV1234/Tutorials

If the idea catches on, I'd love to make a video featuring the best forks.

Thanks for watching!

Core C++ #10 -- Stephan T. Lavavej

core-10.PNGAccompanying today's release of the VC++ CTP, there is a new talk by Stephan T. Lavavej available covering several major C++11 and draft C++14 features that are of likely interest to C++ developers using any compiler.

Core C++, 10 of n (Nov 2013 CTP)

by Stephan T. Lavavej

From the summary:

In part 10, STL explores the new features in the Visual C++ Compiler November 2013 CTP (Community Technology Preview), in addition to the features that were added between VC 2013 Preview and RTM.

Features included in the November CTP ( generic lambdas!!! Smiley ):

C++11, C++14, and C++/CX features:

  • Implicit move special member function generation (thus also completing =default)
  • Reference qualifiers on member functions (a.k.a. "& and && for *this")
  • Thread-safe function local static initialization (a.k.a. "magic statics")
  • Inheriting constructors
  • alignof/alignas
  • __func__
  • Extended sizeof
  • constexpr (except for member functions)
  • noexcept (unconditional)
  • C++14 decltype(auto)
  • C++14 auto function return type deduction
  • C++14 generic lambdas (with explicit lambda capture list)
  • (Proposed for C++17) Resumable functions and await

Free introductory C++ web course on Tuesday November 19 -- Kate Gregory, James McNellis

gregory-mcnellis.PNGComing next week on Microsoft Virtual Academy:

C++: A General Purpose Language and Library

by Kate Gregory and James McNellis

Live on November 19, 2013, 9:00am-5:00pm PST (other time zones), later on demand

Cost: Free

With these speakers, we expect a high quality talk. If you're new to C++, or know someone who is and would like to learn about the language, watch and recommend this talk. This event uses the Microsoft Visual Studio environment, but the content is applicable to new C++ developers using any compiler and platform.

From the announcement:

Attention developers: here’s a painless way to learn the basics of C++ from the ground up, whether you’re updating legacy code or writing brand new, efficient, and high-performance code for new platforms like phones and want to take advantage of C++.  You’ll learn the fundamentals of the C++ language, how to use the language and its Standard Library effectively, and how to use the Visual Studio environment for developing C++, including debugging, exploring code, and understanding error messages.  This is your starting point for building software in C++.

COURSE OUTLINE

  • Introduction to Programming Concepts
  • Getting Started
  • The C++ Object Model
  • Pointers and Indirection
  • RAII – Resource Acquisition is Initialization
  • The C++ Standard Library (STL)

INSTRUCTOR TEAM

Kate Gregory | Partner, Gregory Consulting Limited | @gregcons

Kate Gregory is a C++ expert who has been using C++ since before Microsoft had a C++ compiler, an early adopter of many software technologies and tools, and a well-connected member of the software development community. She has over three decades of scientific and engineering programming experience in a variety of programming languages. Since January 2002 she has been Microsoft Regional Director for Toronto and since January 2004 she has been awarded the Microsoft Most Valuable Professional designation for Visual C++. In June 2005 she won the Regional Director of the year award, and she was one of the C++ MVPs of the year for 2010.
Kate is the author of over a dozen books, mostly on C++ programming; the latest, on massively parallel programming with C++ AMP, was published in fall 2012 by Microsoft Press. Her firm, Gregory Consulting Limited, is based in rural Ontario and helps clients adopt new technologies and adjust to the changing business environment. Managing, mentoring, technical writing, and technical speaking occupy much of her time, but she still writes code every week.

James McNellis | Microsoft Senior Software Development Engineer | @JamesMcNellis

James McNellis is a computer programmer and C++ maven. A senior engineer on the Microsoft Visual C++ team, James builds modern C++ libraries and is the maintainer of the Visual C++, C Runtime (CRT), and C Standard Library implementation. He was previously a member of the Microsoft Expression Blend team, developing the XAML designer tools for Windows 8 apps. Prior to joining Microsoft in 2010, he spent several years working on real-time 3-D simulation and robotics projects in the defense industry. James is a prolific contributor on the Stack Overflow programming Q&A website and writes for the Visual C++ Team Blog.

New Adventures in C++ with Cinder and More -- Ale Contenti

The Cinder C++ library for graphics got a shout-out from Herb Sutter at GoingNative'13, and now we get a full hour-long talk about Cinder from Visual Studio's own Ale Contenti.

New Adventures in C++ with Cinder and More

Play and be productive with modern C++, graphics, on-the-fly projects and more! Starting from the latest Going Native 2013 talks as an inspiration, we will explore how easy is to mold ideas into graphics apps with C++ and Cinder, and how simple tools and techniques can help us be more productive in Visual Studio!

Watch the video, or download the slides.

Effective GoF Patterns with C++11 and Boost -- Tobias Darm

tobias-darm.PNGSpeaking of ACCU 2014, here's an excellent talk from ACCU 2013 showing how C++11 (by itself, and/or with Boost) makes expressing many common design patterns far simpler than using traditional pre-C++11 tools. In fat, are there cases where the design patterns even disappear entirely? Watch to find out.

Effective GoF Patterns with C++11 and Boost (slides)

by Tobias Darm

Abstract and bio:

Tobias Darm discusses how some of the GoF patterns can be implemented differently in C++11 using Boost libraries.

Tobias Darm is working with C++ and programming embedded devices used in an intensive care environment at Dräger medical. He likes to learn and teach about software development and does tutorials and workshops in his company encouraging a modern programming style.

 

GoingNative 2013 videos now available

gn13-signed.jpgThe videos from last week's GoingNative 2013 are now posted and available for on-demand viewing on Channel 9. Over 20 hours of live presentations cover everything from the latest in the language and the standard library, to C++'s evolution and momentum across the industry, to style guidance and the latest in C++11/14 features, to the optimizer and code generation for modern processors like Haswell, to experience in specific domains and platforms, and more.

GN'13 was a huge success thanks to Channel 9 and all the speakers, including headliner Bjarne Stroustrup and esteemed speakers Sean Parent, Andrei Alexandrescu, Stephan T. Lavavej, Jim Radigan, Herb Sutter, Scott Meyers, Michael Wong, Chandler Carruth, Ales Holecek, Elliot Omiya, Deon Brewis, Niklas Gustafsson, Eric Brumer, and Garrett Serack. Thanks to everyone who came to present and participate in this year's event.

The GN folks and others are working hard on next year. Stay tuned for more information in the months ahead. In the meantime, enjoy this material and be sure to share the ones you find most interesting and useful with your friends and colleagues.

GoingNative will be livestreamed this week: Sep 4-6

The GoingNative 2013 conference starts Wednesday and is just about sold out. A few seats remain, so register now (or get on the waitlist in case there's a last-minute cancellation you can snag).

It's decidedly desirable to be physically in the room to get the full experience, and hundreds of people from over 10 countries are already on their way. But if you can't come in person to Redmond, WA, USA for this week's C++ fest, you'll be glad to know the talks will be livestreamed as well on the Channel 9 homepage. The streaming is compatible with all major platforms. For those of you around the world, please note that the talk times are in North American Pacific Daylight Time.

Talks include the following, including both full-length talks and a number of 20- and 30-minute "nuggets."

Day 1: Wed Sep 4

  • Opening Keynote: The Essence of C++ -- With Examples in C++84, C++98, C++11, and C++14 (Bjarne Stroustrup)
  • C++ Seasoning (Sean Parent)
  • Writing Quick Code in C++, Quickly (Andrei Alexandrescu)
  • Don’t Help the Compiler (Stephan T. Lavavej)
  • Compiler++ (Jim Radigan)

Day 2: Thu Sep 5

  • Day 2 Keynote: One C++ (Herb Sutter)
  • rand() Considered Harmful (Stephan T. Lavavej)
  • An Effective C++11/14 Sampler (Scott Meyers)
  • C++14: Through the Looking Glass (Michael Wong)
  • The Care and Feeding of C++’s Dragons (Chandler Carruth)
  • Interactive Panel: Ask Us Anything! (speakers)

Day 3: Fri Sep 6

  • Everything You Always Wanted to Know About Threading (But...) (Elliot H. Omiya)
  • The Way of the Exploding Tuple (Andrei Alexandrescu)
  • To Move or Not to Move: That is the Question (Michael Wong)
  • Bringing await to C++ (Deon Brewis)
  • A C++ REST SDK: OSS web services on Windows and Linux (Niklas Gustafsson)
  • Compiler Confidential (Eric Brumer)
  • Find-Build-Share-Use: Using NuGet for C and C++ Libraries (Garrett Serack)
  • My Favorite C++ 10-Liner (Herb Sutter)