I have a PhD in Human-Computer Interaction and am currently working both as a software engineer at iMotions and as a postdoc at the Technical University of Denmark (DTU). This blend of research and development is the type of work which motivates and excites me the most. Currently, I am working on a distributed platform which enables researchers to conduct biometric research ‘in the wild’ (outside of the lab environment).
As part of my previous research, I developed a fully functional system (called Laevo), exploring an alternative to the prevalent, antiquated, desktop computing paradigm. This work (and related publications) contributes to a line of research called ‘activity-centric computing’.
I have almost 10 years of professional software development experience. Prior to academia, I worked for several years as a professional full-stack software developer at a game development company in Belgium: AIM Productions. I immediately started working here after a successful internship concluding my bachelor degree (obtained in 2007). My job entailed working on interactive hometrainer software and other multimedia applications. This spiked my interest in user interface development. I liked the work and colleagues at the company too much to give up entirely for further studies, so I decided to combine the two. In 2009 I started studying for my master in Game and Media Technology at the University of Utrecht in the Netherlands, from which I graduated in 2012.
In you last blog post, static locals, you mention “I have yet to find a language which supports the same, but with instance lifetime.” Visual Basic 6 supports this feature. I have to say, this is a language feature that I miss dearly as it solved so many messy little “flag” problems.
As far as I know VB6 only supports static locals? Not the same behavior with instance lifetime, as I describe in more detail later in the post and which I call ‘function private’.
public interface IMyInterface { }
public class MyClass : IMyInterface
{
public MyClass()
{
Name = “MyClass”;
}
public string Name { get; set; }
}
public class Result where T : class, IMyInterface, new()
{
public T Value { get; set; }
}
public class SomeService
{
public Result Create() where T : class, IMyInterface, new()
{
return new Result { Value = new T() };
}
}
I enjoyed reading your posts on delegates. I was wondering if you could help me figure out how to create a delegate for this scenario. I need to create a delegate for the Create() method of SomeService. This information is known at compile time. Type ‘T’ is an unknown type and is represented by the class ‘MyClass’. I’m having trouble creating a working delegate for the Create() method because of the Result return type and the generic type constraints. Any help would be greatly appreciated.
Thanks in advance, Bob
Which exact post are you referring to? I wrote up a post on delegates specifically for ‘unknown types’. You need to introduce down casts for this to work. https://whathecode.wordpress.com/2011/05/25/creating-delegates-during-reflection-for-unknown-types/
I’m referring to both of these posts:
https://whathecode.wordpress.com/2011/05/25/creating-delegates-during-reflection-for-unknown-types/
https://whathecode.wordpress.com/2011/05/30/creating-delegates-during-reflection-with-unbound-instances/
Yes, I’m trying to use down casts, but like I said, I’m having trouble creating a working delegate for the Create<T>() method because of the Result<T> return type and the generic type constraints. Any help would be greatly appreciated.
Thanks in advance, Bob
From the top of my head, can’t help you out there. An exact description of what ‘trouble’ (which exception?/behavior?) would also be useful. Try Stack Overflow, it also allows for better code formatting.