New Pluralsight Course: Introduction to Data Structures and Algorithms in C++

A new course of mine was published in the Pluralsight library: Introduction to Data Structures and Algorithms in C++.

In this course, you’ll learn how to implement some fundamental data structures and algorithms in C++ from scratch, with a combination of theoretical introduction using slides, and practical C++ implementation code.

Introducing the stack with an interesting metaphor

No prior data structure or algorithm theory knowledge is required. You only need a basic knowledge of C++ language features (please watch the “Prerequisites” clip in the first module for more details about that).

Explaining linear search using slides

During this course journey, you’ll also learn some practical C++ coding techniques (ranging from move semantic optimization, to proper safe array copying techniques, insertion operator overloading, etc.) that you’ll be able to use in your own C++ projects, as well.

So, this course is both theory and practice!

Spotting a subtle bug

Here’s just a couple of feedback notes from my reviewers:

The callouts are helpful and keep the demo engaging as you explain the code. [Peer Review]

To say that this is an excellent explanation of Big-O notation would be an understatement. The way you illustrate and explain it is far better than the way it was taught to me in college! [Peer Review]

Big-O doesn’t have to be boring!

Starting from this course page, you can freely play the course overview, and read a more detailed course description and table of content.

I hope you’ll enjoy watching this course!

 

Is Your “C++11 from Scratch” Course Still Valid Today? Yes, Absolutely!

I’m very proud of my “C++11 from Scratch” course published by Pluralsight.

We are in 2018, and there have been C++14 and C++17 in the meantime. So, a legit question is: “Does it make sense for me to watch your C++11 course today for a beginner-oriented introduction to C++?” And the answer is a BIG STRONG YES! 😊

In fact, in that course you will learn modern C++ topics that are valid in both C++11, and also in next versions of the language. For example, what you will learn about the parameter passing rules, like passing by reference vs. passing by value, is perfectly valid in C++11, C++14, and C++17 as well.

Moreover, the practical introductions I gave to standard library’s classes like std::string, or std::vector, and to the std::sort algorithm, just to name a few, are totally valid also in C++14 and C++17.

Similarly, my discussions on defining custom types, constructors, destructor, the RAII pattern and the scope-based lifetime of objects are still valid in C++14 and C++17, as well.

Maybe a better title for that course would be “Modern C++ from Scratch”. Anyway, the content is already there, available for an enjoyable learning experience, with a mix of slides containing interesting visuals, and demo code.

Sample slide: Introducing the std::string class
Sample slide: Introducing the std::string class

And, if you are already familiar with C++11, you may enjoy my follow-up course on “Practical C++14 and C++17 Features”.

Happy learning!

 

Limited-time Discount on Pluralsight Annual Subscriptions

I’d like to give you a heads-up that for a limited time, Pluralsight will be discounting Individual Annual Subscriptions 33% (or $100), making them only $199.

33% Off Pluralsight Annual Subscriptions – Save $100 for a Limited Time!

I encourage you to take this opportunity to save $100 on your annual subscription!

Note that if you are an existing subscriber you can take advantage of this offer as well: In fact, your current subscription will be extended for a year for $199.

New Pluralsight Course: Practical C++14 and C++17 Features

A new course of mine was published in the Pluralsight library: Practical C++14 and C++17 Features.

From the course short description:

C++14 and C++17 added many new features to the C++ language. This course will teach you practical features introduced in C++14 and C++17, that you will be able to use to write clearer, simpler, and higher-quality modern C++ code.

You can take this course to learn about practical features added in C++14 and C++17, ranging from syntactic sugar like digit separators, to more substantial features like polymorphic lambdas (this course will offer an introduction to basic lambdas as well), relaxed constexpr functions, the Chrono library with its standard-defined duration suffixes, and C++17 juice ranging from nested namespaces, variable declarations in if statements, to “constexpr if” and structured bindings, just to name a few.

Building an Italian-to-English dictionary with std::map

I discussed these topics with both slides and demo code, including showing some bugs and how to fix them.

Demo: Sorting by string length using lambdas

You can watch the course trailer and read a more detailed course description and the table of content starting from this course page.

Proper unit conversions are important!

I put the discussed features in proper context for learners who are already familiar with basic elements of C++11. For example, when I introduced C++14 std::make_unique, I also talked about smart pointers and introduced std::unique_ptr as well. If you need an introduction to basic elements of modern C++, you can take my “C++11 from Scratch” course.

Here’s some feedback from my reviewers:

You’ve done an excellent job with the animated shapes/callouts throughout the module. They really help me to follow along with the narrative explanations. [Peer Review]

The content is logically organized and chunked into bite-size clips. I also like your mix of slides and demos. [Peer Review]

This is an excellent challenge to the viewer to spot the bug in the code. [Peer Review]

Overall, a strong module that will be well-received by an intermediate audience. The explanations are clear and the concepts build on each other, making it easy to follow along. Keep up the great work! [Peer Review]

Raw owning pointers are radioactive!

Thank You

