Learning from bugs and PVS-Studio Team

Real life: Fixed 1 out of 99 bugs in a project. 117 to go… Have you experienced something similar? Although it’s impossible to write bug-free code, there are tools and practices to lower the rate of mistakes. Today, I’d like to run through a gigantic list of freely available resources from the PVS-Studio Team who works with bugs analysis on a daily basis.

READ MORE...

C++17 in details: Standard Library Utilities

The new C++ standard brings many useful additions to the Standard Library. So far we’ve discussed bigger features like the filesystem or parallel algorithms. Today, I want to focus on smaller, but also handy things. For example, there are utils for handling type safe unions, replacement of void*, string searchers and much more.

READ MORE...

C++17 in details: Parallel Algorithms

Writing multithreaded code is hard. You want to utilize all of the machine’s processing power, keep code simple and avoid data races at the same time. Let’s see how C++17 can make writing parallel code a bit easier. Intro With C++11⁄14 we’ve finally got threading into the standard library. You can now create std::thread and not just depend on third party libraries or a system API.

READ MORE...

C++17 in details: Filesystem

Although C++ is an old programming language, its Standard Library misses a few basic things. Features that Java or .NET had for years were/are not available in STL. With C++17 there’s a nice improvement: for example, we now have the standard filesystem! Traversing a path, even recursively is so simple now!

READ MORE...

Blog summary for the first half of 2017

See my blog stats and thoughts for the first half of the year. The Story Keeping things short I’d like to point out a few major things that happened in the first half of 2017: Moved to a weekly schedule! I was usually writing every second week, but then I’ve experimented with a weekly schedule… and it worked out quite nicely!

READ MORE...

C++17 in details: Code Simplification

With each C++ standard, we aim for simpler, cleaner and more expressive code. C++17 offers several “big” language features that should make our code nicer. Let’s have a look. Intro You might say that most of the new language features (not to mention The Standard Library improvements) are there to write simpler/cleaner code.

READ MORE...

C++17 in details: Attributes

“C++ Attributes… what?” There were almost 40% votes like that in my recent Twitter survey. Maybe It would be good to introduce that little-known feature? There’s even a good occasion, as in C++17 we’ll get even more useful stuff connected with attributes. Interested? Intro Have you ever used __declspec, __attribute or #pragma directives in your code?

READ MORE...

C++17 in details: Templates

For C++17 everyone wanted to have concepts, and as you know, we didn’t get them. But does it mean C++17 doesn’t improve templates/template meta-programming? Far from that! In my opinion, we get excellent features. Read more for details. Intro Do you work a lot with templates and meta-programming? With C++17 we get a few nice improvements: some are quite small, but also there are notable features as well!

READ MORE...