Pour obtenir une clé
d'essai remplissez le formulaire ci-dessous
Demandez des tariffs
Nouvelle licence
Renouvellement de licence
--Sélectionnez la devise--
USD
EUR
RUB
* En cliquant sur ce bouton, vous acceptez notre politique de confidentialité

Free PVS-Studio license for Microsoft MVP specialists
To get the licence for your open-source project, please fill out this form
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

I am interested to try it on the platforms:
** En cliquant sur ce bouton, vous acceptez notre politique de confidentialité.

Message submitted.

Your message has been sent. We will email you at


If you haven't received our response, please do the following:
check your Spam/Junk folder and click the "Not Spam" button for our message.
This way, you won't miss messages from our team in the future.

>
>
>
Static code analyzer vs developers. Her…

Static code analyzer vs developers. Here we go again.

11 Jul 2022

In mid-May this year we released an updated version of our quiz for C++ developers. It's been 2 months already — keep on reading to learn more about the results!

0964_rezultaty_quiza_cpp/image1.png

You've probably heard of our quiz and even passed it. Anyway, let me give you the details.

We chose several code fragments from open-source projects where the PVS-Studio analyzer found errors.

  • Participants are given 10 randomly selected code fragments. Each fragment contains an error.
  • You have 60 seconds to find the error.
  • You score 1 point for each correct answer. The maximum possible score is 10 points.
  • If you answer incorrectly or time is up, you do not score a point.

The quiz mechanics is simple, so if haven't passed it yet, go give it a try.

Well, let's move on to the most interesting part — the results.

At the time of writing, 1970 people had taken part in the quiz.

I deliberately wrote "1970 people" — this number may include students or people who are not engaged in development, but passed a quiz for the sake of interest. But still, most of the participants are C++ developers, and the more surprising is the average score of correct answers — 3.53... out of 10. A rather unexpected and slightly disappointing result.

Of course, it's safe to say that quiz is a game, and you cannot evaluate the developer's skills by its results. The fact remains, however, and the statistics of points scored are somewhat depressing.

For clarity, I made a graph that shows the distribution of participants by the number of points scored. As you can see, the hardest part is giving 6 or more correct answers.

0964_rezultaty_quiza_cpp/image2.png

Someone may say that we chose difficult examples and gave little time to find an error. But that's not the point.

The results of the quiz in no way mean that the developers who completed it are incompetent or inattentive. In my opinion, the reason is different. Actually, there are several reasons:

  • people may not be in the loop. They are those who are not involved in development and cannot tell with just one look whether there is a bug in code.
  • people don't want to review the code. They spot the error — they click on it. Were they unable to find the error immediately? They click at a random spot or skip the code fragment — it's not their job after all.
  • people want to know what they will get at the end. They just wonder what the result will be if they click on errors at random (Personally I got 3 correct answers this way, and I'm not a developer).
  • people got distracted from the quiz.

Hand on heart, I will honestly say that even some developers from our C++ team did not spot all the errors (I haven't included their results in the summary data).

Every developer is first and foremost a human being. And some of the reasons described above may well show up in their working process:

  • junior developers may make a "simple" mistake at the beginning of their career;
  • one may not have the desire to look for bugs in code, especially if it's not their code;
  • it's more exciting to focus on a new feature than to go through the code you've already written several times;
  • one may always get distracted and overlook a mistake, no one is safe from that.

Introducing static analysis tools into the development process may help to overcome these problems.

Therefore, do not be afraid to use static code analyzers. Give developers the opportunity to fix bugs rather than wasting time searching for them. Why don't you start with the free version of PVS-Studio? By the way, those, who passed the quiz, get a promo code for a 30-day license, instead of 7-day license.

We'll try to come up with new fun activities for you to test your programming skills. In the near future, we're planning to launch a similar C# quiz. After that, we will definitely compare who is better of finding errors: C++ developers or C# developers?

Popular related articles
The feedback for our C++ quiz and why it matters

Date: 31 Aoû 2022

Author: Alexey Sarkisov

Earlier we wrote about our quiz for C++ developers. Since the quiz launch, we have been carefully collecting your feedback. Some of the comments were related to the quiz errors, that we obviously sou…
Solutions to bug-finding challenges offered by the PVS-Studio team at conferences in 2018-2019

Date: 18 Nov 2019

Author: Sergey Khrenov

Hi! Though the 2019 conference season is not over yet, we'd like to talk about the bug-finding challenges we offered to visitors at our booth during the past conferences. Starting with the fall of 20…
How developers were checking projects for bugs using PVS-Studio

Date: 04 Déc 2017

Author: Phillip Khandeliants

Pinguem.ru and the PVS-Studio team recently held a contest where programmers were to use PVS-Studio static analyzer for one month to find and fix bugs in the source code of open-source projects. Thei…
A talk with Jason Turner: the history of CppCast, and why it was shut down

Date: 27 Sep 2022

Author: Uliana Grishina

In this article, we are going to talk to Jason Turner, one of the CppCast founders. CppCast is the first podcast for C++ developers by C++ developers. From 2015 to 2022 CppCast had weekly conversatio…
Reworking C and C++ front-end — or how we deal with 16-year legacy code in PVS-Studio

Date: 22 Sep 2022

Author: Sergey Larin

In 2022, the PVS-Studio static analyzer for C and C++ turns 16 years old. If the analyzer were a human, it would have already finished high school! This project was started a long time ago, and since…

Comments (0)

Next comments
Unicorn with delicious cookie
Nous utilisons des cookies pour améliorer votre expérience de navigation. En savoir plus
Accepter