Is C++/CLI a Second Class Language with Microsoft?

The post frequency on the Visual C++ team blog is reasonably high. Some posts deal with new features that were added to VC++ 2008. But, is Visual C++ a second-class citizen in the Visual Studio product group?  Recently the Visual Studio 2008 Product Comparison was released (don’t ask me why it wasn’t released at the same time as the products…).  In the product comparisons VC++ Express has an inordinate number of features that only it doesn’t have.  When you look at the Visual C++ 2008 Express Edition product sites, it seems pretty clear that it’s geared towards native-only software development.  Despite this … Continue reading Is C++/CLI a Second Class Language with Microsoft?

"Object is currently in use elsewhere" error.

I was debugging what I thought was a strange exception the other day.  The exception was an InvalidOperationException and the message was “Object is currently in use elsewhere”.  Unless you’re familiar with this exception, it really doesn’t offer much as to why the exception is occurring.  There seems to be several stale threads on the Web about this issue, so I’d thought I’d post about it. As it turns out it had to do with some code that was PInvoking some native graphics functions and the interaction with the WinForm that was hosting the drawing surface was to blame. What’s … Continue reading "Object is currently in use elsewhere" error.

Observation as Scientific Proof

A while ago I had a bit of a rant about how some people seemed to think “working” only needed to be concerned with <99% of the time. Lately, I’ve been seeing a few bright people talk about how observation of something is proof of something else.  It’s a logical falalcy that observation of something working means it works in all circumstances.  Only the opposite is true, observation of something not working is proof that it doesn’t work in certain circumstances.  Yet, these people use it to justify or validate specific logic or API usage.  It’s a bit scary. I … Continue reading Observation as Scientific Proof

Formatting/parsing for a specific culture redux

In recent blog post I detailed how creating a culture via the CultureInfo constructor could actually create a user-overridden culture–which could be completely different than the culture that you’ve requested by name.  Fortunately there’s a way of overriding the user override (apologies for overloading “override”) by supplying the boolean value “false” in a CultureInfo overload. As Greg Beech commented, there’s another method to create a culture–System.Globalization.CultureInfo.CreateSpecificCulture.  This sounds like it does exactly what you might expect and creates a “specific” culture.  Unfortunately, this method too violates the principle of least astonishment and creates a culture that uses the user-overridden values when the culture … Continue reading Formatting/parsing for a specific culture redux

BDD vs TDD.

  Seems like an innocent question: which is better behaviour-driven development or test-driven development. It’s a trick question.  I don’t think either is better, they’re related but orthogonal. Object-oriented programming at the design level deals with the abstraction and encapsulation of behaviours and attributes.  At the lowest level that’s creating classes to model “real-world” object.  That’s a pretty shallow or one-dimensional view of OO.  Methodologies like Agile attempt to keep the stakeholders involved throughout the development process.  The difficulty with that has been the tendancy of software developers to completely abstract themselves at the macro level from the stakeholders: “You … Continue reading BDD vs TDD.

Compilation of LINQ Expressions and Separation of Concerns.

I was reading Rico Mariani’s latest performance quiz (#13) involving compilation of LINQ expressions.  One point that I got from his comments on the solution is that swapping to/from compiled queries is likely to cause the code to “break even very easily”.  So, you end up making the decision to compile or not not based on observed metrics but: is there any re-use at all how much uglier is the compiled code pattern and is the benefit worth the hassle Completely valid; and considering the savings you get, probably a fairly benign decision. But, there’s more object-oriented ways to approach … Continue reading Compilation of LINQ Expressions and Separation of Concerns.

Why is immutability important.

There’s been some discussion about the adding the ability for immutable types in a future CLR and C# (I assume other .NET languages in the same timeframe would follow suit; but, to be honest, I don’t follow the other popular ones).  But, some of you are wondering, “why?” Is this simply just an off-shoot of C++’s “const”?  Not really.  The proposed immutabilities would be compile and run-time enforced.  C++’s const can be casted-away. There’s a few techniques to writing thread-safe/concurrent/parallel code, amongst them: messenging and locking/synchronization.  Messenging works because each thread is supposed operate on a copy of the data … Continue reading Why is immutability important.

Microsoft Symbol Server EULA Circa VS 2005

TERMS OF USE FOR MICROSOFT SYMBOLS AND BINARIES These Terms of Use govern your access to and use of computer files obtained from Microsoft Corporation (“Microsoft”) via the Internet (collectively, “Files”).  By clicking on “Yes” below or by accessing or using any Files, you agree to these Terms of Use.  If you do not agree, then you may not access or use any Files.  These Terms of Use also govern any support services that Microsoft may provide in connection with Files.  You can find a copy of these Terms of Use at http://www.microsoft.com/whdc/ddk/debugging/symsrvTOU2.mspx. 1. Ownership, License and Limitations.  All Files … Continue reading Microsoft Symbol Server EULA Circa VS 2005