If you’ve ever used JustMock then you should be familiar with code fragments like this one: public interface IFoo { byte Bar(int i, string s, long l); } var foo = Mock.Create<IFoo>(); Mock.Arrange(() => foo.Bar(123, “test”, 321)).Returns(5); The interesting thing in this code is in the Arrange method. Its signature is as follows: public static …
Author Archives: mslavchev
JustMock Design Choices
JustMock is a small product. It is around 10,000 lines of code. Despite its small size there are a lot of decisions that were made and many others that have to be made. In this post I would like to shed some light on our decision making process and I’ll try to answer the question …
NUI or GUI or … not
Today there are a lot of devices (smartphones, tablets, handheld game consoles, etc.) with support for gestural interface. We often call such interfaces natural user interfaces (NUI). These interfaces are in contrast with the traditional graphical user interfaces (GUI). In this post I am going to share my thoughts and experience with NUI. Every software …
Thoughts on C# Compiler
In 2010 I wrote the blog post Fun with pointers in C#. Back then, I thought it was fun. Today, I am not so sure. Lets take a look at the following code fragment: using System; namespace ClassLibrary1 { public class Class1 { unsafe public void Method1(ref object* obj) { Console.WriteLine(obj->ToString()); } } } If …
The Supreme Being and Computers
Yesterday I watched the old movie Time Bandits. I would like to share a funny moment from the movie. Here is the exact quote 🙂
RVA Static Fields
In JustTrace Q1 2013 we added support for analyzing GC roots that are static fields. The implementation of this feature uses ICorProfilerInfo2::GetAppDomainStaticAddress, ICorProfilerInfo2::GetThreadStaticAddress and so on. Among all these methods, there is a very interesting one, namely ICorProfilerInfo2::GetRVAStaticAddress. In this post I am going to focus on a little known CLR feature that is closely …
JustTrace Q1 2013 SP1 is out
The last two weeks I was busy with the latest release of JustTrace. We had some hard times with JustTrace Q1 2013 release but after all we managed to fix a critical bug and we shipped SP1 after one week. There are a lot of new features in this release but I am going to …
Technical Debt
There are a lot of articles explaining what technical dept is, so why another one? A lot of smart people has written about it (see the references at the end of the post). Despite of this, technical debt seems to be a hot topic over and over again and here I put my two cents …
Profiler types and their overhead
It is a common opinion that profiling tools are slow. Every time I stumble upon this statement I ask for the definition of slow. Most of the time I get the answer that a profiler is slow when it adds more than 100% overhead. At present there many commercial profilers that are fast (according to …
It’s all about the version
Have ever you noticed that people are obsessed by versioning the things? Yep, it’s true. Today, everything has a version. Even you. I am not sure why the versioning is so important. I guess it is related to the notion of improving the things. Here is a short list of what I encounter most often …