Click here to Skip to main content

Articles by Karpov Andrey (Articles: 18, Tip/Tricks: 11)

Articles: 18, Tip/Tricks: 11

RSS Feed

Average article rating: 4.62

C / C++ Language

The Forgotten Problems of 64-bit Programs Development
Posted: 19 Oct 2007   Updated: 19 Oct 2007   Views: 23,224   Rating: 4.45/5    Votes: 13   Popularity: 4.96
Licence: The Code Project Open License (CPOL)      Bookmarked: 21   Downloaded: 0
In this article, I have discussed some mistakes connected with 64-bit C/C++ code development to Windows.
The use of the code analysis library OpenC++: modifications, improvements, error corrections
Posted: 23 Feb 2008   Updated: 24 Feb 2008   Views: 13,353   Rating: 3.19/5    Votes: 7   Popularity: 2.70
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 0
The article may be interesting for developers who use or plan to use OpenC++ library (OpenCxx). The author tells about his experience of improving OpenC++ library and modifying the library for solving special tasks.
Building systems for automatic C/C++ code logging
Posted: 1 Jun 2008   Updated: 1 Jun 2008   Views: 28,390   Rating: 4.50/5    Votes: 16   Popularity: 5.42
Licence: The Code Project Open License (CPOL)      Bookmarked: 45   Downloaded: 0
The article touches upon a method allowing you to build a system for automatic logging of C/C++ code.
A 64-bit Horse that can Count
Posted: 27 May 2009   Updated: 27 May 2009   Views: 19,444   Rating: 5.00/5    Votes: 26   Popularity: 7.07
Licence: The Code Project Open License (CPOL)      Bookmarked: 23   Downloaded: 0
The article concerns the peculiarities of Visual C++ compiler's behavior when generating 64-bit code and possible errors relating to it.
About size_t and ptrdiff_t
Posted: 19 Feb 2010   Updated: 19 Feb 2010   Views: 19,108   Rating: 4.89/5    Votes: 22   Popularity: 6.59
Licence: The Code Project Open License (CPOL)      Bookmarked: 33   Downloaded: 0
The article will help the readers understand what size_t and ptrdiff_t types are, what they are used for and when they must be used.
A Collection of Examples of 64-bit Errors in Real Programs
Posted: 20 Apr 2011   Updated: 20 Apr 2011   Views: 53,956   Rating: 4.97/5    Votes: 116   Popularity: 10.27
Licence: The Code Project Open License (CPOL)      Bookmarked: 150   Downloaded: 0
This article is the most complete collection of examples of 64-bit errors in the C and C++ languages.
How to Make Fewer Errors at the Stage of Code Writing. Part N4
Posted: 14 Dec 2011   Updated: 14 Dec 2011   Views: 5,734   Rating: 4.83/5    Votes: 12   Popularity: 5.21
Licence: The Code Project Open License (CPOL)      Bookmarked: 18   Downloaded: 0
How to make fewer errors at the stage of code writing
Lessons on development of 64-bit C/C++ applications
Posted: 3 Apr 2012   Updated: 3 Apr 2012   Views: 25,461   Rating: 4.92/5    Votes: 51   Popularity: 8.40
Licence: The Code Project Open License (CPOL)      Bookmarked: 132   Downloaded: 0
The course is devoted to creation of 64-bit applications in C/C++ language and is intended for the Windows developers who use Visual Studio 2005/2008/2010 environment.

Win32/64 SDK & OS

Optimization of 64-bit programs
Posted: 21 Feb 2009   Updated: 21 Feb 2009   Views: 24,557   Rating: 4.74/5    Votes: 25   Popularity: 6.62
Licence: The Code Project Open License (CPOL)      Bookmarked: 43   Downloaded: 0
Some means of 64-bit Windows application performance improvements are considered in the article.

Design and Architecture

