Gotcha

Xaml serialization quirks and gotchas

I recently had to build a little tool that would read its configuration from a XAML file (because XAML serialization is, most of the time, better and more customizable than standard XML serialization). The trick was that this tool had to be built on top of .NET 3.0 – not 3.5 or 4.0. And I [...]

About unit testing Maya and MStatus macros

Programmers in the video games and movies industry rarely write unit tests for all kinds of reasons and excuses, but every now and then, it happens. And it can get a bit complicated when you want to test a plug-in hosted by a 3rd party application like Autodesk’s Maya.
Setting up the unit test project
The good [...]

Writing a custom Main() method for WPF applications

Writing a custom Main() method for WPF applications

Creating a new WPF project in Visual Studio gives you the following pretty simple application markup and code:
<Application x:Class="WpfApplication2.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Window1.xaml">
</Application>
namespace WpfApplication2
{
public partial class App : Application
{
}
}
Understanding how it really works, and how [...]

Exposing global variables in IronPython

Exposing global variables in IronPython

Lately I’ve been playing around a bit with IronPython and how to embed it inside an application to add scripting features. I’m still figuring things out, but I had a hard time exposing global variables to the Python environment.
The idea was to expose a couple of .NET objects (mainly a few important managers/singletons from the [...]

Conditional operator fun

A good friend of mine sent me this little “gotcha” a few days ago, so I thought I’d share:
#include <iostream>
#include <string>

void main()
{
int a = 0;
int* ptrA = &a;
const int b = 1 ;

const int& refA1 = (ptrA ? [...]

Got burned by Vista

Got burned by Vista

These, days, I’m back doing PHP stuff at home, and therefore had to install Apache. Of course, I could do PHP under IIS7, which would be easier, what with the nice administration interface and all, but I need to recreate the same environment as my hosting solution, complete with .htaccess and all that stuff.
One of [...]