Ayende @ Rahien

Refunds available at head office

Extreme Patterns Video

I was asked a few times about recording a course, so I think that a few people would be happy to know that Glenn Block has posted a discussions that we had about a month ago.

You can find it here

Web development with training wheels?

This quote has me floored:

Well, I'm an asp.net developer, not really a web developer. It is like web development with training wheels, only the training wheels are really heavy, uneven, and make riding the bike harder

Choices...

IFooFactoryFactoryFactoryFactory vs. Factory<Factory<Factory<Factory<Factory<IFooFactory>>>>>

Discuss...

OSS Chat logs:

[friend] says: I think maybe we should at least provide something as simple as MR
[friend] says: sorry I mean RoR
Ayende Rahien says: I hereby grant you permission to do that
Ayende Rahien says: send us a patch

Tags:

Published at

My Startup Idea: Rocket Launcher

image

Taking advantage of a loophole in the export laws and some creative marketing, I am pretty sure that a startup to sell USB Nuclear Powered Rocket Launchers to petty tyrants is the next big thing.*

Wish me well, I now need to learn how to say I come in peace in Persian.

 

 

 

 

 

 

 

 

 

* This is a three level joke, if you don't get, don't worry, it is not intended to you.

Pattern madness

For the last few hours, I wrote:

  • Layout
  • Layout Decorator
  • Layout Registry
  • Layout Decorator Resolver

I am looking back at it right now, and I made a vow, Thou Shall Not Write an ILayoutDecoratorResolverFactory.

The ALT.Net quote of the day

You have to follow the discussion to understand that.

Bil Simser:

@Glenn: Someone posted a reply on my blog about the guidance package:
"I don't really like what they did there.  Having views like IContactDetailView puts the model into the view which is exactly what you are trying to separate.  IMO Views should be things like Grid, Spreadsheet, Detail, etc which can handle any domain object (Contact, Customer, etc)"

Ayende Rahien:

That is the Extremely Passive View.
It basically says that a view is the base control, and you need to handle that. A view IMO is the presentation required for a certain business scenario. IContactDetailView is a business scenario, and as such it is appropriate.

Dave Foley:

Coupling the Extremely Passive View with a very complex RowDataBound  handler results in my favorite presentation pattern:
"Passive-Aggressive View"

The Customer that Microsort asks

So, a lot of time, I hear Microsoft talk about asking their customers about their design and their requests.

I have a few personas that I have in mind when I think about that.

The first one is the clueless enterprisey architect, haven't touched code in five years.

The second one? The guy that aspires to be a Mort one day, the guy that he looks down at, that is the other persona.

Geek Scripture

At first, there was the bit. And the bit shifted left, and the bit shifted right, and there was the byte. The byte grew into a word, and then into double word. And the developer saw the work and it was good. And the evening and the morning were the first day.

On the next day, the developer came back to the work and couldn’t figure out what he was thinking last night, and spent the whole day figuring that out.

An apt description of ALT.Net

Charlie Poolie, on the ALT.Net mailing list:

So one reaction I had to Alt.NET was that it was a group of folks who don't do stupid things: sort of like forming a club for people who don't play
in traffic or don't juggle sharp instruments.
Oddly, as others have pointed out to me, such a group is actually needed in the .NET world.

ROTFL.

Coding Standard - Names

Names should be in ASCII and are limited to [a-zA-Z0-9_]. Anything else, is a heretic attempt to cause me, personally, problems.
So speaks the guy who had to convince a company that building a platform on Hebrew# is not a good idea. In addition to that, those names should be in English, consistently spelled and have a uniform coding style. I don't care what, just that it is consistent and uniform.

Nevertheless, Hungarian notation should be left to those who dreams of the coup of the pwsz and its friend, cbSize.

Transcripting variables names is also a sin, and it punishable by crucifixion at your social reform site of choice.

Using names (subject to the above mentioned char limits) from latin-script based languages is allowed, assuming that the work is completely local. Sorry, but I rarely can help with code that looks like:

ILympho loco = new Alieniloquium();

If the developer speaks more than one language, though, a single language should be used across the entire code base. To do otherwise is to court disaster.

Again, I can't really understand code that goes like this:

Employee divka = Employees.GetByMispar(15);

Those are the things that I have found useful.  The above applies to types, members, variables, parameters, tables, columns and file names.

Misconceptions

I was explaining to a couple of team members about our stack (NHibernate, Castle, Boo, Rhino) and how the different pieces are hooked together.

When I got to talk to Boo, I explained that it is just like Brail, which we are using for the views. One of the guys then asked if Boo stands for Brail, Object Oriented

Taken out of context

