October 27, 2007
@ 05:28 AM

I successfully resisted the urge to decode this all day Friday, but relief came this morning. It was actually interesting to figure out - I wasn't sure how to parse binary literals in .NET. Good to know. Here's the powershell script I cam up with:

 

 [string]::Join('', @($(Get-Clipboard).Split(' ') | %{[Convert]::ToChar([Convert]::ToInt32($_, 2))}))

 

There are a bunch of other binary little poem things there in the comments, plus Ayende's response and more comments there. Just copy to the clipboard and use the above powershell. Of course I know you won't and will write your own. But hey, it's Saturday. Go wild!


 
Categories:

October 19, 2007
@ 04:18 AM

If you were registered you already know, but if not, Code Camp Seattle has been moved to November 17-18.

This works out good for me, because I haven't had enough time to prepare for my presentation.


 
Categories:

October 15, 2007
@ 05:01 AM

Just when we had resigned ourselves to having a single kid, we found out Julie is pregnant again. Target delivery date: April 17th.

I was thinking about names for Kid B (our internal code name - at this point we don't know the gender, and I am a radiohead fan.)

I came across this and thought it was cool. Since the table thing's been done, I was thinking more along the lines of XSS, but they are so verbose.


 
Categories:

October 15, 2007
@ 04:48 AM

I am not sure I should talk about this because I didn't get explicit permission, but my gut feeling tells me it's OK.

The other day I mentioned that I thought it was a myth that Microsoft developers couldn't look at open source code due to fear that their work would be contaminated. I don't know where I heard this, but I assumed it was a myth, mainly because of the shear volume of open source software in the world today - how could you not look at it?!

So last night, I went to Phil Haack's geek dinner and asked Brad Wilson about this. He confirmed that it is not a myth, and described some of the rules around the policy - it's not simply a blanket "nooo! don't look!!!!" policy.

I've been thinking about this a lot lately because of the fact that I look at a lot of open source source code. I hadn't really thought to much about the responsibilities this implies until learning about the MS-RL and some people's concerns about it (here's a great summary, BTW.)


 
Categories:

October 15, 2007
@ 04:26 AM

imageI am reading a lot of people commenting on how bad it makes them feel to use the word "Mort" when referring to developers. I thought it was kind of funny and in good taste at first, but I don't think I could call someone Mort to their face, so ultimately, "Mort" fails to be a useful word to solve any problem. (I don't think anything's going to get solved unless you can talk to someone openly about the problem you have with them.)

I have started just using a term I first heard Scott Hanselman use: "501" Developer. This adjective:

  • Accurately describes the problem
  • Is something the 501 would probably readily cop to
  • Even has kind of a pseudo-cool consolation word-sense, which might lull the 501 into a conversation that lasts until 5:02.

The only problem is that "501 developer" harms innocent bystanders. Some developers get to work at 6am and leave at 5pm. Some developers have their work hours set by someone else. Some developers are good people trapped in bad situations and just want to get out of there as quickly as possible to go home and work on something that adds meaning to their lives.

I sympathize with the innocent bystanders, but the term is just too good to let go. You know when you are not a 501 developer, no matter what time you leave work. You care about your craft. That's all that matters.

So why not just drop this Mort stuff and use 501? Mort is divisive and not descriptive, while 501 addresses a core problem and doesn't attack someone's identity - just an aspect of their behavior.

In the Cryptonomicon, Neal Stephenson talks about this:

"I don’t like the word ‘addict’ because it has terrible connotations," Root says one day, as they are sunning themselves on the afterdeck. "Instead of slapping a label on you, the Germans would describe you as ‘Morphiumsüchtig.’ The verb suchen means to seek. So that might be translated, loosely, as ‘morphine seeky’ or even more loosely as ‘morphine-seeking.’ I prefer ‘seeky’ because it means that you have an inclination to seek morphine."

"What the f**k are you talking about?" Shaftoe says.

"Well, suppose you have a roof with a hole in it. That means it is a leaky roof. It’s leaky all the time—even if it’s not raining at the moment. But it’s only leaking when it happens to be raining. In the same way, morphine-seeky means that you always have this tendency to look for morphine, even if you are not looking for it at the moment. But I prefer both of them to ‘addict,’ because they are adjectives modifying Bobby Shaftoe instead of a noun that obliterates Bobby Shaftoe."

Mort is a noun that obliterates the person it refers to, while 501 is just and adjective.


 
Categories:

I have been using Rhino Mocks for a while now, but I must admit there are a lot of features I know I could use that I don't. One such feature formerly in this category is Constraints - namely, making my own.

I have a complicated, almost integration test, where I need a repository to return a large set of data to be using by the system under test. Essentially, the SUT will ask for prices for a bunch of securities on two separate dates.

This will always return the same set of prices. I need the Mock to return a different set of prices for a different date. I need to add a constraint:

This will tell Rhino Mocks to return T-N prices when the SUT asks for T-N, and T prices when asked for T.

Unfortunately, the SUT has a problem now where T is GetDate(), so the test will fail sometimes when the time between setting the expectation and the time the prices are asked for is greater than the minimum resolution of DateTime. This will be fixed later, but first I need to get it under test.

What I really want is just to be Date equal anyway, not DateTime.

It's very easy to add a new constraint for this in Rhino Mocks:

Now I can simply use this constraint to set expectations:

I didn't consult any documentation, blogs, google, other people to do this. I just let intellisense be my guide and literaly built it in about 2 minutes. I'd never written a custom constraint before. In fact, looking through the Rhino Mocks source code, I now see I could have written a PredicateConstraint instead (but it would have been a little more verbose to use.)

It's really easy and natural, the way things ought to be (Thanks, Ayende!)


 
Categories:

October 12, 2007
@ 05:45 PM
Just a random picture from my walk home...


 
Categories:

October 12, 2007
@ 04:57 AM

Yesterday (and who knows how long this was going on...) my friend Paul Mehner let me know that factored-software.com was no longer. It's metabolic processes were history. It had shuffed off its mortal coil. It was an ex-domain. (Paul didn't say it like that)

I had gotten several e-mails from godaddy saying..."this is your 1024 day advance notice! Better renew soon!" There was plenty of time. I had better things to do.

It turned out there wasn't actually plenty of time, and it had expired. I got it renewed and I think everything is working again now.

Anyways, sorry for the interruption!


 
Categories:

October 12, 2007
@ 04:49 AM

...Is on, for November 3rd and 4th. There is not much time left. Hurry up. Register. Submit a session.

I am trying ("there is no try...only do!") to pull together a session on some of the cool "extra" things in and around Castle that I have come to really love, including a look at some of the source code.

Myth: Microsoft people aren't allowed to look at source code like this because it might infect theirs, and contaminating Microsoft code with GPL'd code or something would cross the streams and the world would blow up. Can someone bust this one? I just want to make sure no one from across the street will have to avert their eyes when we talk about the Castle code. This has got to be a myth, right? If not, we can give them 3D glasses that make the code look fuzzy with my cool new 3d-code-fuzzy color scheme in VS.

I also wanted to do one on VSTO, but at this point, I'll be rushed to pull together one session.

Hope to see some peeps at Code Camp!


 
Categories: community