Posts Tagged ‘tuesday.today.jaoo.dk.featured’

Ayende interview

Friday, October 2nd, 2009

Mogens Heller Grabe, Software Pilot at Trifork, has talked with Oren Eini (also known as Ayende Rahien) of .Net Open Source fame, responsible for Rhino Mocks and NHibernate.

Could you start out by introducing yourself in your own words?

I am a consultant, mainly working on development & architecture. I have the NHibernate Profiler as a sideline, something that I had to build for myself and turned out useful enough to make other people pay for it. I have been working in the software development field for 10 years now, and have been working professionally in software development since 2005. I am a member of several large open source projects, NHibernate, Castle, Rhino Mocks, and the general Rhino Tools stack. I maintain an active blog about software development, practices, NHibernate and general architecture advice.

That’s quite a professional profile… but what do you do when you’re not in front of a computer?

Mostly, I am reading – I read voraciously! Movies, sometimes, if they are good and worth actually going to the theater for them. One of the best decisions that I made was NOT spending time watching TV! – you would be amazed how much free time that gives a person.

Interesting – and, two years ago when you presented on the Enterprise .NET track at JAOO, you mentioned in an interview that you had a dog…

Yes, she is actually my parents dog, which work out great in practice, since I am traveling a lot.

What breed is she?

She is a caucasian shepherd, so she is BIG! About 70 CM in height and over 60 Kg. She is lovely!

Fantastic! Let’s continue talking about animals – you seem to have a thing with rhinos… could you elaborate a bit on that?

(Laughs) Rhinos are… an accident, actually… In 2004, I was building my site, and I wanted a logo. I downloaded a trial copy of Photoshop and started playing with it, took me the whole 30 days to get something working, but eventually I had something that I liked, but I had too much empty space. So I tried to think what to put in the empty space. I thought about using a dragon head, or a wolf, but both of them are banal. I decided to use a rhino. I think they are cool, and no one else is using them. And the rest is, more or less, history. About a year later, I was working on what will become Rhino Mocks, and needed a name. I decided to name it Rhino Mocks while staring at my logo. Afterward, when I created the Rhino Commons project, it became a pattern. When I wanted a logo for Rhino Mocks and NH Prof, it was obvious that I would use a rhino. The entire logo evolution, by the way, is described here.

So did the rhino tattoo come before or after this? I saw on Twitter that Krzysztof Kozmic had noticed the rhino tattood on your arm…

I got the tattoo this year. I wanted one for a while, and it was obvious that I would have a rhino tattoo. One thing that people keep missing is that there is a distinction about the logo ownership. The rhino is my logo, also used by NH Prof & Rhino Mocks, but I consider it mine, not something specific for a product. It is funny, my house has a lot of orange in it. And NH Prof is pretty much reflecting the website. Both of those are based on decisions that I made years ago without any thought at all. Interesting consequences.

I see… suddenly a pattern emerges, but perhaps guided by something subconscious… an obvious question, then, is: do you somehow see any of your own characteristics reflected in rhinos?

I don’t think that I qualify to comment.

I was thinking that rhinos are stubborn, and possess great force… your logo is not a cute puppy, it’s a rhino!

There is a saying in Hebrew, it can’t really be translated (Biblical Hebrew), but it basically says: “You can’t be your own character witness.” Oh, and you CAN get a cute rhino – but that isn’t my logo.

(Oren sends me this picture of a cute baby in a rhino costume with a big horn in the forehead)

That’s a cute rhino…

I don’t go for cute in the way I see myself.

Great… so, one thing I am constantly wondering, is, how did you end up on the .NET stack?

By accident, actually. I majored in Computers (not development, computers) in High School. We learned Pascal, and I remember being absolutely stumped with dynamic memory management. It was utterly incomprehensible. If you need more memory, just allocate a bigger array, no? That was about the time that I tried Java, which was in the big Applet phase. I wasn’t very good (to say the least) and Java wasn’t very good, so it was a bad match all around. In 1999, I had what I still consider my best investment, a C++ course. It was at the height of the bubble, and I thought that I would spend a month learning and come out and make big bucks. The course lasted a year, and was very detailed. Going from C to C++ and covering everything along the way. This time, I got pointers. In fact, I still can’t figure out that I couldn’t get it previously. That gave me a great foundation in understanding how computers really work. But I didn’t get to utilize my knowledge at the time, I was drafted to the army had to take a hiatus from dealing with software all the time. When the Alpha of .NET came out, it was natural for me to try it, since I was doing Visual C++ 6.0 at the time. I didn’t like it much (ran into a stupid bug that I created and decided that the Alpha was broken, a classic case of select() is broken). But by the beta, I was able to get how it works, and it was so much nicer than managing memory manually. I remember comparing a NullReferenceException stack trace to a C++ 0x80004FA error and deciding right then and there where I wanted to work. The rest, I think, is history.

Wouldn’t argue with that decision :) but what was it about Java that did not attract you that much?

