Skip to main content

Home/ Programming/ Contents contributed and discussions participated by Andrey Karpov

Contents contributed and discussions participated by Andrey Karpov

Andrey Karpov

PVS-Studio confesses its love for Linux - 0 views

  •  
    This post is about love. About the love of the static code analyzer PVS-Studio, for the great open source Linux operating system. This love is young, touching and fragile. It needs help and care. You will help greatly if you volunteer to help testing the beta-version of PVS-Studio for Linux.
Andrey Karpov

The Ultimate Question of Programming, Refactoring, and Everything - 0 views

  •  
    Yes, you've guessed correctly - the answer is "42". In this article you will find 42 recommendations about coding in C++ that can help a programmer avoid a lot of errors, save time and effort. The author is Andrey Karpov - technical director of "Program Verification Systems", a team of developers, working on PVS-Studio static code analyzer. Having checked a large number of open source projects, we have seen a large variety of ways to shoot yourself in the foot; there is definitely much to share with the readers. Every recommendation is given with a practical example, which proves the currentness of this question. These tips are intended for C/C++ programmers, but usually they are universal, and may be of interest for developers using other languages.
Andrey Karpov

C++ Hints - 0 views

  •  
    The PVS-Studio team has analyzed over 200 open-source projects with their static code analyzer. Among them are such titles as Unreal Engine, Php, Haiku, Qt, and even Linux. In each of these projects, bugs of varying severity were detected. The team regularly reports the analysis results in their blog. Each post is a separate article of several pages, describing in detail each of the bugs found and giving recommendations on how to fix them. The PVS-Studio team decided to go further to create a service of tips and recommendations on C/C++ usage, CppHints.com, in addition to the practice of writing articles. Within the scope of this service, the team publishes 1 recommendation/tip per day. Each publication delivers concentrated information on C/C++ programming approaches and techniques used in various situations and includes examples of correct and incorrect language use from over 200 open-source projects.
Andrey Karpov

C++'s best feature - 0 views

  •  
    C++, if you want to learn all of it, is big, difficult and tricky. If you look at what some people do with it, you might get scared. New features are being added. It takes years to learn every corner of the language.
Andrey Karpov

Regular Expressions 101: Regex in C++11 - 0 views

  •  
    Brian Overland, author of C++ for the Impatient, speeds through the basics of regular expression grammar as groundwork for explaining how C++11 regular expressions work.
Andrey Karpov

Low-Fragmentation, High-Performance Memory Allocation in Despair Engine - 0 views

  •  
    I recently wrote about dlmalloc and how it is a poor choice for a memory allocator for console games. As I explained in my previous article, dlmalloc has two major limitations. It manages a pool of address space composed of discrete regions called segments. It can easily add segments to grow its pool of address space, but it can't easily remove segments to return address space to the OS. Additionally, it doesn't distinguish between physical and virtual memory, which means that it can't take advantage of virtual memory's ability to combat fragmentation.
Andrey Karpov

Efficient Programming with Components (A9Videos) - 0 views

  •  
    Performance is essential for infrastructure software. Modern infrastructure software depends heavily on components. Therefore, writing performant code in this environment requires deep understanding of the characteristics of such components. The course will help programmers to improve performance of their code by learning how to use these existing generic components effectively. In addition, it will teach them to extend the library with new high-performance components. Along the way, participants will learn how to use C++ as a high-performance language. The course will be taught interactively with the class discussing, discovering, and developing components together.
Andrey Karpov

Obscure C - 0 views

  •  
    The C language is relatively "small" in comparison to other modern computer languages. To completely specify it, (and its standard library) only requires about ~550 pages. To do the same for Java or C++ would require an entire bookshelf, rather than a single book. However, even though the language is small enough to be easily comprehended, it has some dark corners. The purpose of this article is to explore some of them. Since C is used in a wide variety of applications, the "dialect" of it varies. This means that some people may be quite familiar with many of the following items. However, the individual "non-obscure" subsets should hopefully vary, resulting in at least a few items you might not know about.
Andrey Karpov

Visual Studio 2012 New Features of the IDE - better late than never ;-) - 0 views

  •  
    I am making this post thinking "Better late than never", as I was supposed to make this post a long time ago, actually in the beta period of Visual Studio 2012, like I did with Visual Studio 2010, unfortunately I was held up with other stuff, personal and work related. This post remained as partially completed in my blog's drafts for a long time which I took and finished.
Andrey Karpov

Why Windows 8 drivers are buggy - 0 views

  •  
    We have checked the Windows 8 Driver Samples pack with our analyzer PVS-Studio and found various bugs in its samples. There is nothing horrible about it - bugs can be found everywhere, so the title of this article may sound a bit high-flown. But these particular errors may be really dangerous, as it is a usual practice for developers to use demo samples as a basis for their own projects or borrow code fragments from them.