Writing and producing this course has been an interesting journey and a rewarding experience for me. There are several people who worked with me during this journey and with their contributions helped me producing this quality course. I’d like to thank my ASM (former Editor) Beth Gerard-Hess, my Production Editor Austin Crawford, my Curriculum Director Tod Gentille, my reviewers (both QA and peer), and all the Pluralsight persons who worked on this course project. Thanks also to Stephan T. Lavavej for interesting e-mail conversations that provided good food for thought.

I hope you will enjoy this new course on Practical C++14 and C++17 Features: Happy learning! 😊

 

Learning Modern C++ from Scratch

C++ is a language having a reputation of being hard to learn.

In this C++ course of mine published by Pluralsight, I did my best to prove the opposite: C++ can be learned in a simple, interesting, and fun way!

I used a variety of engaging visuals, metaphors and example demo code to try to teach modern, clear, good C++ from scratch, from the beginning, without any previous programming knowledge.

And, even if you already know C++, you may have fun watching this course as well.

Note: The table of contents and a brief course overview are freely available in the course page.

Sample slide: Iterating through vector elements
Sample slide: Iterating through std::vector’s elements

Here’s some of what my reviewers wrote about this course:

You sound really passionate about this technology.  It comes across in the narration and it’s quite infectious.

You’re a very talented teacher, offering lots of examples, analogies and stories that make the concepts easy to grasp.  The visuals are also really helpful for understanding the concepts.

Overall, I really enjoyed this module.  The content is logically structured, you do a great job explaining the concepts, supported by engaging visuals.  There’s also a nice mix of theory and demos.  You clearly understand your beginner audience, the knowledge they currently have, and how to lead them to a deeper understanding of this technology.  Bravo!

The demo showing the bug with implementing the swap function was excellent. It immediately reinforced your earlier lesson on the scope of local variables.

Fantastic use of Camtasia callouts in the demos.

Sample slide: Introducing the std::string class
Sample slide: Introducing the std::string class

I’d like to sincerely thank Mike Woodring of Pluralsight for approving this course idea, my fantastic editor Beth Gerard-Hess for her continuous encouragement and support during this course production (working with Beth is an absolute pleasure), Stephan T. Lavavej for interesting email conversations that provided good food for thought, all my reviewers (both peer and QA) for their quality course feedback, and all the Pluralsight persons who worked on this course.

This C++ course has been a work of love for me, I put my heart into it: I hope you will enjoy the result!

 

Pluralsight Blog Post: Simplifying Lexicographical Comparisons with C++11

A C++ article of mine has been published on the Pluralsight blog. It shows how to pragmatically use C++11’s std::tie to easily implement lexicographical comparisons of custom data types (the concept of lexicographical comparison is introduced in that post as well).

Basically, instead of writing a long (and potentially bug-prone) sequence of if statements, std::tie can be invoked to build tuples, which in turn can be compared using std::tuple’s already-defined operator< overload.

I also showed a common error that can happen when calling std::tie, and how to fix it using std::make_tuple.

An important take-away is that if there are tools already tested and available in the C++ standard library, it’s better to use them than attempting to reinvent the wheel writing boilerplate bug-prone “low-level” C++ code.

Check out the blog post here!

Thanks to Stephan T. Lavavej (Senior Library Developer at Microsoft Visual C++ Team) for technically reviewing this article.

Building In-Process Shell Extensions? C++ Is The Right Tool For The Job

In today’s world, there are so many programming languages to choose from when  developing software projects. So, oftentimes, this question arises: “With so many simpler and higher-level programming languages, why should I choose C++ to do X?”

Well, programming languages (and frameworks) are just tools. And my usual guidance is: use the right tool for the job. So, if for your project a simpler/more productive/higher-level programming language is well suited, then just go for it!

But, there are cases in which C++ is just The Best Tool For The Job.

C++ great for perf
C++ great for perf

One of these contexts is the development of in-process shell extensions for Windows. There is a whole MSDN web page discussing “Guidance for Implementing In-Process Extensions”.

A key point is that the .NET Framework/CLR is a high-impact runtime, with associated performance issues for in-proc extensions:

“Performance issues can arise with runtimes that impose a significant performance penalty when they are loaded into a process. The performance penalty can be in the form of memory usage, CPU usage, elapsed time, or even address space consumption. The CLR, JavaScript/ECMAScript, and Java are known to be high-impact runtimes. Since in-process extensions can be loaded into many processes, and are often done so at performance-sensitive moments (such as when preparing a menu to be displayed the user), high-impact runtimes can negatively impact overall responsiveness. […]”

The aforementioned MSDN documentation continues with a brief discussion of issues associated to high resource consumption as well.

Then, another paragraph about “Issues Specific to the .NET Framework” briefly touches on COM interop related problems. It’s important to keep in mind that the in-proc shell extension model was designed around native code, and there is a kind of “impedance mismatch” between that and the managed .NET world.

Note that the use of .NET is considered acceptable for other types of extensions, like out-of-process extensions.

A common type of shell extensions are the context-menu extensions.

Example of customized context-menu via shell extensions
Example of customized context-menu via shell extensions

If you are curious about the development  of this type of extensions using C++, you may find my Pluralsight course on the subject interesting.

(A brief description of the course content is offered in this blog post.)