Oren Eini

CEO of RavenDB

a NoSQL Open Source Document Database

Get in touch with me:

oren@ravendb.net +972 52-548-6969

Posts: 7,654
|
Comments: 51,282
Privacy Policy · Terms
filter by tags archive
time to read 1 min | 101 words

For the last two weeks or so, I've a problem with VS.Net that drives me crazy.

VS hangs when I stop debugging, this happens around 30% of the time, on two of my computers, both of then when doing NHiberante Query Analyzer work.

The CPU usage goes to 100% and the whole process just freeze. I'm going to install the new version of Process Explorer and see if I can find what is the offending thread and to what library it belongs. I suspect an add-in, but I can't find which.

time to read 3 min | 490 words

Sometimes, being lazy is its own reward. Too many times, when I need to finish a task, I just go ahead and implement it. I usually manage to complete those tasks, but sometimes it's ugly or inefficient. Sometimes, the task seems impossible.

 A case in point is trying to build the NHibernate mapping GUI. NHibernate uses xml files for configuring the mapping options, and the mapping schema is over 1000 lines of complex xml.

At first, I just read the docs and tried to implement the UI. That worked, but there were a lot of things that I didn't support or only supported, and any change would cause me great pains.

Then I thought about first doing the model in code and then mapping it to the UI, that would've worked, but it would have required me to rebuild the mapping schema in code and again, any change would've cause pain.

I thought about code generation, and just when I decided that I don't want that because it would be harder to write the code generation code as it would be to write the code once (as I don't suppose that the mapping schema would change very often).

And then I remembered Xsd.exe, this is a tool that takes xml schema and convert them to code that can be XML - Serialized. I tried that, and it seems that I'll only need to write a mapping from the UI to XML serialization and that would be it. Further more, I would probably be able to do that for other schemas as well. I might lose something in the process, because I would lose the knowledge that a class element is more than just a string, but I think that this is a problem that would be much easier to solve than the first one.

Do you know that feeling when you have everything suddenly fall down together just the way it should be? That is how it's feeling now; it's just very natural to code this way.

Now, it's certainly not perfect, and there are several cases where I need to edit by hand, but xsd.exe did 99% of the work.

Apparently NHibernate mapping is complex enough that you cannot use the output from Xsd.exe directly, you would get exceptions from XmlSerializer. I consider this a bug in XmlSerializer, btw. The problem is specifying one element or more, which NHibernate does using this format:

<xs:sequence>

     <xs:element ref="column" />

      <xs:element ref="column" maxOccurs="unbounded" />

</xs:sequence> 

And Xsd.exe translate to:

public column column;

[System.Xml.Serialization.XmlElementAttribute("column")]

public column[] column1;

 

Then the XmlSerializer complains about 'column' already defined in this scope.

I solved this by removing the column variable, but I don't think that this should be the way to go.

In the meanwhile, I'm going to post it both to Microsoft and NHibernate, and see what come up.

But this is the first approach I've tried that took me so far, so fast.

 

 Robert A. Heinlein wrote a book about it in "Time Enough For Love"

time to read 1 min | 69 words

Yes, I finally joined the proud masses of amature photographers. The camera that I got is Canon PowerShot A-95.

Prepare to be attacked with photos (actually, I'll create a photo blog, just as soon as I discover how I can do this easily with my host) in the meantime, here is my dog, with the original name: Sheleg (snow in Hebrew).

time to read 1 min | 124 words

I'd managed to remove on of my laptop keys during normal activity (the F), so I thought, what the heck, I'll just put it in, just like I do in normal keyboards.

But it seems to be above me, furthermore, it seems to be above the lab I took the laptop today. I'm going to get a replacement keyboard. Because of one key. On the one hand, I'm never against getting new stuff, OTOH, it seems ridicilous that I would need to change my entire keyboard because neither I nor the lab can put a key back in place.

Furthermore, I know that this is easily possible.

time to read 1 min | 176 words

I can't make up my mind about how to create the Hbm Editor. I tried to create a normal data-entry GUI, but that was very complex, both in code and in terms of usablity.

I'm currently thinking about doing a different approach, here are the options:

This is what I've now, I'm not very happy with this though, it's not so clear what is going where, and the code is absymal, to say the least.

This is a mock of the interface that I dream, basically, you get to configure the Hbm file using the tree on the left side (using context menu options) and then you can see it as text on the screen. A natural step would be on-the-fly parsing & displaying on the tree.

What do you think? Which do you prefer? I'm leaning toward the second option, but I want your opinions.

Screeching Halt

time to read 1 min | 108 words

I've a 2.8 HT P4, 1Gb RAM, and sometimes I feel that I'm still on my old P133+16Mb.

The computer is just sloooow. I've long known that the answer it Norton Anti Virus, I can see it doing all sort of IO at all times, slowing the entire system down. Killing navw32.exe and restarting it works wonder for overall system performance.

I've had enough. As of this moment, I've disabled Norton Anti Virus Auto Protect on my computer, I'm behind Firewall & NAT, so I'm not really worried, but I'll try it out and see how it looks.

time to read 2 min | 229 words

An interesting post from Mitch Denny:
 HOWTO: Scale-out your blog reading.

I'm currently subscribe to ~300 Blogs, and I read them almost exclusively during weakends (it translate to ~500 posts). The main reason I use blogs is to see what is happening in the industry while I'm away. This mean that I read most of those blogs.

Now, I'm interested in a quite a few subjects, but quite a few of the posts aren't really interesting, things like Web Services or SOA bore me because I didn't try them yet, so I skip them.

What I would really want is some sort of bayesian rating system, so I can rate posts 1 to 5, and then just ask my aggerator to show me them in highest ranking order. It would work both for posts and for blogs, a blog with high post rankings will get higher ranking boost even for a message that I wouldn't normally read, and a blog with consistent low ranking would have low ranking even for an "interesting" items.

I think that it should be possible with a plug-in for RSS Bandit. I may pick that project when I'm done with NHibernate Query Analyzer if no one else does.

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. API Design (10):
    29 Jan 2026 - Don't try to guess
  2. Recording (20):
    05 Dec 2025 - Build AI that understands your business
  3. Webinar (8):
    16 Sep 2025 - Building AI Agents in RavenDB
  4. Production postmorterm (2):
    11 Jun 2025 - The rookie server's untimely promotion
  5. RavenDB News (2):
    02 May 2025 - May 2025
View all series

Syndication

Main feed ... ...
Comments feed   ... ...