image

One of the main problems with C++ is having a huge number of constructions whose behavior is undefined, or is just unexpected for a programmer. We often come across them when using our static analyzer on various projects. But, as we all know, the best thing is to detect errors at the compilation stage. Let's see which techniques in modern C++ help writing not only simple and clear code, but make it safer and more reliable.
What is Modern C++?

The term Modern C++ became very popular after the release of C++11. What does it mean? First of all, Modern C++ is a set of patterns and idioms that are designed to eliminate the downsides of good old "C with classes", that so many C++ programmers are used to, especially if they started programming in C. C++11 looks way more concise and understandable, which is very important.
Kate Milovidova 15 september 2016, 11:44

image

The development team working on PVS-Studio has finally started developing its product for Linux. That was the news that the CTO Andrey Karpov wrote about in the article. Long disputes and requests of the readers on habrahabr.ru, discussions on Reddit, Linux.org and other places can now gain a new round of comments. As it is mentioned in the article, you can volunteer to help the developers to test this product and improve it to a better level.

There are many tasks on the way of PVS-Studio to Linux, that the technical director is talking about. Put briefly, these are:

- more complete support of GCC and Clang;
- a new system of regression tests in Linux, so that you can track the changes results in the analyzer kernel and add new diagnostics;
- compiler monitoring to help programmers quickly and easily check the project without distracting people who support makefiles and the build system in general;
- documentation improvement, so that the user can get information with the examples about any diagnostic;
- testing, distribution, support organization.

In this article you will find more details about the abilities of PVS-Studio for Windows and the tasks it can already solve on Linux.
Kate Milovidova 29 july 2016, 11:49

Often people ask questions - which programming language is easier, which is the most popular, which one to start learning and so on. In this article we will compare two languages Python and Ruby; their reference implementations CPython and MRI, to be exact.

We took the latest versions of the source code from the repositories (Ruby, Python) for the analysis. There weren’t many glaring errors in these projects. Most of them are related to the usage of macros, although this code is quite innocent from the point of view of the developer. But at the same time, such suspicious fragments that occurred because of copy paste, comparing SOCKET type with null, undefined behavior, storing values to the variables that are already used or null pointer dereferencing are really worth reviewing.

Having analyzed all the warnings of general analysis diagnostics and removed all the false positives, we have come to the following conclusion concerning the error density:

image

More details about the code fragments where these suspicious code fragments were found:
http://bit.ly/2a2lLZR

It’s worth saying that despite these flaws, the code is still of high quality. We should also take such factors into account as the size of the codebase , or the fact that some fragments are erroneous only from the point of view of C++ language and they don’t affect the program in any way. That’s why this analysis may be rather subjective, because previously we haven’t evaluated the error density of these projects. We’ll try to do that in the future, so that we can later compare the result of the checks.
Kate Milovidova 22 july 2016, 12:36

Nowadays a lot of projects are opening their source code and letting those who are interested in the development of it edit the code. OpenJDK is no exception, programmers PVS-Studio have found a lot of interesting errors that are worth paying attention to.

OpenJDK (Open Java Development Kit) - a project for the creation and implementation of Java (Java SE) platform, which is now free and open source. The project was started in 2006, by the Sun company. The project uses multiple languages- C, C++, and Java. We are interested in the source code written in C and C++. Let's take the 9th version of OpenJDK. The code of this implementation of Java platform is available at the Mercurial repository.

During verification, the analyzer found different errors in the project including: copy-paste, bugs in the operation precedence, errors in logical expressions and in pointer handling and other bugs, which are described in detail in this article.

It's always amusing to check a project which is used and maintained by a large number of people. The better and more accurate the code is, the more safely and effectively the program will work. Those bugs we found, are another proof of the usefulness of an analyzer, as it allows the detection of such errors which would otherwise be hard to detect doing simple code review.
Kate Milovidova 17 june 2016, 9:00

Now everyone can post their articles!, just register and push "add"
Your welcome ;)
Tags: articles
kleop 4 april 2016, 15:52

Microsoft Dynamics CRM – An Overview

Microsoft Dynamics CRM is a complete CRM software suite that covers all areas of customer service including sales and marketing. MS-Officeand Outlook are some of the commonly used office applications for word processing and emailing.

With MS Dynamics CRM software, customer data can easily be pulled in these office applications and you can even work within the familiar background of Microsoft Office or Outlook. The support for mobile devices and data access on the go, make life easier for sales and marketing executives.

The flexibility and comprehensiveness of Microsoft Dynamics CRM suite make it a popular CRM application development framework worldwide. Minimal configuration, familiar application environment, rich functionality, and a variety of deployment options are some of the features that ensure great ease of use and customization.
ethanmillar 4 april 2016, 7:41

When you bought the Windows Phone then your expectations are very high from it. It is a very different platform from android and iOS. Working on windows phone is very exciting for every new user.

But it is very disappointing if you don’t know how to use the windows phone. Using windows phone is much different from android and iOS. Functioning of Windows phone is very different.

Every user wants to take snapshot from their phone. Camera is available in the phone but it is used to take picture of outside activities. If you want to take picture of things inside your phone or wants to take picture of layouts inside your phone then snapshot is the only and easy way.
Pooja Solanki 8 december 2015, 10:07

CppCat is a static code analyzer integrating into the Visual Studio 2010-2013 environment. The analyzer is designed for regular use and allows detecting a large number of various errors and typos in programs written in C and C++. For the purpose of popularizing it, we've decided to launch a student-support program granting free licenses to every higher school student who will contact and ask us about that. You just need to send us a photo of your student card or transcript.
Andrey2008 21 november 2014, 14:24



The authors of the PVS-Studio analyzer invite you to test your attentiveness.

Code analyzers never get tired and can find errors a human's eye cannot easily notice. We have picked a few code fragments with errors revealed by PVS-Studio, all the fragments taken from well-known open-source projects.

We invite you to take part in a competition against code analyzers to test your agility by trying to find the errors by yourself. You will be offered 15 randomly selected tasks. Every correct answer earns you one score if you give it within 60 seconds. The code fragments are short and 60 seconds is a fair limit.

Let's examine a couple of examples with errors for you to understand how to give the answer.

Andrey2008 18 september 2014, 16:15

There are 3 types of lies: Lies, damned lies, and statistics
Statistics, infographics, data analysis and data science – who isn’t doing it right now. Everyone knows how to do it right, just left for someone to write how you SHOULDN’T do it. In the article we’ll try to fix it.

image
(Hazen Robert "Curve fitting". 1978, Science.)

Article structure:
  1. Lead
  2. Sampling Bias
  3. Well-chosen average
  4. 10 more failed experiments of which we haven’t written yet
  5. Playing with scale
  6. Selecting 100%
  7. Hiding main numbers
  8. Visual metaphor
  9. Example of qualitative visualization
  10. Conclusion and what to read next
KlauS 30 june 2014, 14:35
1 2 3 4 5 ...