20 issues of porting C++ code on the 64-bit platform
Posted: 19 May 2007   Updated: 25 Jun 2007   Views: 73,438   Rating: 4.90/5    Votes: 54   Popularity: 8.50
Licence: The Code Project Open License (CPOL)      Bookmarked: 134   Downloaded: 0
Program errors occurring while porting C++ code from 32-bit platforms on 64-bit ones are observed. Examples of the incorrect code and the ways to correct it are given. Methods and means of the code analysis which allow to diagnose the errors discussed, are listed.
Cases When a Static Code Analyzer may Help You
Posted: 27 Dec 2010   Updated: 27 Dec 2010   Views: 5,587   Rating: 4.73/5    Votes: 6   Popularity: 3.63
Licence: The Code Project Open License (CPOL)      Bookmarked: 9   Downloaded: 0
The static code analysis method is the method of searching for places in program text that are highly probable to contain errors.

Testing and QA

Security, security! But do you test it?
Posted: 12 Nov 2012   Updated: 12 Nov 2012   Views: 3,190   Rating: 4.80/5    Votes: 9   Popularity: 4.57
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
How to complement TDD with static analysis
Posted: 11 Dec 2012   Updated: 11 Dec 2012   Views: 2,562   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
TDD is one of the most popular software development techniques. I like this technology in general, and we employ it to some extent. The main thing is not to run to extremes when using it.

Work Issues

It Is Difficult
Posted: 30 Aug 2008   Updated: 30 Aug 2008   Views: 12,888   Rating: 4.55/5    Votes: 15   Popularity: 5.35
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 0
The article concerns the problem of excess of program creation terms as a result of a prejudice that programming is simple and even simpler.
Changes in Programmer Tools' Infrastructure
Posted: 27 Apr 2010   Updated: 15 Jul 2010   Views: 7,438   Rating: 4.43/5    Votes: 7   Popularity: 3.74
Licence: The Code Project Open License (CPOL)      Bookmarked: 10   Downloaded: 0
The article describes some observations concerning changes in the infrastructure of tools used by programmers in everyday work. First of all, these changes are related to the release of Visual Studio 2010.
Consequences of Using the Copy-Paste Method in C++ Programming and How To Deal With It
Posted: 23 Jan 2011   Updated: 1 Feb 2011   Views: 14,960   Rating: 4.78/5    Votes: 16   Popularity: 5.75
Licence: The Code Project Open License (CPOL)      Bookmarked: 17   Downloaded: 0
But let's try to investigate this problem closely instead of limiting ourselves to just saying "do not copy the code".

Hardware & System

AMD64 (EM64T) architecture
Posted: 26 Feb 2009   Updated: 26 Feb 2009   Views: 22,398   Rating: 4.65/5    Votes: 12   Popularity: 5.02
Licence: The Code Project Open License (CPOL)      Bookmarked: 22   Downloaded: 0
The article briefly describes AMD64 architecture by AMD Company and its implementation EM64T by Intel Company. The architecture's peculiarities, advantages and disadvantages are described.

Interviews

Interview with Dmitriy Vyukov - the author of Relacy Race Detector (RRD)
Posted: 26 Jul 2009   Updated: 26 Jul 2009   Views: 7,931   Rating: 3.75/5    Votes: 3   Popularity: 1.79
Licence: The Code Project Open License (CPOL)      Bookmarked: 7   Downloaded: 0
This is an interview with Dmitriy Vyukov - the author of Relacy Race Detector (RRD) tool intended for verifying parallel applications. In this article you will learn about the history of creating RRD, its basic abilities and also about some other similar tools and the way they differ from RRD.
No blogs have been submitted.

Average tips rating: 4.98

C / C++ Language

Change of type alignment and the consequences [Tip/Trick]
Posted: 26 Mar 2012   Updated: 26 Mar 2012   Views: 3,182   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
When porting software one of the task a developer faces is to change types' sizes and rules of their alignments
Is There a Way to Make the type size_t 32-bit in a 64-bit program? [Tip/Trick]
Posted: 2 Apr 2012   Updated: 2 Apr 2012   Views: 2,881   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 3   Downloaded: 0
Is there a way to make the type size_t 32-bit in a 64-bit program?
This intended for those who write articles and books on the subject of creating quality code or security issues [Tip/Trick]
Posted: 19 Oct 2012   Updated: 19 Oct 2012   Views: 2,251   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
Licence: The Code Project Open License (CPOL)      Bookmarked: 0   Downloaded: 0