Think about when I was using it: It was 1996/1997. I was a REALLY BAD VB developer, and aged around 15/16. I lacked basic understanding of anything but point & click. That impression stuck for a few years. There is another consideration though. At the time, I was doing a LOT of client side work, building windows apps. VB 6.0 made it easy, VC++ was hard but possible. C# made it really easy. But Java was just too hard for client programming at the time for me.

So what is your opinion on the current state of .NET? I mean, with Microsoft seemingly more and more becoming involved in open source.

That is a complex question, because it touches on a lot of different aspects. From maturity level, I think that we are now at a level comparable to Java. From available software, community and acceptance. I still remember the argument about “let us use .NET”, or how much we worried about bundling the .NET runtime with our applications. Or having to port projects from Java because there was nothing comparable in .NET and then getting resistance for using them over whatever Microsoft was doing. I think that overall the architecture practices have changed, giving way to additional considerations and broader acceptance of tools, method and practices. I think that we are on a tipping point right now, with regards to the OSS usage in the .NET ecosystem.

I see. I’m tempted to ask you about your opinion on the ADO.NET Entity Framework?

I will tell you what I told the EF team.

Yes?

If they could make it so it fulfills the same needs as NHibernate, it would mean that I wouldn’t have to work on NHibernate anymore. They aren’t there yet, and looking at their progress, they aren’t going to be there in the foreseeable future. The foreseeable future is the next 4 years, by the way. There is also the worry of what is the vNext data access method from Microsoft. They generally replace it every two to three years.

So, in a way it would be a relief if MS were to build a fully featured ORM that one could use instead of NHibernate… but aren’t you the least bit annoyed with the fact that they go and build their own ORM from scratch, instead of supporting an existing very mature ORM? I mean considering all the work you, Fabio and many other have put into it?

If they could make it good enough for me to use, it would be great. It would be something that I wouldn’t have to put effort in to make it work, yes. There are other considerations (such as velocity), but they aren’t major at the moment. I would have loved to see MS adopt NHibernate, in the same sense that the Java community adopted Hibernate and then basically standardized that. I don’t see it happening, though. One good thing that came out from Microsoft pushing multiple OR/M products is that it basically killed the “OR/Ms are dangerous” arguments.

True… great answer… sometimes, though, you are mentioning databases other than relational ones… do you see the .NET world adopting e.g. document oriented databases in a near future?

I have a lot of interest in the non relational database, specifically key/value stores and document databases. The main factor that leads you to use a RDBMS is their pervasiveness – they are everywhere, and they can do a lot. As it stand today, you need a reason NOT to use an RDBMS. Usually, the decision tree that I have in my head goes like this: 1) use RDBMS, 2) give me reasons not to use one. I see a lot of non relational databases used in niche scenarios. Scaling is a good example, we have a single feature and we want to be able to scale it up. RDBMS have poor scaling attributes, so we move to something else. Another drive to the non SQL world is the need for more flexibility. FriendFeed went to a key/value store a while ago, because they didn’t want to have a fixed schema. In my spare time, I am toying with building a document DB for .NET, but it is something that requires a use case, so I haven’t finished it.

I’m guessing you are talking about what you call DivanDB – the .NET equivalent of CouchDB

Yes, I am. It is a fun project to work on, and it actually handles the basics of document DB: storing documents and transforming views. I still need to complete aggregation and updates, though.

Fantastic!

:) I am looking for someone that needs this, so they can sponsor the thing.

What would the transformation language be, then, for a document db on .NET?

Oh, I use LINQ. It is good for several reasons. It is a syntax that people are familiar with, and there are advantages from the implementation perspective as well.

But how does that work with the dynamic nature of document-oriented data?

I cheat :) Basically, I have a pre-processor step that takes a LINQ query and translate that into a dynamic query, without relying on a schema. I guess you can say that I am using LINQ queries on dynamically typed C#. That is totally transperant to the user, btw, they just see C#

Interesting stuff!

Yes, it is interesting – and fun to work on.

One last question in that department…. didn’t you consider using Boo for that? I mean, you could probably come up with some interesting stuff with duck typing or AST reflection to solve that?

Yes, I could have done it in Boo. But I wanted to make it more generally applicable, and LINQ is already there and fit the bill of what I needed anyway…

I see… it’s been really nice talking to you – one last question though: JFHCI? – what’s the deal with THAT?

Just Fucking Hard Code It.

Rock on! But why?

It is an observation that most of the time, people will try to make a solution more complex than needed. Adding ton of configuration and dynamism to the system. It makes things more complex. By stating that we want to hard code things as much as possible, we create a system that is actually easier to change. There are other aspects here, that relates to how you structure an application to make it easier to change when you are using hard coding, though. For example, if you structure most of the application as a set of commands, it means that changing something is touching a single class. That is generally a safe & verifiable change. I have a couple of blog posts that explains it in more detail.

Great! Thank you very much for your time, Oren!

You are welcome. See you next week.

See you!