<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>brettdargan.com &#187; Uncategorized</title>
	<atom:link href="http://brettdargan.com/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://brettdargan.com/blog</link>
	<description>&#955; Thoughts and rants</description>
	<lastBuildDate>Fri, 28 May 2010 01:35:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>RESTful Architecture Style Distilled: Joe goes Jeans Shopping &#8211; Part Two (Realworld Experiences)</title>
		<link>http://brettdargan.com/blog/2009/06/24/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-two-realworld-experiences/</link>
		<comments>http://brettdargan.com/blog/2009/06/24/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-two-realworld-experiences/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 12:27:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=463</guid>
		<description><![CDATA[Desperate Times, call for desperate measures Maybe it's time to just go to a real shop, the online ones were going to charge delivery anyway. Well he has find one close by, lucky google maps has a convenient local search with a google maps directly in the search results. It's a tough call, Joe is [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<div class="section" id="desperate-times-call-for-desperate-measures">
<h3>Desperate Times, call for desperate measures</h3>
<p>Maybe it's time to just go to a real shop, the online ones were going to charge delivery anyway.</p>
<p>Well he has find one close by, lucky google maps has a convenient local search with a google maps directly in the search results.</p>
<p>It's a tough call, <strong>Joe is pretty lazy</strong>, but they are two blocks away and there are time pressures.</p>
<div class="line-block">
<div class="line">The nearest shop to him is <strong>&quot;Le Small Fry Jeans&quot;</strong>.</div>
<div class="line">Would have been good if they had a map on their lousy web page, he would have noticed how close they were earlier, like the embedded google maps mashup on <strong>&quot;JeanStop&quot;</strong>.</div>
<div class="line">They were difficult to find, even with a map.</div>
<div class="line">Joe: enters the shop</div>
<div class="line">Joe: I'm looking for some jeans</div>
<div class="line">ShopAssistant #1: parle-vous francais?</div>
<div class="line">Joe: (Thinking) Crap, well this is going to be difficult, if we can't communicate.</div>
<div class="line">Joe: parle-vous anglais?</div>
<div class="line">Joe: I can't even use a simpler and common communication mechanism (like pointing), because all their stuff is hidden away,if only there were a universal way I could tell her what I'm after.</div>
<div class="line">Joe: discovers a printed catalog and gestures</div>
<div class="line">ShopAssistant #1: ?? Puzzled look - shows him the front cover, only seems to be for <strong>female jeans</strong>.</div>
</div>
<p>Joe, finally gives up at this stage, reaches for his iphone and checks for nearast jean shops to his current location...</p>
</div>
<div class="section" id="a-chance-discovery-slickjeanservice">
<h3>A chance discovery: &quot;SlickJeanService&quot;</h3>
<p>Well today might be his lucky day after all. Just around the corner is another shop he didn't even see on his search results.</p>
<p>They must have been further down the page.</p>
<p>He enters.</p>
<p>Apparently in order <strong>to streamline their business process they have instituted a new protocol</strong>.</p>
<p>This will make the shopping experience faster, apparently...</p>
<p>Except <strong>Joe has to learn</strong> and memorise the new protocol/commands to GET what he is after.</p>
<p>It looks kind of like a Noodle Bar setup, you know there are 3 steps, first step is to pick your noodle type, second step is soup/laksa...</p>
<p>Well that is different thinks Joe, I don't really know what I want yet, I'd like it to be like my last pair, I don't even really know how to describe them, I just know what I like.</p>
<p>He'll give it ago. Inside there are more signs about how you can not deviate from this one path of conversation, any attempt to discuss with a Shop Assistant, results in redirection back to the beginning of the path.</p>
<div class="line-block">
<div class="line">He takes a step closer to the start line, it is a very busy store...</div>
<div class="line">Oh Oh, trouble, there is a new set of instructions that don't match the large menu set of instructions, more reading.</div>
<div class="line">They are in a process of further streamlining.</div>
<div class="line">Joe looks like a deer in the headlights.</div>
<div class="line">These instructions don't make a lot of sense...</div>
<div class="line">Initially, Your Date of Birth to determine your Chinese Zodiac Animal is required and a combination of some secret formula will place you at some position in a queue</div>
</div>
<p>Joe is getting mad, he has to learn a different way of just getting into a queue, let alone work out how to ask for jeans when he can barely describe what he is looking for.</p>
<p>Too much thinking, must leave...
Lucky every shop doesn't work like this, that is way too much work for lazy joe, on to the next shop...</p>
</div>
<div class="section" id="be-careful-what-you-ask-for">
<h3>Be careful what you ask for</h3>
<p>The next nearest shop to him is <strong>&quot;JeanStop&quot;</strong>.</p>
<div class="line-block">
<div class="line">There are three shop assistants serving the same number of customers.</div>
<div class="line">Joe has to queue until one completes a sale</div>
<div class="line">Joe: I'm looking for some jeans</div>
<div class="line">ShopAssistant #1: Yes, you have come to the right place, we sell jeans</div>
<div class="line">Joe: Great, Can you show me what have you've got?</div>
<div class="line">ShopAssistant #1: That will take too long, give me some more information</div>
<div class="line">Joe: Ok, I want some jeans, I'm a size 87cm, with a straight cut, I haven't decided about the wash or colour yet?</div>
<div class="line">ShopAssistant #1: Wait right here, let me see if we have some....</div>
<div class="line">ShopAssistant #1: Yes we have too many for me to bring out, can you refine your search</div>
<div class="line">Joe: is thinking how should he phrase his question when the clock strikes 10:15. The shop assistant without a word, disappears out the back... Did he just go a coffee break?</div>
<div class="line">Joe: Spins around to one of the other free shop assistants</div>
<div class="line">Joe: I was looking for some jeans, I told that other guy what I was after</div>
<div class="line">ShopAssistant #2: Sorry, I wasn't listening to your conversation, I don't know what you want, you'll have to start again</div>
<div class="line">Joe: AAAAAAAAAAAAAAAAHHHHHHHHHHHHHH!!</div>
<div class="line">Joe: starts again, but notices ShopAssistant#2 has a training badge on...</div>
<div class="line">ShopAssistant #2: I understand all of your requests from prior conversations, except for that last one.</div>
<div class="line">ShopAssistant #2: I will have to ask someone else, can you wait for ShopAssistant #1 to return from his break?</div>
<div class="line">Joe: This guy is a dumb version of the real thing. He can only relay questions that he has found out from ShopAssistant #1.</div>
<div class="line">Joe: Right now he wishes he had a url (/jeans/levis/501?style=stonewash&amp;#038;cut=straight&amp;#038;length=short) or even a picture in a catalog to point out to the guy what he was looking for.</div>
</div>
<p>He is tired of wasting his time and heads to the next shop...</p>
</div>
<div class="section" id="all-i-want-is-a-pair-of-jeans">
<h3>All I want is a pair of jeans</h3>
<p>Location: <strong>&quot;HowMuchAreThoseJeansinTheWindow&quot;</strong></p>
<p>It is really busy in here there are about 4 to 1 customers to shop assistants.</p>
<p>At this shop however they are quickly flitting about between customers taking new requests and it isn't long before Joe gets some attention.</p>
<div class="line-block">
<div class="line">Joe: I'm looking for some jeans</div>
<div class="line">ShopAssistant #1: Yes, you have come to the right place, we sell jeans, let me help you choose what you are looking for.</div>
<div class="line">ShopAssistant #1: Here is our latest catalog, in it you will find -- starts to rattle off a list of stock...</div>
<div class="line">Joe: Great, Well I need something in size 33inches</div>
<div class="line">ShopAssistant #1: Yes, this way, tell me more. Do you like prefer any of these cuts; styles or lengths...</div>
<div class="line">Joe: A few more back and forth conversations later...</div>
<div class="line">ShopAssistant #1: Excuse me Joe, I must attend to another customer request, just flip open your catalog so you can let me know where we were up to when I get back.</div>
<div class="line">Joe: Wow, the shop assistant started <strong>speaking Dutch</strong> and talking to another customer, they to have a catalog in hand, looks like it is in their language as well.</div>
<div class="line">Joe: He looks around and sees another Shop Assistant using sign language. Those guys really know how to communicate</div>
<div class="line">Joe: Does some more browsing by himself</div>
<div class="line">ShopAssistant #3: Hi Joe, so what were you looking for?</div>
<div class="line">Joe: Armed with the trusty catalog, points where he was last at so he can continue his conversation, but with a different ShopAssistant.</div>
<div class="line">Joe: After a few more suggested options from ShopAssistant #3 and Joe finds what he is after.</div>
<div class="line">Joe: <strong>GET</strong> those jeans.</div>
<div class="line"><br /></div>
</div>
</div>
<div class="section" id="so-what-does-this-have-to-do-with-rest-anyway">
<h3>So what does this have to do with REST anyway</h3>
<p>Did Joe finally get his pair of jeans?</p>
<p>Well that doesn't matter too much, when we are here to talk about REST.</p>
<p>If you stuck to the script, you've already seen a lot of evidence that REST describes and some that it doesn't.</p>
<p>By far the best experience Joe had was at the last Location <strong>&quot;HowMuchAreThoseJeansinTheWindow&quot;</strong>.</p>
<p>This shop embodied most of the important constraints of REST and it was this shop that seemed the most scalable, just like the architecture of the Web.
Only a few Shop Assistants serving many customers.</p>
<p>The first enablers for this ability is for clients to be able to <strong>identify what they want (Universal Addressability)</strong>, eg. Joe pointing his finger in the catalog will be understood by any of the Shop Assistants. Secondly our Shop Assistants are <strong>Stateless</strong>, that is they can suspend conversations with one client and switch to servicing another, without the need of them to remember anything specific to a particular client or conversation.</p>
<p>Stateful components make integration a complex and expensive proposition, see: <strong>&quot;JeansRUS&quot;</strong>.</p>
<p>The other great thing about that shop, was the way the assistants <strong>guided the client</strong>, they always answered <strong>questions and gave a choice of other available options</strong>.</p>
<p>They also talked in a standard manner <strong>(Uniform Interface)</strong>, unlike  <strong>&quot;SlickJeanService&quot;</strong> that tried to force new ways of doing things for the sake of their one store.</p>
<p>If we combine these features we make it really easy for a client like Joe to talk to our Shop Assistants.</p>
<dl class="docutils">
<dt>So all Joe needs to know is:</dt>
<dd><ul class="first last simple">
<li>where the front door is</li>
<li>negotiate preferred content</li>
<li>how to ask questions</li>
<li>how to follow options</li>
</ul>
</dd>
</dl>
</div>
<div class="section" id="stay-tuned">
<h3>Stay Tuned</h3>
<p>We leave Joe, with a new pair of Jeans.</p>
<p>See part one for <a class="reference external" href="http://brettdargan.com/blog/2009/06/01/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-one-online-experiences/">RESTful Architecture Style Distilled: Joe goes Jeans Shopping- Part One (Online Experiences)</a>
.</p>
<p>Join us next time for Part Three when we dissect the story further.</p>
</div>
</div>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=RESTful+Architecture+Style+Distilled%3A+Joe+goes+Jeans+Shopping+%E2%80%93+Part+Two+%28Realworld+Experiences%29+http%3A%2F%2Ftinyurl.com%2F5tgbjcw" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=RESTful+Architecture+Style+Distilled%3A+Joe+goes+Jeans+Shopping+%E2%80%93+Part+Two+%28Realworld+Experiences%29+http%3A%2F%2Ftinyurl.com%2F5tgbjcw" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/06/24/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-two-realworld-experiences/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RESTful Architecture Style Distilled: Joe goes Jeans Shopping &#8211; Part One (Online Experiences)</title>
		<link>http://brettdargan.com/blog/2009/06/01/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-one-online-experiences/</link>
		<comments>http://brettdargan.com/blog/2009/06/01/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-one-online-experiences/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 03:27:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=451</guid>
		<description><![CDATA[For SEOers; developers; testers; web developers; BA's and CIO's. REST has some tremendous benefits, but it's message is clouded. It's a message that I feel needs to be partly understood, by more than just developers. Narrative, seemed a good enough form (I would have preferred comics). I was inspired by Dan North and friends(Simon Stewart) [...]]]></description>
			<content:encoded><![CDATA[
<div class="document">


<!-- -*- mode: rst -*- -->
<p>For SEOers; developers; testers;  web developers; BA's and CIO's.</p>
<p>REST has some tremendous benefits, but it's message is clouded.
It's a message that I feel needs to be partly understood, by more than just developers.</p>
<p>Narrative, seemed a good enough form (I would have preferred comics).
I was inspired by <a class="reference external" href="http://dannorth.net">Dan North and friends(Simon Stewart)</a> story about a guy buying pants from a WS-* like shop vs. a RESTful shop and <a class="reference external" href="http://tomayko.com/articles/2004/12/12/rest-to-my-wife">How I explained REST to my wife</a>.</p>
<p>In this Four part series, I'll attempt to simplify the ideas behind presented by Roy and others from his dissertation for a wider audience.</p>
<blockquote>
<ul class="simple">
<li>Part 1 - Online Experiences</li>
<li>Part 2 - Physical (Offline) Experiences</li>
<li>Part 3 - Summary</li>
<li>Part 4 - Further Technical Detail</li>
</ul>
<p>This is tough, I will necessarily loose details, but the intent is not to mislead, only to introduce some examples and benefits of adopting a RESTful style.</p>
</blockquote>
<p>If you are an SEOer; developer; tester;  web developer; BA or CIO who wants to know more about REST and what the benefits and pitfalls are, then Read On.</p>
<div class="section" id="the-problem-joe-needs-some-new-jeans">
<h3>The Problem - Joe needs some new jeans</h3>
<p>So there was this guy called Joe, he really needed some new pants, to go with his Jacket.
He was pretty tired from the night before, so checked online for some jeans shops.</p>
</div>
<div class="section" id="following-a-friends-recommendation">
<h3>Following a Friends Recommendation</h3>
<p>He finds a url in an email, someone sent him about jeans.</p>
<p>The link is to the home page of <strong>&quot;Jeans R Us&quot;</strong></p>
<p>The link isn't to a particular type and style of jeans.</p>
<p>There was this this other large box, promising stylish new jeans experience, but he needed to <strong>install some new plugin called Adobe Flash</strong>.</p>
<p>Well what's a few more minutes..................</p>
<p>Once that was running eventually a cool flash movie with animation that let him change all those options and get a 3D view of the jeans.</p>
<p>But as he uses the system <strong>he can't use the browser back button</strong>, the application seems to have it's <strong>own back button</strong>.</p>
<p>He tries another tab, that also isn't working like normal web sites.</p>
<p><strong>It really doesn't work the same way as most web sites, it all happens on the one page.</strong></p>
<p>The url never changes and that's why he <strong>can't even bookmark</strong> his favourite jeans choice.</p>
<p>Although they have their own custom way of doing favourite jeans, but you have to create a profile.</p>
<p>The site is just frustrating, time to checkout Google instead.</p>
</div>
<div class="section" id="once-more-with-purpose">
<h3>Once more, with purpose</h3>
<p>So after giving up on that site.</p>
<p>Google had a few results for him to check out.</p>
<p>The 1st organic search result for the <strong>&quot;Le Small Fry Jeans&quot;</strong> store, had a link to a business directory web site.</p>
<p>It had stylish, well designed page with a street address and an email address.</p>
<p><strong>BUT THAT WAS ALL!!!</strong></p>
<p>Hmmm, the trading hours given on the website were different to the trading hours on the directory web site.</p>
<p>I wonder which one is actually updated regularly?</p>
</div>
<div class="section" id="second-times-a-treat">
<h3>Second times a treat</h3>
<p>Back to Google search results.</p>
<p>One of the sponsored links, <strong>&quot;Jeans Mega Store&quot;</strong> had a fantastic website.</p>
<p>This site <strong>seems really responsive, only parts of the page are updated</strong> when he made a selection.</p>
<p>He could enter in his size; select a cut and style; while seeing what is currently popular; there were also promotions for new customers.</p>
<p>There was <strong>a lot of a attention to detail</strong>, including:
- a simple page with Trading Hours
- store locations in a google map embedded on their own page.</p>
<div class="line-block">
<div class="line">The deals were pretty good, he browses.</div>
<div class="line">Oops, made a mistake, tries to use <strong>the Back Button, it seems broken</strong>.</div>
<div class="line">He is forced to work out how to undo what he did in <strong>their specialised interface</strong>.</div>
<div class="line">Adds some things to his cart.</div>
</div>
<div class="line-block">
<div class="line">Now he is ready to checkout, this action switches him to a a secure site, with his previous selected products.</div>
<div class="line">He enters in his credit card details.</div>
<div class="line">He hits the &quot;Proceed&quot; button...</div>
</div>
<p>ARRGGGH!!</p>
<p>No Go - they have no stock, they only check after his credit card has been entered.</p>
<p>Well, screw that he says. He abandons the order.</p>
<p>This clearly won't do, Joe must have some new pants for tomorrow, or he may have to do some washing himself...</p>
</div>
<div class="section" id="rd-times-a-charm">
<h3>3rd times a charm</h3>
<p>Back to Google search results.</p>
<p>The 2nd organic search result is for the <strong>&quot;How Much Are Those Jeans in the Window&quot;</strong> store, this one is styled purple, he has been there before.
Well this store has been around for a while, it has a clean but simple interface, it is pretty fast.</p>
<p>The <strong>online html catalog</strong> has basic jean pictures, with a small number of options.</p>
<p>The online catalog in html also has <strong>links to a pdf catalog</strong>. That is great for offline viewing and formats nicely on the printer.</p>
<p>Hmm, he seems to remember going to this store once before, <strong>he bookmarked a link</strong> for a particular type of jeans.</p>
<p>He searches through his old bookmarks.</p>
<p>Hmm, <strong>&quot;404 Page Not Found Error&quot;</strong>.</p>
<p>Well what does that mean, are the out of stock, is it no longer available or did they just revamp their website?</p>
<p>He only bought the last pair 3 months ago on the last washing day, they've probably just updated their website and now his old links don't work anymore.</p>
<p>Lets use the old faithful <strong>Back Button</strong> and continue.</p>
<p>After product selection and styles...</p>
<p>He clicks &quot;Proceed with Order&quot;;  enters in all his customer details;</p>
<p>He is having doubts, will that be a good look?....</p>
<p>Just then the phone rings...</p>
<p><strong>Distracted, he has a bit of breakfast</strong>, feeds the dog, gets back to his computer.</p>
<p>Has finally decided these are the right jeans for me.</p>
<p>He <strong>hits the &quot;Buy&quot; button</strong>....</p>
<p>The url looks like this:
/order/1234?action=process&amp;#038;....</p>
</div>
<div class="section" id="foiled-again">
<h3>Foiled Again</h3>
<p>He is rewarded with another <strong>Error Page</strong>. His <strong>session has expired</strong>, whatever that means. He hits refresh a few times, now it is asking him more questions, click ok; then give up.</p>
<p><strong>Restarts his browser</strong> and goes back to the site.</p>
<p>Luckily the <strong>browser has history</strong>, they had a pretty long domain name, even if it was fairly easy to remember.</p>
<p>Ohh, something else is wrong. Part of the site is working, but every time he goes to do a search he gets some sort of <strong>&quot;503 Server Error&quot;</strong> now.</p>
<p>This online ordering, can be a real pain.</p>
</div>
<div class="section" id="stay-tuned">
<h3>Stay Tuned</h3>
<p>We leave Joe, staring at his terminal, pulling his hair out.</p>
<p>Join us next time for Joe goes Jean Shopping Part Two - In the Real World.</p>
<p>Confused: We haven't discussed REST at all yet, stay tuned for Part Two and Three, when we finally discuss how some of Joes experiences relate to a RESTful Architectural Style.</p>
</div>
</div>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=RESTful+Architecture+Style+Distilled%3A+Joe+goes+Jeans+Shopping+%E2%80%93+Part+One+%28Online+Experiences%29+http%3A%2F%2Ftinyurl.com%2F4ov63f9" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=RESTful+Architecture+Style+Distilled%3A+Joe+goes+Jeans+Shopping+%E2%80%93+Part+One+%28Online+Experiences%29+http%3A%2F%2Ftinyurl.com%2F4ov63f9" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/06/01/restful-architecture-style-distilled-joe-goes-jeans-shopping-part-one-online-experiences/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Productive Programming</title>
		<link>http://brettdargan.com/blog/2009/02/05/productive-programming/</link>
		<comments>http://brettdargan.com/blog/2009/02/05/productive-programming/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 03:07:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=294</guid>
		<description><![CDATA[I've had a few questions about the Productive Programming Book, here are a few of the pearls I got from it: SLAP all code in a method live at the same level of abstraction. Nice acronym. Aristotles Essential and Accidental Properties Notions of Accidental Complexity have been around for a lot longer than I thought. [...]]]></description>
			<content:encoded><![CDATA[<p>I've had a few questions about the Productive Programming Book, here are a few of the pearls I got from it:</p>
<dl>
<dt>SLAP</dt>
<dd>all code in a method live at the same level of abstraction. Nice acronym.</dd>
<dt>Aristotles Essential and Accidental Properties</dt>
<dd>Notions of Accidental Complexity have been around for a lot longer than I thought.</dd>
<dt>Dietzlers Law - 80-10-10 (classic) </dt>
<dd>you can do 80 percent of what the customer wants in a remarkably short time. The next 10 percent is possible, but takes a lot of effort. The last 10 percent is flat out impossible because you can't get "underneath" all the tooling and frameworks. And users want 100 percent of what they want, so 4GLs gave way to general-purpose languages (Visual BASIC, Java, Delphi, and eventually C#). Java and C# in particular were designed to make C++ easier and less error prone, so the developers built-in some fairly serious restrictions in the interest of keeping average developers out of trouble. They created their own versions of the "80-10-10 Rule," only this time the stuff you couldn't do was much more subtle.
</dd>
</dl>
<ul>
<li><a href="http://oreilly.com/catalog/9780596519780/">Productive Programmer</a></li>
</ul>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Productive+Programming+http%3A%2F%2Ftinyurl.com%2F642ss7h" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Productive+Programming+http%3A%2F%2Ftinyurl.com%2F642ss7h" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2009/02/05/productive-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://brettdargan.com/blog/2007/08/17/hello-world/</link>
		<comments>http://brettdargan.com/blog/2007/08/17/hello-world/#comments</comments>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[Wow, it's been a while, the import from MT doesn't seem to have gone too badly. Tweet This Post]]></description>
			<content:encoded><![CDATA[<p>Wow, it's been a while, the import from MT doesn't seem to have gone too badly.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Hello+world%21+http%3A%2F%2Ftinyurl.com%2F6l3e9u9" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Hello+world%21+http%3A%2F%2Ftinyurl.com%2F6l3e9u9" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2007/08/17/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What is the cost of a build breakage?</title>
		<link>http://brettdargan.com/blog/2006/02/21/what-is-the-cost-of-a-build-breakage/</link>
		<comments>http://brettdargan.com/blog/2006/02/21/what-is-the-cost-of-a-build-breakage/#comments</comments>
		<pubDate>Mon, 20 Feb 2006 16:47:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=57</guid>
		<description><![CDATA[Has anyone done a study to cost of a build breakage to an organistation? Let's do some back of the envelope costings, assume a long running build of 30+mins, with 10 devs, probably 50% want to commit during the period or during the period after the build was broken and before a rollback or fix [...]]]></description>
			<content:encoded><![CDATA[<p>Has anyone done a study to cost of a build breakage to an organistation?</p>
<p>Let's do some back of the envelope costings, assume a long running build of 30+mins, with 10 devs, probably 50% want to commit during the period or during the period after the build was broken and before a rollback or fix has been committed.</p>
<p>A broken build has distracted atleast 5 people including the build master and they will have to wait or be careful of how they progress so on average that may be about 5hrs of lost productivity.</p>
<p>THAT's EXPENSIVE!!</p>
<p>Sure there are lot's of arguments like make your build faster, well the reality is whatever time your build is, you have disrupted the flow of your team members that has resulted in potentially significant wasted effort. </p>
<p>And in your rush to fix the build you may have not really addressed fundamental issues of the breakage, but just put a quick fix in to get things going.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=What+is+the+cost+of+a+build+breakage%3F+http%3A%2F%2Ftinyurl.com%2F6z8a8nj" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=What+is+the+cost+of+a+build+breakage%3F+http%3A%2F%2Ftinyurl.com%2F6z8a8nj" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2006/02/21/what-is-the-cost-of-a-build-breakage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Update policy, Optimistic Locking vs. Last in Wins</title>
		<link>http://brettdargan.com/blog/2005/05/30/update-policy-optimistic-locking-vs-last-in-wins/</link>
		<comments>http://brettdargan.com/blog/2005/05/30/update-policy-optimistic-locking-vs-last-in-wins/#comments</comments>
		<pubDate>Sun, 29 May 2005 22:39:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[locking]]></category>
		<category><![CDATA[transactions]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=45</guid>
		<description><![CDATA[I cringe at the thought of using a Last In Wins update policy, it just smells bad. Maybe because I've been involved in alot of database development, or maybe I've worked on systems with reasonable levels of concurrent access that I hate leaving things to chance. An argument for Last In Wins, is that the [...]]]></description>
			<content:encoded><![CDATA[<p>I cringe at the thought of using a Last In Wins update policy, it just smells bad. Maybe because I've been involved in alot of database development, or maybe I've worked on systems with reasonable levels of concurrent access that I hate leaving things to chance. </p>
<p>An argument for Last In Wins, is that the user may not know why there update has failed etc. We could approach this through useful messages or improved usability.</p>
<p>Another would be that why build optimistic locking when the simplest thing that could possibly work should suffice in most cases.</p>
<p>Well the cost of building it in is not high, it has good support in most orm including hibernate.</p>
<p>In reality the actual number of cases where multiple user transactions may attempt to update the same row should be very rare, but that is no reason to give up on optimisitc locking. </p>
<p>Databases are there to provide <a href="http://en.wikipedia.org/wiki/ACID">ACID</a> proof transactions, Atomicity, Consistency, Isolation and Durable.</p>
<p>If we choose Last In Wins we are at a much higher risk of corrupting the data, if updates on tables can occur that don't update all columns the way is open for inconsistent updates. It feels so wrong to have a database that provides ACID transactions yet we can partially thwart it's goodness by not using  pessimistic or optimistic locking policy.</p>
<p>For some systems or certain areas of a domain it may be fine. eg. updating a user's profile. </p>
<p>If you are going to mix it up, at a minimum ensure that Aggregate Root Entities use optimistic locking since they are more likely to have concerns (state or behaviour) that depend on it's children. eg. summarised data that needs to be updated, or invariants that need to be validated before transaction completion.</p>
<p>In general I would prefer to standardise on optimistic locking.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Update+policy%2C+Optimistic+Locking+vs.+Last+in+Wins+http%3A%2F%2Ftinyurl.com%2F63cst2c" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Update+policy%2C+Optimistic+Locking+vs.+Last+in+Wins+http%3A%2F%2Ftinyurl.com%2F63cst2c" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2005/05/30/update-policy-optimistic-locking-vs-last-in-wins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle, not using a simple Index in a multilingual db</title>
		<link>http://brettdargan.com/blog/2005/03/24/oracle-not-using-a-simple-index-in-a-multilingual-db/</link>
		<comments>http://brettdargan.com/blog/2005/03/24/oracle-not-using-a-simple-index-in-a-multilingual-db/#comments</comments>
		<pubDate>Wed, 23 Mar 2005 18:54:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[multilingual]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=41</guid>
		<description><![CDATA[So Oracle's Cost Based Optimizer can often decide not to use an index. We had a case this week where it decided not to use an index on a single column varchar2 using a string bind variable? After eliminating statistics as an issue, we discovered the problem was only affecting linux from either sqlplus, or [...]]]></description>
			<content:encoded><![CDATA[<p>So Oracle's Cost Based Optimizer can often decide not to use an index. We had a case this week where it decided not to use an index on a single column varchar2 using a string bind variable?</p>
<p>After eliminating statistics as an issue, we discovered the problem was only affecting linux from either sqlplus, or jdbc using a type 4 thin driver, windows clients were ok.</p>
<p>So not sounding like a driver issue, we hunted further and foud that after  <code>select * from nls_session_parameters</code> it was obvious that some we had some very important nls settings that were incorrect. For Oracle on *nix you have to ensure that an NLS_LANG environment variable is setup, like  "ENGLISH_AUSTRALIA.UTF8"</p>
<p>Since we have been porting from sqlserver (case-insensitive) to oracle (case sensitive) there were certain nls settings that need to be set.</p>
<p>In Particular nls_comp=ansi and nls_sort=binary_ai. There are some articles around for doing this, just <a href="http://asktom.oracle.com">ask tom</a>.</p>
<h4>Warning</h4>
<p>It should be stated however that this will only allow case insensitive searching for relational operators like '=', '&lt;', and '&gt;'. <em>LIKE</em> searches will still be sensitive, so for many cases you will still need to do standard uppercasing of literal search value and creation of function based index.</p>
<p>Back to our problem, why was asp working and the good guys not, well there was an existing after logon trigger that was setting up a single nls_sort=binary_ai.</p>
<p>Now we were getting this setting on connection, but asp were not, other regional settings must have been interfering and the nls_sort value was the standard "binary". So asp was still working fast due to the use of a standard <em>NOT CASE INSENSITIVE</em> index. </p>
<p>Meanwhile the cost based optimizer had no index to choose for us, because the creation of a function based index with that nls_sort setting had been missed. If you had a need to create one yourself it would be something like this:<br />
<code>create index blah on tbl (nlssort(columnName, 'NLS_SORT=BINARY_AI')) </code></p>
<p>BTW, when adjusting some of these parameters you may need to spend time on checking the order, as there are implicit dependencies with no apparent documentation on which order you should override them. </p>
<p>So if you are working in a multilingual db, make sure you check out nls_session_parameters to confirm your changes. The other tables  nls_instance_parameters or nls_database_parameters are only relevant for checking the character set(s) of your database since that isn't session specific.</p>
<h4>The Test</h4>
<p>So you may be wondering how this was tested, well there was a test, it was very simple, using the explain plan feature of oracle asserting that there was an index scan present. Here are the interesting bits:</p>
<pre>
    public void testOracleWillUseIndexForQuery() throws SQLException {
        String problemQuery = "select * from test where name = &apos;2423423&apos;";
        assertQueryUsesIndex(problemQuery);
    }

    private void assertQueryUsesIndex(String problemQuery) throws SQLException {
        assertTrue(explainPlan(problemQuery).indexOf("INDEX (RANGE SCAN") > 0);
    }

    private String explainPlan(final String query) throws SQLException {
        String queryPlan = "explain plan for ";
        getConnection().createStatement().execute(queryPlan + query);
        return explainPlan;
    }

    private String getExplainPlan() throws SQLException {
        String queryPlan = "select n" +
        "  substr (lpad(&apos; &apos;, level-1) || operation || &apos; (&apos; || options ||&apos;)&apos;,1,30 ) "Operation", n" +
           "  object_name "Object"n" +
           "from n" +
           "  plan_table n" +
           "start with id = 0 n" +
           "connect by prior id=parent_id";
        ResultSet rs = getConnection().createStatement().executeQuery(queryPlan);
        return accumulateColumn1(rs);
    }

    private String accumulateColumn1(ResultSet rs) throws SQLException {
        StringBuffer result = new StringBuffer();
        while (rs.next()) {
            result.append(rs.getString(1));
            result.append("n");
        }
        return result.toString();
    }
</pre>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Oracle%2C+not+using+a+simple+Index+in+a+multilingual+db+http%3A%2F%2Ftinyurl.com%2F6drdszj" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Oracle%2C+not+using+a+simple+Index+in+a+multilingual+db+http%3A%2F%2Ftinyurl.com%2F6drdszj" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2005/03/24/oracle-not-using-a-simple-index-in-a-multilingual-db/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle &#8220;IN&#8221; condition limits</title>
		<link>http://brettdargan.com/blog/2004/10/13/oracle-in-condition-limits/</link>
		<comments>http://brettdargan.com/blog/2004/10/13/oracle-in-condition-limits/#comments</comments>
		<pubDate>Tue, 12 Oct 2004 22:17:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[db]]></category>
		<category><![CDATA[oracle]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=16</guid>
		<description><![CDATA[In Oracle 8i it use to be that the "IN" condition was limited to 254 expressions, in total so stringing a few together with "OR" didn't work. But now in 10g you have alot more freedom, for starters the expression list is now limited to 1000 plus you can have multiple "IN" conditions in the [...]]]></description>
			<content:encoded><![CDATA[<p>In Oracle 8i it use to be that the "IN" condition was limited to 254 expressions,  in total so stringing a few together with "OR" didn't work.  </p>
<p>But now in 10g you have alot more freedom, for starters the expression list is now limited to 1000 plus you can have multiple "IN" conditions in the query to extend that and if you want something less smelly, create a collection and use the CAST and TABLE commands to join an in memory collection of predefined type to real tables. </p>
<p>When I first tried the latter method in 8i it was too unreliable to use, but now it seems better, thanks to Gary Mandelkow for doing the leg work and testing 10g, we can reliably do this with atleast a 3000 member collection.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Oracle+%E2%80%9CIN%E2%80%9D+condition+limits+http%3A%2F%2Ftinyurl.com%2F6b43snh" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Oracle+%E2%80%9CIN%E2%80%9D+condition+limits+http%3A%2F%2Ftinyurl.com%2F6b43snh" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2004/10/13/oracle-in-condition-limits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Calculations</title>
		<link>http://brettdargan.com/blog/2004/09/20/quick-calculations/</link>
		<comments>http://brettdargan.com/blog/2004/09/20/quick-calculations/#comments</comments>
		<pubDate>Sun, 19 Sep 2004 23:28:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=15</guid>
		<description><![CDATA[Today we had to do some estimates for potentially caching a large number of objects in memory, using some quick calculations (or Back of the Envelope) calculations, we quickly calculated a very big number, indicating we would immediately need to start considering alternative implementations. Further analysis was needed and later it was confirmed that initial [...]]]></description>
			<content:encoded><![CDATA[<p>Today we had to do some estimates for potentially caching a large number of objects in memory, using some quick calculations (or Back of the Envelope) calculations, we quickly calculated a very big number, indicating we would immediately need to start considering alternative implementations.</p>
<p>Further analysis was needed and later it was confirmed that initial estimates were pretty close to the mark.</p>
<p>It reminded me of a good book that is probably not on alot of programmer's reading list. <a href="http://www.cs.bell-labs.com/cm/cs/pearls/">Programming Pearls</a> is an old style book of computer science articles from the 80's. Column 7 about  "Back of the Envelope" estimation, using very rough order of magnitude guesses to arrive at an approximate value for an amount, or <a href="http://www.cs.bell-labs.com/cm/cs/pearls/sec074.html">response time</a>.  I originally read this from following some of the references from <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0735619670?v=glance">Code Complete</a>. It is an <a href="http://www.awprofessional.com/">Addison-Wesley</a> book, but not available on <a href="safari.oreilly.com">safari</a> <img src='http://brettdargan.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> , which is exactly the sort of book that should be provided</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=Quick+Calculations+http%3A%2F%2Ftinyurl.com%2F6b76wq4" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=Quick+Calculations+http%3A%2F%2Ftinyurl.com%2F6b76wq4" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2004/09/20/quick-calculations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hello Ruby, goodbye perl, awk&#8230;</title>
		<link>http://brettdargan.com/blog/2004/08/20/hello-ruby-goodbye-perl-awk/</link>
		<comments>http://brettdargan.com/blog/2004/08/20/hello-ruby-goodbye-perl-awk/#comments</comments>
		<pubDate>Thu, 19 Aug 2004 23:27:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[languages]]></category>

		<guid isPermaLink="false">http://brettdargan.com/blog/?p=12</guid>
		<description><![CDATA[Ruby has been around for a while, I've been meaning to look at this for ages and when Jon Tirsen mentioned DamageControl is written in it, it was yet another push for me to have a squiz. I had a superficial look mainly from a scripting point of view and it looks great, I might [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ruby-lang.org/">Ruby</a> has been around for a while, I've been meaning to look at this for ages and when <a href="http://www.codehaus.org/~tirsen/">Jon Tirsen</a> mentioned DamageControl is written in it, it was yet another push for me to have a squiz. </p>
<p>I had a superficial look mainly from a scripting point of view and it looks great, I might never have to write another awk script again!</p>
<p>Here is the socketcount program from a recent post rewritten in ruby.<br />
<code><br />
#!/usr/bin/ruby<br />
#socketcount in ruby<br />
if $*.size > 0<br />
  regex = $*[0]<br />
else<br />
  regex = '^..p'<br />
end<br />
result = %x{sudo netstat -tpa | grep #{regex} | grep -v LISTEN }<br />
# All Socket connections counted (originating and terminating)<br />
h = {}<br />
result.each() { |s|<br />
  service = s.split(' ')[4]<br />
  h[service] = h[service].to_i + 1<br />
}<br />
h.each { | key, value | print key, " ",value, "n" }<br />
</code></p>
<p>It suits my purposes for scripting and seems to be pretty impressive in other aspects.</p>
<div class="tweetthis" style="text-align:left;"><p> <a class="tt" href="http://twitter.com/home/?status=hello+Ruby%2C+goodbye+perl%2C+awk%E2%80%A6+http%3A%2F%2Ftinyurl.com%2F6ghnsdl" title="Post to Twitter"><img class="nothumb" src="http://brettdargan.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-big2.png" alt="Post to Twitter" /></a> <a class="tt" href="http://twitter.com/home/?status=hello+Ruby%2C+goodbye+perl%2C+awk%E2%80%A6+http%3A%2F%2Ftinyurl.com%2F6ghnsdl" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://brettdargan.com/blog/2004/08/20/hello-ruby-goodbye-perl-awk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

