Online materials from my Expert Days sessions

Saturday, December 29, 2012

Thanks for those who participated in my sessions in Expert Days! I hope you enjoyed it. For your benefit and also for everyone else that didn’t participated, I uploaded all the materials online so you can browse whenever you want. You can find all the materials here. In the above link you’ll find the following files: For the “C# in Depth” session you’ll find: The presentation All the demos (except for the Roslyn project demo) The Roslyn project demo For the “Software Quality –...

Test driving interactions using Async and Await

Saturday, September 15, 2012

From time to time I encounter a problem that seems pretty straight-forward to implement without TDD, but very cumbersome to do with TDD. Most of these cases have something in common: they describe interactions between the tested component and external parties. These external parties can be either the user, external system, or any kind of communication protocol. Here’s the simplest example I could think of: This is a simple console application that asks the user for his name, and then greets him with “Hello, “, followed by his name. Writing this application takes exactly 3...

ATDD with MS-Test or NUnit

Tuesday, May 29, 2012

Normally ATDD and BDD are associated with special tools that allow non-developers like business people and testers write or at least read tests, without having to write code. Examples of such tools are FitNesse, M-Spec, SpecFlow, Cucumber and more. However, even though these tools allow to specify tests scripts without code, often for business analysts these tools are too technical, or they just don’t have the mindset to specify tests in a well-structured “Given-When-Then” format. About two years ago, the core group in Retalix tried to adopt ATDD using FitNesse, where the BA’s (Business Analysts)...

AOP with PostSharp

Wednesday, March 30, 2011

Recently I listened to show #640 of .Net rocks on which Carl and Richard talk with Gael Fraiteur about PostSharp and AOP in general. In the past I heard about AOP (Aspect Oriented Programming), but it was in the context of AspectJ which is for Java, and in general it appeared to me more of an academic or esoteric thing rather than something I really like to try and even actually use it. But that show raised my interest in that subject a lot and so I took a look at the PostSharp website which contains very clear explanations...

Taking OO with C# to the extreme: decoupling from the basic value types

Tuesday, December 28, 2010

Hi, Did it ever happen to you that you hit a problem that you couldn’t solve, and even you’re convinced that it’s impossible, but then just by telling about it to someone you find the solution? I’m sure you did, it happens a lot. A boss I once had used to call this phenomenon “talking to a glass of water”: it would as well be a glass of water that you’re talking to for finding the answerJ Anyway, the reason I’m talking about this phenomenon is that I started to write this post with the following title: Frustrating limitations of C# with...

Elegant solution for the recursive iterator

Tuesday, December 21, 2010

Update: I attached the sources to this post. Hi again,As I mentioned in the earlier post, while I wrote it I realized that even though I can use recursive iterators, I must iterate though all the “child” elements from the parent iterator, which makes the algorithm less efficient (e.g. O(n*logn) instead of O(n)). On the other hand, when I tried to write the same algorithm without recursion I ended up in a pretty cumbersome and ugly code compared to the recursive version. I didn’t see a good reason why the C# design team couldn’t make it possible to “yield” another enumerator....