BUG OF THE MONTH | data == null && throw NullReferenceExceptionContinue reading
BUG OF THE MONTH | Replacement That Did Not WorkContinue reading
Surely every C# developer has used out-parameters. It seems that everything is extremely simple and clear with them. But is it really so? For a kickoff, let’s start with a self-test task.Continue reading
BUG OF THE MONTH | Expression is always trueContinue reading
BUG OF THE MONTHContinue reading
This post continues the series of articles, which can well be called “horrors for developers”. This time it will also touch upon a typical pattern of typos related to the usage of numbers 0, 1, 2. The language you’re writing in doesn’t really matter: it can be C, C++, C#, or Java. If you’re using constants 0, 1, 2 or variables’ names contain these numbers, most likely, Freddie will come to visit you at night. Go on, read and don’t say we didn’t warn you.
BUG OF THE MONTH | A typo
The expectation of people with regard to software quality is profoundly unrealistic. It could be because they depend so much on software that anything less than perfect is ‘un-acceptable’.
It’s very interesting to check large projects. As a rule, we do manage to find unusual and peculiar errors, and tell people about them. Also, it’s a great way to test our analyzer and improve all its different aspects. I’ve long been waiting to check ‘Mono’; and finally, I got the opportunity. I should say that this check really proved its worth as I was able to find a lot of entertaining things. This article is about the bugs we found, and several nuances which arose during the check.
As we continue developing PVS-Studio static code analyzer, we often have to check large open-source projects by renowned developers. The fact that even such projects contain a certain amount of bugs adds even more sense and weight to our work. Unfortunately, everybody makes mistakes. No matter how carefully you control your code’s quality, there is just no way to avoid “human error”. As long as software is developed by humans, analysis tools like PVS-Studio will remain relevant and needed. Today, we are going to discuss errors found in the source code of MSBuild, which is, unfortunately, not perfect either.