Andrey Karpov

Some Optimizations Are No-Brainers - 0 views

  •  
    Kernighan's rule for optimizations (Don't do it) is good advice. But as with most rules, there are exceptions.
Andrey Karpov

How to unite several separate projects into one general Visual Studio solution (.sln fi... - 0 views

  •  
    For the purpose of testing our C/C++ analyzer PVS-Studio, we often check various open-source projects and publish reports about bugs we have found. It is obvious that we seek projects of large sizes (hundreds of thousands of code lines), as there is little to be tested and caught in just a few dozens of files. We already had opportunities to test large collections consisting of hundreds of small open-source projects, for example sets of test samples for various SDKs and Frameworks. We are especially interested in checking such collections to see how the analyzer supports various specific code constructs, Visual C++ project subtypes, and so on.
Andrey Karpov

PVS-Studio registration key for 5 days - 0 views

  •  
    As an experiment, we have decided to offer everyone interested a PVS-Studio registration key for 5 days to study its 64-bit diagnostics more thoroughly. The PVS-Studio demo version is absolutely full-function. It is sufficient to study the tool and get familiar with its capabilities. The user has up to 200 clicks to navigate through code fragments the analyzer considers to be probably incorrect. We believe it's quite enough for the user to decide if he/she likes the tool or not. However, that might be insufficient in case you are searching for 64-bit errors. Many of the 64-bit warnings are false positives or are irrelevant to this program, as fragments they point to cannot cause errors. That's why the restriction of 200 messages you can click to navigate through the code may prevent you from forming a definite opinion of the tool. We have been watching an increasing interest towards development of 64-bit software lately. Perhaps this has to do with the release of Embarcadero RAD Studio XE3 Update 1 that has learned now to compile 64-bit applications. Or maybe it's just that the time has come.
Andrey Karpov

Errors detected in Open Source projects by the PVS-Studio developers through static ana... - 0 views

  •  
    We regularly check various open-source projects with PVS-Studio and send analysis results to developers and usually describe them in our posts as well. Besides, we add them into our bug database. This database is posted below on this page. The bugs are grouped according to the number of the diagnostic rule that is used to detect them. This number is given in the left column. Click on it to see the diagnostic rule description in the documentation. The right column contains a link to the corresponding error samples. Some diagnostics haven't detected any bugs in open-source projects yet. The lower you are in the list, the more diagnostics with no error samples there will be. The reason is simple: the later a certain rule had been added, the fewer projects were analyzed with this rule included into the rule set and therefore the fewer chances for it to demonstrate its capabilities.
Andrey Karpov

PVS-Studio is a static code analyzer that scans C, C++ and C++11 code and highlights b... - 0 views

  •  
    PVS-Studio is a static analyzer that detects errors in source code of C/C++/C++11 applications. There are sets of rules included into PVS-Studio: General-purpose diagnosis Detection of possible optimizations Diagnosis of 64-bit errors (Viva64) Diagnosis of parallel errors (VivaMP)
Andrey Karpov

Comparing an Integer with a Floating-Point Number, Part 2: Tactics - 0 views

  •  
    We continue last week's discussion by getting down to details. We continue last week's discussion by getting down to details. If you haven't read it, please do so now; I'll wait. Thanks! We'll start by defining three important implementation-dependent types: ...
Andrey Karpov

Why Code in C Anymore? - 0 views

  •  
    The traditional reasons for preferring C to C++ have been steadily whittled away. Are there any good reasons to still use C?
Andrey Karpov

Featured class: Introduction to C++ - 0 views

  •  
    One of the largest UReddit classes to date, Introduction to C++ by user Skyeshatter (sarevok9 on Reddit) consists of a series of 46 video lectures on the C++ programming language, aimed at the novice programmer. In the teacher's own words,
Andrey Karpov

Windows Store Developer Links - 0 views

  •  
    Windows Store App Development, Windows Phone App Development.
Andrey Karpov

What Every Programmer Should Know About Memory - 0 views

  •  
    As CPU cores become both faster and more numerous, the limiting factor for most programs is now, and will be for some time, memory access. Hardware designers have come up with ever more sophisticated memory handling and acceleration techniques-such as CPU caches-but these cannot work optimally without some help from the programmer. Unfortunately, neither the structure nor the cost of using the memory subsystem of a computer or the caches on CPUs is well understood by most programmers. This paper explains the structure of memory subsys- tems in use on modern commodity hardware, illustrating why CPU caches were developed, how they work, and what programs should do to achieve optimal performance by utilizing them.
1 - 20 of 37 Next ›
Showing 20 items per page