Ayende @ Rahien

Oren Eini aka Ayende Rahien CEO of Hibernating Rhinos LTD, which develops RavenDB, a NoSQL Open Source Document Database.

You can reach me by:


+972 52-548-6969

, @ Q j

Posts: 6,858 | Comments: 49,164

filter by tags archive
time to read 2 min | 213 words

First, we have the implementation of the SendPropertyChanged method, can you spot the bug?

protected virtual void SendPropertyChanged(String propertyName)
	if ((this.PropertyChanged != null))
		this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

Then, you have:

public string CustomerID
		return this._CustomerID;
		if ((this._CustomerID != value))
			this._CustomerID = value;

And this:

public Customer Customer
		return this._Customer.Entity;
		Customer previousValue = this._Customer.Entity;
		if (((previousValue != value) 
					|| (this._Customer.HasLoadedOrAssignedValue == false)))
			if ((previousValue != null))
				this._Customer.Entity = null;
			this._Customer.Entity = value;
			if ((value != null))
				this._CustomerID = value.CustomerID;
				this._CustomerID = default(string);

Both properties show exactly why I despise code generation as an architectural approach.

Instead of taking the appropriate route, and actually solving the problem at hand, they just threw code at it until it looked like it worked.

time to read 3 min | 450 words

After I got some input from Scott Allen about my Rule Engine post, I took a look at PolicyActivity.

Take a look at the image, my commentary is below it:


Can someone please explain me who thought about this idea? When you get something like that, how are you supposed to actually look at this and figure out what is going on? You have no way to look at it and get an idea about what is going on in there. You have to go and look at those sub rules one by one.

For that matter, take a look at the text boxes here. You want me to write code there? There is actually intellisense on those text boxes, which scares me to no end.

How am I supposed to be able to get an idea on what is going on here? An overall view, not just inspecting a single leaf of grass at a time.

How am I to do code review on that? For that matter, how am I going to use source control with that. The answer, sadly, is again, binary source control. No diffs for you, nasty spoiled code driven developer. Take a look at this snippet.

	<RuleExpressionCondition Name="{p3:Null}">
			<ns0:CodeBinaryOperatorExpression Operator="ValueEquality">
							<ns1:Int32 >1</ns1:Int32>

I actually had to cut some name space definitions from there, just to make it fit the screen.

Now, please guess what this translate to. Imagine a slightly more complex rule, and then try to do a diff on the changes when someone modify it.

I am waiting to be educated how this is a good thing.

time to read 1 min | 192 words

Just spiked a test implementation on an Event Broker (similar to the CAB), basically support for loosely coupled events / commands. Took about... 40 minutes :-)

My understanding of the functionality in the CAB is based around:

  • [EventPublication], [EventSubscription]
  • [CommandHandler]

As far as I can see the separation between the two is main artifical, and based on whatever this is your code or a third party. Since both rely on events as the underlying mechanism, I don't see a reason to separate them out.

Biggest issue: string equality is a bummer.

I might do a live coding screen cast, showing how it can be done. Tried it now, but it is 2:28 AM right now, and I sound like a drunk sailor. I got tired of apologizing of slipping to Hebrew, and cut the recording.

That 40 minutes mark is starting to freak me, to tell you the truth...

time to read 2 min | 245 words

Can someone please make sense of the following statement? (Found here, on the LINQ Chat log):

Q:What is the key difference between ADO.NET Entities and LINQ 2 SQL?
A: LINQ to SQL is an ORM over your relational database schema plus some mappings. LINQ to Entities is an ORM over a conceptual object-less model (ERM) that is a mapping over your relational database schema.


Q: Is there still an effort to integrate LINQ to SQL and LINQ to Entities?
A: There is an effort on going to align these products, but not to integrate them together.

Can someone please explain me the business sense behind the decision to push two (and let us not forget Linq For DataSet, which I haven't heard about lately) competing frameworks that does the same thing? Can anyone come up with a good explanation for the use cases where I would want to use one and where I would want to use the other?

This has a positioning conflict written all over it.

time to read 2 min | 205 words

Take a look at this:

One of the coolest new capabilities we're building for Enterprise Library v3 is the Application Block Software Factory. As its name ever-so-subtly suggests, this will be a software factory for building your own application blocks.

For some unknown reason, I was strongly reminded of this:

When we stepped back and looked at the global tool infrastructure, we determined that people were frustrated with having to manage and operate a hammer factory factory, as well as the hammer factory that it produced. That kind of overhead can get pretty cumbersome when you deal with the likely scenario of also operating a tape measure factory factory, a saw factory factory, and a level factory factory, not to mention a lumber manufacturing conglomerate holding company.

And that is all I am going to say about it today.

time to read 1 min | 94 words

So, I have trouble with my adsense account, I am doing the right thing by hitting the support pages and actually reading them, but they aren't helping my issue. Therefor, I decide to contact Google's support. I use their own support page, and send an email.

(Image from clipboard).png

I was surprised to get a response almost immediately, the problem is that I wasn't pleased with their message...

(Image from clipboard).png


time to read 2 min | 214 words

So, I had a bug today in my application. It wasn't configured correctly and it triggered a fault in another system that caused that system to start outputing invalid results about once a second. The invalid results triggered a rejecting reaction in my application, which was considered invalid by the second application, and so on.

So, after I fix the bug, I tell the person responsible that they should take an action to reject the invalid action on my system should it happen again. The action is marked "invalid", and it is something that will only go his way because something very wrong happened (but it must happen, since otherwise the app will swallow the error and no one will know about it).

His response is: "That is not an applicative concern. If you application would work right, there is nothing to worry about."
Me: "We took down production for two days because we couldn't find what the issue was because there were too many issues."
Him: "I don't want to taint my application with stuff that is not a business concern."

I am all for focusing on the domain, but that is pushing it.


No future posts left, oh my!


  1. Production postmortem (26):
    07 Jun 2019 - Printer out of paper and the RavenDB hang
  2. Reviewing Sled (3):
    23 Apr 2019 - Part III
  3. RavenDB 4.2 Features (5):
    21 Mar 2019 - Diffing revisions
  4. Workflow design (4):
    06 Mar 2019 - Making the business people happy
  5. Data modeling with indexes (6):
    22 Feb 2019 - Event sourcing–Part III–time sensitive data
View all series



Main feed Feed Stats
Comments feed   Comments Feed Stats