http://asawicki.info/ Programming, graphics, games, media, C++, Windows, Internet and more...
My Talk in Kraków - Slides
I just went back from Kraków where I've given a talk at AGH University of Science and Technology (Akademia Górniczo-Hutnicza), at SKN Shader scientific group. The title of my presentation was "Pułapki programowania obiektowego" ("Pitfalls of Object-Oriented Programming"). Here are the slides: [PDF], [PPTX]. The presentation is new, although you could already see most of the slides at IGK conference or at Polygon scientific group.
By the way, I want to thank Koshmaar, TeMPOraL and all members of the SKN Shader for the wonderful time in Kraków. You can see several photos that I took there in my gallery on Picasaweb and a panorama photo on Panogio.
IGK Conference - My Photos
Here are my photos from 8th Polish Game Engineering Conference (VIII Ogólnopolska Konferencja Inżynierii Gier Komputerowych) IGK-8'2011 - a gallery at Picasaweb:
March 29th, Kraków - my Next Presentation
Tomorrow I go to Kraków to give a talk at AGH University of Science and Technology (Akademia Górniczo-Hutnicza). I've been invited by my friends from SKN Shader scientific group (greetings Koshmaar and TeMPOraL :)
The title of my presentation will be "Pułapki programowania obiektowego" ("Pitfalls of Object-Oriented Programming"). The event will take place at 18:30, building B1, room H24. More information is available in this entry on SKN Shader website, as well as Facebook event.
IGK Conference - Our Slides
8th Polish Game Engineering Conference (VIII Ogólnopolska Konferencja Inżynierii Gier Komputerowych) IGK-8'2011 is over so now we can publish slides from our presentation:
It's in Polish. Here is abstract of the paper:
(Polish) Artykuł opisuje wady programowania obiektowego – zarówno od strony projektowej, jak i ze względu na wydajność kodu. Porusza problem opóźnienia w dostępie do pamięci RAM we współczesnych architekturach komputerowych. Przedstawia programowanie zorientowane na dane (ang. DOD – Data-Oriented Design) jako alternatywne podejście do projektowania i implementowania silnika gry kładące nacisk na optymalizację struktur danych pod kątem szybkości. Porusza także problem wydajności poszczególnych konstrukcji języka C++.
(English) Paper describes pitfalls of object-oriented programming – from the design perspective, as well as regarding code performance. It mentions problem of latency in accessing data in RAM memory on today computer architectures. It shows DOD (Data-Oriented Design) as an alternative approach to design and implementation of a game engine focused on optimizing data structures in terms of performance. It also describes efficiency of different C++ language constructs.
IGK'8-2011 - 8th Polish Game Engineering Conference
In just an hour we're leaving for this year's 8th Polish Game Engineering Conference (VIII Ogólnopolska Konferencja Inżynierii Gier Komputerowych) - IGK-8'2011 in Siedlce, Poland. As always, I will last 3 days and include lectures, as well as a competition where we have to make a game in 7 hours in teams of 4 developers. This time me and Tomasz Dąbrowski are giving a lecture entitled "Developing Efficient C++ Code with Data-Oriented Design" (Polish: "Tworzenie wydajnego kodu C++ w podejściu zorientowanym na dane"). We also plan to participate in the competition as team "Rzeźnicy Inc.", just like in the previous year. We will have access to the Internet there, so watch this forum topic for some updates and photos. See you in Siedlce!
Static C++ Code Analysis with PVS-Studio
By the courtesy of its authors, I have a chance to evaluate PVS-Studio - a static code analyzer for C, C++ and C++0x. This commercial application is installed as a plugin in Visual Studio 2005/2008/2010. Fortunately I have Visual Studio 2008 Professional at home so I could try it with the code of my personal projects. PVS-Studio differs from other tools of this kind, like free Cppcheck, by finding three types of errors or warnings: general, related to OpenMP and 64-bit portability issues.
After opening my solution in Visual Studio, I choose a command from the special menu to analyze all the code.
A progressbar appears while PVS-Studio does the computations, utilizing almost 100% of all 4 CPU cores. Finally, a dockable panel appears with a list of found issues.
The general category warns about exact float comparison with == and stuff like that. It managed to find few places where I forgot the "&" character while passing a vector as const refefence parameter, rightly telling that it will cause "decreased performance". But its greatest find in my CommonLib library code was this unbelievable bug:
Some messages look funny. Should I code some general, abstract, portable, object-oriented, Alexandrescu-style template-based solution here just to avoid copying some code into several similar instructions? :)
I didn't check how the OpenMP validation works because I don't currently use this extension. As for 64-bit compatibility issues, I have lots of them - just because my code is not prepared to be compiled as 64-bit. PVS-Studio seem to do a good job pointing to places where fixed-length 32-bit integers are mixed with pointers, array indexing etc.
Overall, PVS-Studio looks like a good tool for C++ programmers who care about the quality of their code. Finding issues related to OpenMP and 64-bit compatibility can be something of a great value, if only you need such features.
Too bad that PVS-Studio, opposite to Cppcheck, is a Visual Studio plugin, not a standalone application, so it obviously requires you to have a commercial MSVS version and do not work with Express edition. But this is understandable - if you need OpenMP or 64-bit, you probably already use Visual Studio Professional or higher.
PVS-Studio analyzes C, C++ and C++0x. It doesn't work with C++/CLI language, but that's not a big flaw too. I use C++/CLI at work, but I can see it's quite unpopular, niche language. Its compilation or analysis would also be very difficult because it mixes all features from both native C++ and .NET. Even Microsoft didn't find resources to implement IntelliSense for C++/CLI in Visual Studio 2010.
Visual Studio 2010 Service Pack 1 Released Yesterday
Yesterday Microsoft publicly released Visual Studio 2010 Service Pack 1. It is big (1.48 GB) and the installation takes quite long. It applies to all Visual Studio 2010 versions and components, including C++ Express, C# Express etc. Here is the list of changes and here is download link (you can find link to ISO file with offline installer at the bottom of that page). There are lots of fixes and improvements, but most of them apply to managed or web technologies like Silverlight. What's interesting for a C++ programmer is the addition of intrinsics to enable the extensions on the AMD and Intel new microprocessors that will be released next year - Intel AVX and AMD Bulldozer. Microsoft also claims to optimize and fix C++ compiler. Changelist mentions fixing lots of IDE crashes, including incompatibility with AMD CodeAnalyst.
Overall I think the new SP1 for VS2010 is worth installing, unless you have "Windows SDK for Windows 7 and .NET Framework 4" installed in your system. In that case an unsolved issue would happen so you should NOT install the Service Pack.
By the way: MSDN Library - the extensive documentation of C, C++, WinAPI, OpenGL, .NET and lots of other technologies - is available for free in form of an offline application for some time, but the latest version is MSDN Library for Visual Studio 2008 SP1. Do you know how to download some newer release? Or maybe that "Windows SDK" ships with it?
GDC 2011 Tag Cloud
Today I made a tag cloud of words form titles and descriptions of GDC 2011.
To do it, I Entered the GDC website, session list, clicked on "export complete list" button and exported list to CSV file format. Next I imported the CSV file in OpenOffice Calc spreadsheet, deleted all columns except name (for the first cloud) or name and overview (for the second cloud). Then I exported this data to a CSV file again, opened in in a text editor, made all text lower-case and deleted some common words like CANCELLED using Find & Replace. Finally I pasted this text to Wordle script to create tag clouds and tweaked some parameters.