Hello World with KRS
Khanyisa Real Systems very kindly asked me to contribute an article to their December newsletter. I happily obliged. They’ve just started this initiative and I like it already. Not because they invited me to write, but because the content is original, including the ‘toons. In a world that is retweet mad, that says a lot to me – someone out there cares enough to create and gather original content and share it. Read it for yourself, and if you like you can subscribe on their website.
And I’m dead serious about my message in that article!
A coach walks into a bar …
One day you are faced with a problem. You succeed or fail in solving that problem. It doesn’t matter. Time passes. You meet someone who paints a picture which has some parallels to what you experienced. A few possible things can happen.
(A)
You tell them about your experience. They listen. They ask questions, you answer, talk, listen, listen, talk …
(B)
You ask them a question. They answer, question, answer, question, answer …
(C)
You chat. It is not anything like your problem. Chat, chat, chat …
Given each scenario above, when are you a coaching? When are you being coached?
My view on coaching is simple. We oscillate between knowing and not knowing so often that it doesn’t matter who is learning from whom. It does not matter !! In any given context, you are either a coach or being coached based on what you know. You fluctuate between these extremes many times in a conversation, in an hour, in a day, in a lifetime.
This is part of my quest for balance through the work that I do. ”Coaching” feels one directional, a fabricated “us and them” labeling of people. That is an unbalanced state of being. Learning is a balanced way of living.
And if you have not yet figured it out … agility is about learning, learning is about living, living is about being in the present, being in the present is about embracing change, embracing change is about being agile.
RESTing at Øredev
There was quite a bit of REST chatter at Øredev last week. I sat in on the REST in Practice tutorial by Ian Robinson and Jim Webber (if you have not read the book they co-authored, then do – it’s really well written). There were a couple of things that these two guys cleared up for me, in the tutorial and in conversation during the week.
Application state is in the head of the consumer, not the provider of the resources. This suggests that we should be able to recompute the state of application at any time. If we can recompute the application state, then we don’t need to explicitly implement the entire application state machine in the provider, nor the client.
You may start off with modeling an application state machine on paper and discover the life cycle of resources. Implementing this is then simpler because we are only need to implement the lifecycle of the resource, not the entire application state. The way the consumer drives the state machine is just be reacting to available transitions in the representation of a resource. Now you give the provider the freedom to change the application state machine and the consumer will react to the new state machine by discovery. That is significant.
Use hypermedia to refer to yourself. This came up in the tutorial because I objected to a resource including a hypermedia link to itself, regardless of its state. To me, it seemed to have little value because you already have the representation of a resource in a particular state, so why include hypermedia for itself. For example, this is what a resource will look like without a link to self.
<Order>
<id>823763</id>
...
<links>
<link rel="pay" href="http://example.com/payment/823763"/>
</links>
</Order>
Now, if I want to GET the original order resource, I would need to know that there is some URI that includes the id of the order. And, so, we end up publishing a URI template such as
GET http://example.com/order/{id}
If we include a link to self, then the representation looks like this.
<Order>
<id>823763</id>
...
<links>
<link rel="self" href="http://example.com/order/823763"/>
<link rel="pay" href="http://example.com/payment/823763"/>
</links>
</Order>
Look Ma! I don’t have to expose a URI template anymore. It’s all discoverable. That is significant.
REST support in WCF is heading in the right direction. I also listened to Glenn Block’s talk on his team’s work on HTTP and REST support in WCF. It’s still early days but I think they are paying attention to experts in this space and giving priority to the developers that will use it.
In the past you would have to map a very specific, template based HTTP GET operation to a method like this (excluding the additional endpoint configuration too!)
[WebGet(UriTemplate = "{id}")]
public Contact Get(string id, HttpResponseMessage resp) { ... }
What Glenn showed was a method signature that resembled the HTTP operation on the resource.
public Contact Get(string id, HttpResponseMessage resp) { ... }
Sure, it’s using a lot of convention over configuration to get rid of the attributes. Now that may not seem like a big deal, but I do think that it is moving the HTTP abstraction down to a level that is more resource friendly. When you are building a RESTful architecture, then you do think quite naturally in terms of the resources and their allowable HTTP operations for obtaining state or triggering a state transition. By moving away from mapping HTTP operations to a service contract, it introduces the necessary mental shift from RPC to Resources. And that is significant.
Practical Scrum with Kent Beck
SD Times has started a series of Leaders of Agile webinars. The last was on Continuous Delivery with Kent Beck facilitating a discussion with Jez Humble and Timothy Fitz. The next in the series is on Practical Scrum which will, again, be lead by Kent . I think it will be a interesting perspective coming from the person that brought us Extreme Programming and so much more.
Sign up, it’s free.
This mess started long, long time ago
My son borrowed Asterix and Cleopatra from Claremont Library last week. It’s been ages since I read anything from that series. But page 2 really had me chuckling. There is an image of the page online, but it’s bit hard to read. So, here’s the dialog.
The scene: Cleopatra has been challenged by Julius Caesar to build a grand palace that will prove that the Egyptians are an advanced nation. She summons Edifis, her architect.
Cleopatra: Edifis, I have summoned you because you are the best architect in Alexandria – which is isn’t saying much.
Edifis: Oh!
Cleopatra: Don’t answer back! Your buildings are flimsy. You can hear every word the neighbours say. The ceilings fall in!
Edifis: It’s these modern materials… Actually, what I really want to do is build pyramids and …
Cleopatra: Silence! You have just three months to make good. You are to build Julius Caesar a magnificent palace here in Alexandria.
Edifis: Did you say THREE MONTHS?
Cleopatra: If you succeed, you will be covered in gold! If not, you will be thrown to the crocodiles! You may go.
(Edifis walks out)
Edifis: (thinking) Three months! I’d need supernatural powers to do that! I’d need someone who can work magic.
Edifis: (shouting) Got it! I know the very man! He can work magic!
Now, where have we seen that before?
(And just get the original book and read on about mule-driving the slaves to haul huge blocks of stone … classic!)