For the last few days, I seem to be saying a lot of things that can be... misunderstood without the borader picture

  • I feel that I can confidently mistake...
  • I didn't hit you by mistake...
  • I feel no urge to be self consistent, and I see no problem with this world view...
  • Don't let a chicken do your ETL process...

Herd Mentality and writing Compilers

Quotes from a discussion with Justin:

I am using Active Record out of Herd Mentality, you are big enough to be considered a herd.

And:

You are writing a compiler, this is just a state machine. Workflow Foundation is a state machine. You should use that to write the compiler.

Quotes from class

I am not sure why, but we had some hilarious quotes today at class:

When I talked about Erlang and showed an Erlang echo program in about 20 lines of code.
Student: Echo is a single word in DOS

I was cackling about that for a good five minutes, but this is the one that really had me in stitches:

Student: My wife made my code cleaner, she put periods instead of semi colons and straighten the indentations. She didn't understand why I am so messy when I write, nor why I wasn't happy that she "cleaned it up"

Tags:

Published at

Thinking on Code

I found myself writing this down right now:

Right now, a lot of the code that we write is just that, code. In need decrypting before it can be understood.

It made me laugh in retrospect.

The Consulting Game

Casey had this to say:

I have actually seen organisations where (in one case actually explicitly expressed, and in many where it wasn't spoken out loud) software delivered roughly meeting the requirements on how the UI worked was considered delivered. The work to make it work (usually way more work than the initial delivery) was considered 'bug fixing' and therefore was billable additinally by the IT department or outsourcer.

Which reminded me of a joke about consultants, no relation to anyone I know, etc...

One day the manager calls the consultant to talk about the time sheet report...

Manager: You charged us on Wednesday for 19 hours, but you were here for only about 9 hours on Wednesday.

Consultant: Well, of course. Look, it is very detailed. I was here from 9:00 to 18:00, right?

Manager: Right.

Consultant: And because we left without a good solution, I kept thinking about it in the car, and when I walked the dog. You see, it is the entries for 18:00 - 19:30 and 20:00 - 20:45. From 19:30 - 20:00 I had dinner, I didn't charge you for that.

Manager: Nice of you. And the other 8 hours? 22:00 - 06:00 ?

Consultant: Well,when I walked the dog, I finally had a vision, everything came together in a moment of brilliance, and I could see the solution in my head. All I had to do is connect some little pieces and it would work.

Manager: Oh, so you did an all nighter?

Consultant: Ha? Of course not. I went home thinking about the idea, and then I went to bed and slept on it for 8 hours.

The above is not my modus operandi, nor am I willing to work with those who does.  This is relevant because I am not going to consider practices built in those kind of shops as important to most of the discussion about software development.

All that aside, how the hell do you get the client to agree to pay for bug fixes? All my contracts include a 6 months guarantee for bug fixing, and most of the time they also include SLAs that says "drop whatever and get there", which is annoying as hell when this happened*. This means that I can't bill someone for bug fixes (change request are another matter, but those are for another time**), which is a great incentive to not have bugs.

* At one time I was called, after being on the phone for about an hour, came to the client, sat for 5 minute, sent a death treat to the DBA, and left. No space on the DB hard disk, argh! They backed it to the same HD and never cleaned it up.

** "Oh, you wanted it to also work? That wasn't in the original spec..." doesn't really fly in the real world

The "I am really not drunk" post

image Just got from the bar, and I have met a bet with a few of the guys there, that I am not really drunk.

To prove that, I need to write correct multi threaded code. I started to write parallel sort routine, Erlang fashion, in C#, but that is too complex for me when I am not under suspiction of being drunk.

So I wrote Hello World.

It is 400 lines of code and it has got five threads, so I guess that officially proves that I am not drunk.

Now all I need is to figure out why the code is all wavy and flowing.

I don't care about fluent interface or not, but I am pretty sure that Visual Studio doesn't have the "crawling ants" features...

Employee Communication DSL

We have a client that is a Pro Microsoft big time. We are constantly running into SSIS issues at their end, and it has gotten to the point where I am willing to rewrite the entire ETL process from scratch, and I am quite certain that it will take me far less than it would on any other way.

Here is my boss' reply to the suggestion to use Rhino ETL:

If boo in configuration

   Explain to {John, Jane} onEach(day: is(Monday) )

If ETL in DataLoader

  While(true)

      Explain()

You meant going back to using SQL jobs + stored procedures, right?

In this case, SP and plain old SQL would do the trick, so that is indeed the direction we are going to take, but I was literally floored by the DSL.

* BTW, I feel mean because it bothers me that the If and the While are capitalized.