Win32/64 SDK & OS

How can a 32-bit program detect that it is launched in a 64-bit Windows? [Tip/Trick]
Posted: 21 Mar 2012   Updated: 21 Mar 2012   Views: 4,642   Rating: 5.00/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 13   Downloaded: 26
A 32-bit program can find out if it is launched in WoW64 with the help of the IsWow64Process function.
Why does WoW64 use register and file system redirection? [Tip/Trick]
Posted: 22 Mar 2012   Updated: 22 Mar 2012   Views: 4,739   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
So, why does WoW64 employ the mechanism of redirecting the register and file system instead of simply assigning the obsolete register keys and "%windir%\system32" to 32-bit applications and allowing 64-bit applications to define new keys and use, for instance, "%windir%\system64" for 64-bit system l
Warning C4267 in the expression unsigned n = str.find(substr) [Tip/Trick]
Posted: 25 Mar 2012   Updated: 25 Mar 2012   Views: 2,340   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 2   Downloaded: 0
When porting 32-bit code on a 64-bit system, Visual C++ compiler may generate a lot of warnings
What advantages do 64-bit processors have over 32-bit ones? [Tip/Trick]
Posted: 27 Mar 2012   Updated: 27 Mar 2012   Views: 5,529   Rating: 5.00/5    Votes: 1   Popularity: 0.00
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
There are 3 most obvious advantages of 64-bit processors over their 32-bit counterparts
Why A + B != A - (-B) ? [Tip/Trick]
Posted: 1 Apr 2012   Updated: 1 Apr 2012   Views: 5,925   Rating: 4.85/5    Votes: 5   Popularity: 3.49
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
While developing analyzer intended for detecting 64-bit errors, I sometimes encounter interesting ways of code behavior

Bugs & Workarounds

What is sizeof(&X) expression equal to, X being defined as "char *X[n];"? [Tip/Trick]
Posted: 9 Apr 2012   Updated: 9 Apr 2012   Views: 3,302   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0

Parallel Programming

Use of rand() in OpenMP parallel sections [Tip/Trick]
Posted: 28 Mar 2012   Updated: 28 Mar 2012   Views: 2,816   Rating: 5.00/5    Votes: 2   Popularity: 1.51
Licence: The Code Project Open License (CPOL)      Bookmarked: 1   Downloaded: 0
The error consists in the fact that every parallel thread has its own seed and if no special initialization is carried out, rand() function will return the same value in all the threads.

Programming Tips

Static code analysis [Tip/Trick]
Posted: 11 Mar 2012   Updated: 11 Mar 2012   Views: 10,091   Rating: 5.00/5    Votes: 3   Popularity: 2.39
Licence: The Code Project Open License (CPOL)      Bookmarked: 12   Downloaded: 0
Static code analysis is the process of detecting errors and defects in software's source code.

Karpov Andrey
Architect Program Verification Systems, Co Ltd
Russian Federation Russian Federation
Member

Andrey Karpov is technical manager of the OOO "Program Verification Systems" (Co Ltd) company developing the PVS-Studio tool which is a package of static code analyzers integrating into the Visual Studio development environment.

PVS-Studio is a static analyzer that detects errors in source code of C/C++ applications. There are 3 sets of rules included into PVS-Studio:

  1. Diagnosis of 64-bit errors (Viva64)
  2. Diagnosis of parallel errors (VivaMP)
  3. General-purpose diagnosis

Awards: MVP, Intel Black Belt

Andrey Karpov is also the author of many articles on the topic of 64-bit and parallel software development. To learn more about the PVS-Studio tool and sources concerning 64-bit and parallel software development, please visit the www.viva64.com site.

Best Articles:

My page on LinkedIn site: http://www.linkedin.com/pub/4/585/6a3

E-mail: karpov@viva64(dot)com


Advertise | Privacy | Mobile
Web04 | 2.6.130523.1 | Last Updated 24 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid