Gamasutra: The Art & Business of Making Gamesspacer
A sample collection to aid in studying typical misprints and mistakes in C/C++ programming
Printer-Friendly VersionPrinter-Friendly Version
View All     RSS
April 16, 2014
arrowPress Releases
April 16, 2014
PR Newswire
View All
View All     Submit Event





If you enjoy reading this site, you might also want to check out these UBM TechWeb sites:


 
A sample collection to aid in studying typical misprints and mistakes in C/C++ programming
by Andrey Karpov on 10/19/12 10:09:00 am

The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.

 

This post is intended for those who write articles and books on the subject of creating high-quality C/C++ code or security issues. While studying various projects with the help of the PVS-Studio static analyzer, we have gathered a relatively large database of error samples. I suppose this database will be of use and much interest to some authors.

The link to the error samples collection: http://www.viva64.com/en/examples/

The database looks quite plain and is not rich in decorations. But the samples are cut out manually and edited so that one could easily understand them.

Of course, far not all the errors detected in a certain project are added to the database. It's difficult to understand while looking through someone else's project whether or not there is an error in a certain code fragment. You'd better skip such fragments about which you are not sure. However, we've gathered a lot of examples which can be used in studying error patterns.

It has happened so that the PVS-Studio analyzer is good at detecting various misprints or Copy-Paste-related mistakes. To understand what I mean, please have a look at these error samples detected by the V501 diagnostic. There are naturally other diagnostics detecting similar errors. I'm writing this to show you the way the collection can be used. Studying misprints and Copy-Paste errors you may work out a new programming style, give useful tips, improve coding standards and so on. So, I hope you will find this collection useful in preparing your articles and books.


Related Jobs

Treyarch / Activision
Treyarch / Activision — Santa Monica, California, United States
[04.16.14]

Production Coordinator (temporary) - Treyarch
Vicarious Visions / Activision
Vicarious Visions / Activision — Albany, New York, United States
[04.16.14]

Senior Software Engineer-Vicarious Visions
Telltale Games
Telltale Games — San Rafael, California, United States
[04.15.14]

Senior Platform Engineer (Xbox One & PS4) @ Telltale Games
Nintendo of America Inc.
Nintendo of America Inc. — Redmond, Washington, United States
[04.15.14]

Associate Software Support Engineer






Comments



none
 
Comment: