Wednesday, July 30, 2008

SOAP and REST and Tools and Consequences

Jeff makes some interesting points about SOAP and REST. SOAP is probably dead. R.I.P. But I want to take the conversation a step further.

He points out that vendors haven't really jumped on the REST bandwagon and I agree - they haven't. But I think that this is a Very Good Thing (TM).

First of all REST is simple enough that (especially on the client side) you don't really need tools. This is where a lot of the utility comes from.

Secondly and more importantly REST hasn't beaten SOAP because the protocol is massively superior. REST has beaten SOAP because of SOAP's complexities and incompatibilities. But it isn't the protocol that is complex and incompatible, it is the tools!

If you want to build a successful service protocol I think you have two choices:
  1. Build something simple enough that normal inconsistencies can easily be dealt with on a project by project basis. (e.g. REST or basic HTML request/response)
  2. Build something that is absolutely specced out to the nth level of detail so that there is absolutely no ambiguity and produce several reference implementations (e.g. IDL/IIOP)
Anything in between these two extremes is doomed. I claim that tools (especially mediocre tools) could, if widely adopted, push REST out of category 1 and into the middle territory. Either that or the tools would die. Either way I don't see the long term value and I hope that the vendors stay away for a while longer.


Tuesday, July 29, 2008

You Make PB&J Wrong

How can that be, you ask? All you have to do is take two slices of bread, spread some peanut butter on one slice, some jam on the other and slap them together, right?

That might be acceptable if you consume it immediately, but otherwise, no, you aren't doing it right. If you pack your lunch, you will very much regret your casual attitude towards PB&J.

I won't even go into the advanced math required to get the amount of filling right. Suffice it to say that you want as much filling as possible without any squirting out when you bite.

What I really want to talk about is the long term effects of jam on bread. It isn't pretty people.

jam + bread + time = goo.

Over the centuries there have been countless attempts to solve this problem, but most people don't even bother. This is wrong. But then most of the well known solutions aren't ideal. My grandmother used to spread room temperature butter on the jam side. This nicely solves the jam and bread problem, but unfortunately the result is no longer actually a PB&J sandwich, it is a PBB&J sandwich.

But there is a (nearly*) perfect solution. Spread a very very thin layer of creamy peanut butter on the jam side slice of bread before applying the jam. Really, this works great.

Why do I care how you make PB&J sandwiches? I don't. Not one bit. I don't even care if you agree with my solution. I am using PB&J as a metaphor.

But I'm not going to tell you what the metaphor is. That is an exercise for the reader.

I will, however, make the claim that if you read all of that and actually thought about whether that was a good solution to the problem, then you just might have the capacity to be a good software designer.


* - The solution is only nearly perfect because it slightly changes the slipperiness of the bread and the advanced filling calculations have to be redone.

Saturday, July 26, 2008

Jumper Cables

I am not normally a political activist, but I'm going to make a rare exception.

Let's see if we can bring the 4th amendment back to life and send a message to our elected representatives that we do not want to live in a police state.

Pledge here if you agree. I'll forgive you if you don't.

Become a StrangeBedfellow!

Friday, July 25, 2008

Klatte's Law

I was just listening to the 6/30 episode of TWiT (yes, I am way behind in my podcasts - blame my addiction).

This is the episode where they talk about Bill Gates' retirement and the contributions he made to the world and the industry. Their conclusion was that his biggest contribution was a strategy based on an understanding of Moore's Law. The thesis is that he understood that if you release something as soon as it will run (even if it runs badly), Moore's Law will bail you out shortly and that is more efficient than trying to make something that runs tight in the first place. I agree that this strategy was a huge part of the success of Microsoft and it was clearly both the correct strategy in hindsight and a forseeably correct strategy given Moore's Law.

But I think that strategy is failing now and I think that this is a huge part of the reason why Vista is tanking. It doesn't have much to do with why Vista is not of interest to me (that is more around DRM and a closed mentality), but I think it is a big part of the greater market failure.

Why is the strategy failing? I have to introduce a concept for a minute here and for the purposes of this article, let's call it "Klatte's Law". Klatte's Law states that at any moment in time, a user's computational needs can be represented as a gently sloping linear increase. This will stagger up as the user discovers whole new categories of computational need (i.e. if someone who just does word processing starts doing video editing, there will be an enormous jump, but both before and after the jump it is a gentle slope).

Klatte's Law applies to mass market computing, but not to specialized niches like high performance computing.

If you were to plot a zoomed in view of Moore's Law plotted with Klatte's Law, it might look something like this:

The strategy of ignoring tight code in favor of the depending upon Moore's Law works as long as you are to the left of the intersection of Moore's Law and Klatte's Law, but it starts to break down as you approach the intersection and fails completely to the right of the intersection.

Fundamentally, I think that the market as a whole is currently to the right of this intersection. This could change at some point if a killer app comes out that requires tons of computational power (but this killer app will not be an operating system). You can depend on Moore's Law to bail you out if you think you have that killer app, or if you are so far to the left of the intersection that the user already wants to upgrade their system.

But if you do not have a killer app and if the user is satisfied with their current system, you are toast.

"What do you mean I need a quad core machine with twice as much ram to run Vista well? My core2 duo machine does everything I need just fine!"

Microsoft understands Moore's Law, but they don't understand Klatte's Law at all.


Tuesday, July 22, 2008

Salty Lox (and more)

Also called "regular" or "belly" lox.

I have no idea why people don't make this all the time. Lox is delicious and utterly trivial to make. Plus you can't even find the old New York deli salty lox anywhere outside the city any more (and it can be hard to find it in the city). It has been mostly replaced with the milder Nova lox that has been pre-sliced and pre-packaged at the factory.

Here is the general procedure for making any kind of lox:
  • Take a cure, which is a mixture of salt and sugar and optionally some spices or herbs.
  • Cover the fully de-boned salmon fillet (including pin bones) and spread the cure over it. You need more cure on the flesh side than the skin side. The objective is to do this in a container that is right sized for the piece of fish, so that you can use less cure. I like heavy weight zip lock bags. On the other hand if you aren't doing production volumes of the stuff, the cure is pretty cheap.
  • Press the fish with a weight to aid the expression of juices. Some kind of flat plate or pan with some cans or water bottles in it works well. For this last batch I put two pieces of salmon in two plastic zip lock bags on top of each other into one loaf pan, then topped with another loaf pan with weights. Store the whole thing in the fridge. The dry cure will turn into a brine as it cures, but there should always be some undissolved cure so you know that your solution is saturated.
  • Periodically check the fish for done and redistribute or add cure as necessary. It is done when you press it and it doesn't feel squishy, but feels kind of "cooked". A few days is usually about right.
  • Rinse off the cure and pat dry with paper towels. Wrap in freezer paper and store in the fridge (or serve immediately).
  • Slice thinly on the bias to serve. This takes a sharp knife and some practice, but it isn't hard.
You can optionally cold smoke this for some styles of lox. The cure can be can be anywhere from 1/3 salt and 2/3 sugar to 2/3 salt and 1/3 sugar (by weight). Use any kind of salt, as long as you measure by weight, but I use kosher salt.

Salty lox is the ultra minimalist version. 2/3 salt and 1/3 sugar, no other spices, no smoking. It is done in about three days. Really easy. It is sort of a gateway to charcuterie (the next thing you should make is duck breast prosciutto, or maybe duck confit). My nephew called it "salmon bacon" - yup, that's about right. Yum.


Thursday, July 17, 2008

KitchenAids and Volume

I always have exactly twice the amount of sourdough starter that I need when I make bread. This is just a consequence of the need to feed it and the limit of size that my vessels have. It's not a huge deal - I just throw a bit out.

But the other day I decided to try doubling the recipe instead.

I reasoned that although this technically exceeds the "flour power" of my kitchenaid, the dough isn't really all that tough and kneading a double recipe is only fractionally harder than a single recipe. So I wasn't worried about burning out my motor. And the volume of the bowl is large enough to just hold the doubled dough (with maybe a little doming at the top), so I figured I was also OK on volume.

Well all of those assumptions are probably correct. But what I did not consider is that the action of the dough hook is very volume sensitive.

Let me save you the trouble of this experiment. The dough creeps rapidly over the top of the dough hook and you have to stop and unstick everything about every 10 seconds.

Plus it is quite challenging to form 6 pounds of dough into two large loaves (that barely fit onto a large baking stone) and get them into the oven and baked. I managed it, but only just.

The bread turned out well, but I won't be doing this again.


Wednesday, July 16, 2008

Charities Suck

OK, that's a terrible thing to say and I don't really mean it, but GOD they can be annoying.

About 12 or 13 years ago I joined PBS. We lived in Chicago at the time and I joined with a largish donation that entitled me to a Jacques Pepin book. I mean I love the programming (Jacques, Dr. Who, Monty Python, etc) and I felt good about contributing to make the programming possible. I was very happy to contribute and I would have happily renewed my membership year after year, occasionally taking advantage of interesting offers and making larger donations.

But then they started to call and ask for money. Mind you, when I first signed up they asked me if it was OK for them to call me and I said, "No." Every time they called I asked them to remove me from their call list. After a while I started asking for supervisors. Nothing helped. It will be a cold day in hell before I ever give my contact information to a PBS station again.

They can have my money, but they absolutely can NOT have my digits.

What reminded me of this? Yet another friggin' message from the Red Cross about another blood drive that I can't possibly go to. I have donated gallons of blood over the years and I am happy to do it when I can, but I seriously do not want their stupid machine to talk to my machine twice a week about a blood drive happening in the middle of the work day close to home, but 35 miles from where I work. It will be a cold day in hell before I ever give my contact information to the Red Cross again.

The only difference is that I have long since learned never to answer my phone. If you call my home phone I absolutely guarantee that you will not talk to me.

Just because charities have legal immunity from ignoring Do Not Call registries, does not mean that there are no consequences for seriously pissing people off - how can they possibly not understand this?

And yes, all of my numbers are on every possible Do Not Call registry.


Friday, July 11, 2008

Diets and Diaries

This study validates my whole approach to weight loss. There is some more discussion here.

I haven't been very good about keeping my food diary of late and I have gained a few pounds back. One of the reasons I get tired of the whole food diary thing, though, is that I have insisted on doing complete calorie calculations, which gets darned tiresome.

The study implies that that might not be necessary. The more you record, the better you are likely to do, but the act of recording may be what puts you over the edge.

Like I might not have had that second handful of yummy M&M Premiums (Triple Chocolate) last night if I had had to record the fact for posterity.

So I am going to try it for a while and see what comes of this easier lighter weight food diary.


Thursday, July 10, 2008

50% Whole Wheat Sourdough

This bread turned out really well. I made it the same as my regular sourdough, but used 50% whole wheat flour. The whole wheat didn't detract from the texture or crust at all, but it added nicely to the flavor. This is really great bread.

  • Weighed out 238g of active starter (that basically equals 125g flour and half a cup of water).
  • Mixed in 1.5 cups warm water.
  • Stirred in 375g King Arthur whole wheat flour.
  • Let proof for 2 hours.
  • Mixed in and kneaded 250g Harvest King high protein white flour and 1T kosher salt.
  • Allowed to double (around 2 hours).
  • Punched down, formed loaf, allowed to rise (around 2 hours).
  • Dusted with flour, slashed, baked at 450 degrees for 20 minutes, then 400 degrees to an internal temperature of 200 degrees (about 5 more minutes).


Wednesday, July 9, 2008

Long Culinary Weekend

We didn't do much over the long weekend. Our plans for Saturday got canceled due to the weather and the rest of the time we chilled. So I spent some time in the kitchen.

The tally:
  • White sourdough bread
  • American sandwich bread. Twice.
  • Double-vanilla ice cream (best I've ever had)
  • Rich chocolate sauce
  • Deep caramel sauce
  • Terrific baked ziti (supposed to go the party on Saturday, but we ate it instead)
  • Whole wheat sourdough bread
  • Fromage fort
  • A couple of spatchcocked chickens on the grill
  • Cornbread
  • Scratch buttermilk pancakes
  • French toast from the sandwich bread
  • A killer sandwich of ham with caramelized onions and fromage fort browned under the broiler.
  • Meringue cookies (to use up the egg whites whose yolks went into the ice cream)
There might be something wrong with me. If nothing else, I think I should probably go back on my diet...