We need to do some profiling on our project, and I decided to evaluate JetBrains dotTrace Profiler 3.1. First of all, I have tried to profile the sample application included with the tool, and got really surprised when I saw the times reported – they were “randomly distributed” in the plus-minus billions of milliseconds range :). I couldn’t believe it! Looked for a solution on Google, but first few pages of the search results proved to be totally useless.
Fortunetely, I got “enlightment” at this point – I recalled that I had problems with WPF animations on my dual core AMD Athlon64 x2 processors because of system timers – they were not in sync between cores, and GetPerformanceCounter API was returning “floating” numbers instead of non-decreasing sequence, thus causing “jumpy” animations. The solution then was to install AMD Dual-Core Optimizer (its description talks about gaming, RDTSC, etc., so it is not necessarily obvious that the thing can help with WPF :).
I went and downloaded and installed the tool again, and voilaz – nice times in the profiler! :) Now, the problem is, that I am absolutely sure that I have already installed this tool few months ago when I hit the WPF problem. So, how could it be that the tool was not working, and I had to install it again? Honestly, I don’t know… Most likely, some new drivers or system updates have disabled or otherwise damaged the tool. Which brings me to the (rhetoric?) question: how can “normal” people use today’s computers (and technologies in general) with all this complexity?
The Stanford Engineering Everywhere has launched a series of free online computer science and electrical engineering courses (10 available so far). The courses span an introduction to computer science and an introduction to artificial intelligence and robotics, among other topics, and offer anytime and anywhere access to complete lecture videos via streaming or downloaded media, as well as full course materials including syllabi, handouts, homework, and exams.
More C++ Idioms is a Wikibook aimed toward anyone with an intermediate level of knowledge in C++ and supported language paradigms. The goal there is to first build an exhaustive catalog of modern C++ idioms, and later evolve it into an idiom language, just like a pattern language.
The thing has been started by the author of C++ Truths blog. The blog is interesting by itself, as it has really many interesting articles on advanced C++ topics.
stackoverflow.com was started recently by Joel Spolsky (no intro needed, I guess), and Jeff Atwood, the author of the Coding Horror blog. It is a programmer Q&A site that offers programmers the opportunity to ask questions and receive answers from the programming community for free, and intends to become the right source of answers for any programming question. What I have seen so far looked interesting and promising.
Michael D. Crawford’s GoingWare’s Bag of Programming Tricks contains wealth of super-interesting and useful information about many things, including advanced C++ topics. Especially I would mention Sermon at the Soup Kitchen (On C++ Software Quality and Institutional Resistance to Change), Pointers, References and Values (Passing Parameters, Returning Results, and Storing Member Variables with Musings on Good C++ Style), On Refactoring C++ Code (Properly managing memory returned by transcode() in the Xerces XML Library: from memory leak to clean, leak-free exception safety), and Pointers to C++ Member Functions (A tutorial on a useful yet poorly understood language feature, useful as a cache or to enable a different sort of polymorphism).
Then, there are tens of extremely interesting articles (despite older) about advanced C++ topics on Articles by Angelika Langer & Klaus Kreft site. Areas covered include STL, Standard Library, Core C++, and IOStreams.
We use Microsoft RTC Client SDK 1.3 in our application to provide SIP telephony. Vista is not our priority, but, as all laptops and PCs nowadays come preloaded with Vista rather than XP, some time ago we decided to try our software on Vista. We’ve got everything working, except the phone – it was complaining about the RTCClient COM component. I wasted about half a day trying to “please” Vista to get RTC client running on it – checked forums, did all mumbo-jumbo things people claimed helped them – all in vain. In the end we simply abandoned the idea…
Today I decided to try it once more. And, guess what! Got it working in 10 minutes! :) All thanks to the post on MSDN Forum and then the corresponding blog post (mirror is here) by Laurent Etiemble.
The thing worked like a charm! Unfortunately, I cannot confirm if registering DLLs is a needed step – I do not have Vista near me, so I have made a script that my colleague at remote location tried on his Vista laptop and, to save time and reduce the “human-error” possibility/hassle, I included the registration part (regsvr32 for all DLLs) just in case.
Found this trick in the Jeffrey Richter’s Windows via C/C++ book (in Chapter 1). Visual Studio debugger has a very useful feature – it can monitor the thread’s last error code. You can display this error code together with its text description in the Watch window by typing $err,hr. In case some API call fails, the Watch window will show the error code (the one that would be returned by the GetLastError function). Thanks to the ,hr qualifier, the Watch window shows the error description as well (the string mentioned in the WinError.h header file for the occured error code).
My son was asking all kinds of question about human anatomy (he is 7 :), so I decided to find some interactive software that would help me to explain things to him. Pretty much by accident I bumped into Visible Body web application (still in Beta) featuring an interactive 3D model of the human body. It is, according to its developers, the most comprehensive human anatomy visualization tool available today. From what I have seen so far, it looks really cool and promising, although not all content will be available for free.
First, there is the FAQ. As Bjarne says, “This page concentrates on personal opinions and general questions related to philosophy” [of C++, I would add]. Then, there is the C++ Style and Technique FAQ that goes into C++ topics deeper. In addition, Bjarne compiled the C++ Glossary.
Clone Detective for Visual Studio allows you to analyze C# projects for source code that is duplicated somewhere else. I have not tried the tool myself yet, but the idea is really nice. One thing I do not like so far – it needs Java (yes, right, the J-word!) to run.
The tool currently supports only C#, but C++ and VB are promised too, although it is not clear when they will come. Support for these (and some other) languages is already available in the ConQAT toolkit that is used by the Clone Detective, so it might not take very long time.