tag:blogger.com,1999:blog-44411605896711247372024-03-05T01:45:34.194-08:00Agile From The Ground UpHelping your team go from fragile to agile.Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-4441160589671124737.post-10602347368824401422012-09-19T22:00:00.001-07:002012-09-19T22:00:57.081-07:00Getting SignalR and PhoneGap Working Under Windows Phone EmulatorI am learning both PhoneGap and SignalR and figured out tonight how to enable both polling and message sending under PhoneGap, at least within the Windows Phone emulator. I have not tried on my Android phone yet. That will wait until I deploy the server hub.<div> <br></div><div><b><u>Server Side Code</u></b></div><div><b><u><br></u></b></div><div><div>using SignalR.Hubs;</div><div><br></div><div>namespace Vocab.SignalR.SignalR.Sample</div><div>{</div><div> public class Chat : Hub</div> <div> {</div><div> public void Send(string message)</div><div> {</div><div> // Call the addMessage method on all clients</div><div> Clients.addMessage(message);</div><div> }</div> <div> }</div><div>}</div></div><div><br></div><div>Yes. That is all. That means when any JavaScript client calls the Send method, the server will dispatch the message to all connected clients by calling their "addMessage" JavaScript method. Clients is declared as <b>dynamic</b> to allow this to work.</div> <div><br></div><div><b><u>HTML & JavaScript Code Under PhoneGap and Windows Phone Emulator</u></b></div><div><br></div><div>Pay attention most to the blue italicized lines. That's what I had to do in order for the Windows Phone emulator and/or PhoneGap to work properly<i>. </i>At one point before both of those lines, I had it able to get new messages when sent by the server, but it would not send messages to the server. Now it all works! See the section underneath for a standard HTML client that I run within a web browser on the desktop, which has nothing to do with PhoneGap or mobile jQuery whatsoever. But, both the phone app and the page are able to send and receive messages from and to each other now.</div> <div><br></div><div><div><!DOCTYPE html></div><div><html></div><div><head></div><div> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /></div> <div> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /></div><div> <title>Chat</title></div><div> <link rel="stylesheet" href="jquery.mobile-1.0.1.css" /></div> <div> <script type="text/javascript" src="jquery-1.7.1.js"></script></div><div> <script type="text/javascript" src="jquery.mobile-1.0.1.js"></script></div> <div> <script type="text/javascript" src="<a href="http://jgough/SignalR/Scripts/jquery.signalR-0.5.3.js">http://jgough/SignalR/Scripts/jquery.signalR-0.5.3.js</a>"></script></div><div> <script type="text/javascript" src="<a href="http://jgough/SignalR/signalr/hubs">http://jgough/SignalR/signalr/hubs</a>"></script></div> <div> <script type="text/javascript" charset="utf-8" src="phonegap-1.4.1.js"></script></div><div> <style type="text/css"></div><div> .ui-title</div><div> {</div><div> font-weight: bold;</div><div> }</div><div> </style></div><div> <script type="text/javascript"></div><div><b> $(function () {</b></div><div><b><i><font color="#000066"> $.connection.hub.url = "<a href="http://jgough/SignalR/signalr">http://jgough/SignalR/signalr</a>";</font></i></b></div> <div><b><br></b></div><div><b> // Grab the hub by name, the same name as specified on the server</b></div><div><b> var chat = $.connection.chat;</b></div><div><b><br></b></div><div><b> chat.addMessage = function (message) {</b></div> <div><b> $('#chatMessages').append('<li>' + message + '</li>');</b></div><div><b> };</b></div><div><b><br></b></div><div><b><i><font color="#000066"> $.connection.hub.start({ jsonp: true });</font></i></b></div> <div><b><br></b></div><div><b> $("#sendChatMessage").click(function () {</b></div><div><b> var message = $("#chatMessage").val();</b></div><div><b> console.log("Message: " + message);</b></div> <div><b> chat.send(message);</b></div><div><b> });</b></div><div><b> });</b></div><div> </script></div><div></head></div><div><body></div><div> <div id="home" data-role="page"></div> <div> <div data-role="header"></div><div> <h1></div><div> Chat!</h1></div><div> </div></div><div> <div data-role="content"></div> <div> <h2></div><div> Chat your heart out...</h2></div><div> <div></div><div> <textarea id="chatMessage"></textarea></div><div> <br /></div> <div> <a id="sendChatMessage" data-role="button">Send Chat Message</a></div><div> </div></div><div> <ul id="chatMessages"></div><div> </ul></div><div> </div></div><div> <div data-role="footer" data-position="fixed"></div><div> Thank you for chatting</div><div> </div></div> <div> </div></div><div></body></div><div></html></div><div style="text-decoration:underline;font-weight:bold"><br></div></div><div style="text-decoration:underline;font-weight:bold">Regular HTML / JavaSript Page for Desktop Browsers</div> <div style="text-decoration:underline;font-weight:bold"><br></div><div>You may notice that not all the variable names or page elements have the same names. This is fine. The only important part is that the chat instance have an "addMessage" function, and that when the #broadcat button is clicked it calls client.send, as both of these correspond to what we saw above in the server hub code.</div> <div style="text-decoration:underline;font-weight:bold"><br></div><div><div><html></div><div><head></div><div> <script src="../Scripts/jquery-1.8.1.js" type="text/javascript"></script></div> <div> <script src="../Scripts/jquery.signalR-0.5.3.js" type="text/javascript"></script></div><div> <script src="../signalr/hubs" type="text/javascript"></script></div> <div> <script type="text/javascript"></div><div> $(function () {</div><div> // Proxy created on the fly</div><div> var chat = $.connection.chat;</div><div><br></div><div> // Declare a function on the chat hub so the server can invoke it</div> <div><b><i> <font color="#000066">chat.addMessage = function (message) {</font></i></b></div><div> $('#messages').append('<li>' + message + '</li>');</div><div> };</div><div><br></div><div> $("#broadcast").click(function () {</div><div> // Call the chat method on the server</div><div><b><i><font color="#000066"> chat.send($('#msg').val());</font></i></b></div> <div> });</div><div><br></div><div> // Start the connection</div><div> $.connection.hub.start();</div><div> });</div><div> </script></div><div></head></div><div><body></div> <div> <input type="text" id="msg" /></div><div> <input type="button" id="broadcast" value="broadcast" /></div><div> <ul id="messages"></div> <div> </ul></div><div></body></div><div></html></div><div style="font-weight:bold;text-decoration:underline"><br></div></div><div style="text-decoration:underline;font-weight:bold"><br></div><div style="text-decoration:underline;font-weight:bold"> <br></div><div style="text-decoration:underline;font-weight:bold"><br></div><div style="text-decoration:underline;font-weight:bold"><br></div><div style="text-decoration:underline;font-weight:bold"><br></div><div style="text-decoration:underline;font-weight:bold"> <br></div> Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-14220324689444596132012-09-16T11:41:00.001-07:002012-09-16T11:41:42.810-07:00The Fragile Managerfesto Patterns: Bad Boss BehaviorsThis is a video in draft form of what I want to become a launching pad for demonstrating many "Bad Boss Behaviors" and the remedies for them that agile practices bring.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/uWtW_VIXAWQ/0.jpg" height="266" width="320"><param name="movie" value="http://www.youtube.com/v/uWtW_VIXAWQ?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" /><param name="bgcolor" value="#FFFFFF" /><param name="allowFullScreen" value="true" /><embed width="320" height="266" src="http://www.youtube.com/v/uWtW_VIXAWQ?version=3&f=user_uploads&c=google-webdrive-0&app=youtube_gdata" type="application/x-shockwave-flash" allowfullscreen="true"></embed></object></div>So far in this one we have:
<ol><li><b>Barge In Boss</b>: Manager, unaware of what an employee is working on, interrupts him.</li>
<ol><li><i>Agile Remedy: Visible Workspace and Tools</i> </li>
</ol><li><b>Belittler Boss</b>: Denigrates the employee's desire to improve the customer experience</li>
<ol><li><i>Agile Remedy: clear values and an outward, customer focus</i> </li>
</ol><li><b>Pinheaded Policy Pushing Boss</b>: Imposes strict, top-down, and very draconian policy requirements on the employee.</li>
<ol><li><i>Agile Remedy: living standards and openness to modern and changing realities</i> </li>
</ol><li><b>I'm Louder = More Power Boss</b>: the boss, when his thinking is challenged, responds by speaking louder, emphasizing he has more power than the employee.</li>
<ol><li><i>Agile Remedy: a flatter structure, managers who are not bosses, but service-oriented leaders and hands-on</i> </li>
</ol><li><b>Priorities Ping Pong Boss:</b> this boss exercises his control by shifting employees from one priority project to another at will, often leaving a trail of unfinished work behind.</li>
<ol><li><i>Agile Remedy: singluar focus until completion on tasks and projects, not rapid reassignment based on a "fighting fires" approach.</i></li>
</ol><li><b>Everything's Easy and Instant Boss: </b>this boss assures you that your new assignment is simple, will not take long, and must be done instantly, no matter what. These bosses continually assign a fixed, non-negotiable amount of work to someone and require that it be completed by a fixed, non-negotiable, and arbitrary deadline. In software development, this is a typical "waterfall" or "big bang all at once" approach.</li>
</ol> This list is a simple draft too. But, I really like having short-hand names for these bad behavior patterns, so it would also be nice to have short-hand names for the good behaviors.<br />
<br />
We're going to record the results of what happens with an Everything's Easy and Instant Boss does push his a arbitrary deadline onto a much smaller scale: that of reading a couple of paragraphs. It's kind of an obvious failure case, isn't it? But, if a human being cannot predict with any accuracy how long a couple of paragraphs will take to read aloud, then why do they keep getting away with telling customers that a project can be "complete with high quality and correctness" by an arbitrary deadline?<br />
<br />
Things that make you go Hmmmmmm.Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-64611887973875228242012-08-28T18:55:00.004-07:002012-08-28T20:36:38.012-07:00More Thoughts on Compressed Schedules: 151 hours in 3 weeks; followed by 9 days offWhen briefly discussing the topic of compressing multiple weeks worth of work into fewer weeks, followed by more lengthy time off with VersionOne CTO Ian Culling today, he asked me: "Have you read that book?"<br />
<div><br />
</div><div>I asked, "What? There's a book about it?"</div><div><br />
</div><div>He said, "Yes, the Seven Day Weekend. I've read it and will bring it for you to borrow."</div><div><br />
</div><div>The book is written by Ricardo Semler, CEO of a Brazilian company, Semco, which has been very successful through the application of many non-traditional practices. </div><div><br />
</div><div>Learn more here:</div><div><br />
</div><div><a href="http://www.amazon.com/The-Seven-Day-Weekend-Changing-Works/dp/1591840260">http://www.amazon.com/The-Seven-Day-Weekend-Changing-Works/dp/1591840260</a> </div><div><a href="http://en.wikipedia.org/wiki/Ricardo_Semler">http://en.wikipedia.org/wiki/Ricardo_Semler</a> </div><div><br />
</div><div>A typical year's worth of work is considered 2,080 hours. If you have 3 paid weeks of vacation, then the number of hours you actually work will be 1960.</div><div><br />
</div><div>Now, what's 1960 / 52? It's 37.69231.</div><div><br />
</div><div>So, if you spread your vacation into each week, your 40-hour week would be 37 hours and 42 minutes, about.</div><div><br />
</div><div>Ok, great. How much is 37h 42m times 4 then? Answer: 150.76923</div><div><br />
</div><div>For argument's sake, we'll call this 151 hours.</div><div><br />
</div><div>Now, what if we worked these hours in 3 weeks instead of 4? Would that be so hard?</div><div><br />
</div><div>51, 50, 50 = 151.</div><div><br />
</div><div>Here's a possible schedule:</div><div><br />
</div><div><b>Week 1:</b></div><div><br />
</div><div>Mon: 12 hours: 7:30 - 5:30 = <b>9 hr work</b>, 1hr lunch, and 9 pm - 12 pm = <b>3 hr work</b></div><div>Tue: 10 hours: 8:30 - 7:30 = <b>10 hr work</b>, 1 hr lunch</div><div>Wed: 12 hours: same as Monday (<b>12 hr work</b>)</div><div>Thu: 9 hours : 8:30 - 6:30 = <b>9 hr work</b>, 1 hr lunch</div><div>Fri: 8 hours : 8:30 - 5:30 = <b>8 hr work</b>, 1 hr lunch</div><div><br />
</div><div>For week 1, this ends up at 51 hours.</div><div><br />
</div><div>For weeks 2 and 3, you do the same thing, except replace Tuesday with 8:30 - 6:30, for only 9 hours.</div><div><br />
Or, maybe you'd prefer to do two heavy days back-to-back and get them over with. Fine, go for it. Swap Tuesday and Wednesday. Maybe you have the flexibility, and desire, to do 4 hours on Sunday evening, or Saturday morning. Great, then chop off 4 from Mon or Tue, or turn them into simple 10 hour days. It's up to you and your employer.<br />
<br />
</div><div>Anyway, if we think of the two twelves in the original example, this makes for just two days that are longer than the ordinary day, Monday, and Wednesday.</div><div><br />
</div><div>Now, by spreading out our 3 weeks of vacation to reduce our work week to 37.69 hours a week, we can work the fourth week's hours ahead of time in just "ten extra" hours a week, from the point of view of the traditional "40 hour" work week.</div><div><br />
</div><div>Just think about this: <i><b>what would having a 9 day vacation every single month enable you to do for your life, for your family, your community, and yes, even for your career and employer?</b></i></div><div><br />
</div><div>Working "around the clock" with a cell-phone, internet and VPN access may be the norm now, but if we're going to be doing that, then why not make 50 hours a week be the new norm, except follow it by one week off every month?</div><div><br />
As the "next step down", but perhaps more palatable all around, consider the 5 week schedule compressed into 4 weeks.<br />
<br />
Here, we have 37.69 hours times 5 = <span style="text-align: -webkit-right;">188.46 hours.</span><br />
<span style="text-align: -webkit-right;">So, divided by 4 = </span><span style="text-align: -webkit-right;">47.12 hours per week, or 9.42 hours a day.</span><br />
<span style="text-align: -webkit-right;"><br />
</span> <span style="text-align: -webkit-right;">9.42 hours a day? That's almost nothing, right? It's 9 hours, 25 minutes, and 12 seconds actually :)</span><br />
<span style="text-align: -webkit-right;"><br />
</span> <span style="text-align: -webkit-right;">Big deal. Work from 8 am to 6:15, with, a 40 minute lunch break. That still gives you about 4 to 5 hours after work, assuming you get home around 7 and want to go to bed at 11.</span><br />
<span style="text-align: -webkit-right;"><br />
</span> <span style="text-align: -webkit-right;">With this schedule, you end up with pretty much regular hours, regular evenings, and regular, full weekends. Want to leave early on Fridays? Have at it. Work 2 to 4 hours from home in the evening, and leave on Friday at 2:15.</span><br />
<span style="text-align: -webkit-right;"><br />
</span> <span style="text-align: -webkit-right;">Yet, again, most importantly, is that after working this schedule for four weeks, you've already worked the same number of hours you would have worked in 5 weeks had you worked 8 hours a day.</span><br />
<span style="text-align: -webkit-right;"><br />
</span> <span style="text-align: -webkit-right;"><b><i>Because you did it this way, you should now take 9 straight days off for a mini vacation. </i></b></span><br />
<span style="text-align: -webkit-right;"><b><i><br />
</i></b></span> <span style="text-align: -webkit-right;">With 52 weeks in a year, the pattern is something like 40 working weeks, and 10 9-day mini vacations.</span><br />
<br />
That's 200 days working, 90 days off. But, add 10 more days and 4 more weekend days:<br />
210 / 94 + 61 more weekend days from the other weekends.<br />
<br />
We end up with 210 working days and 155 days off. Not bad.<br />
<br />
Will the company shut down if people are out a week after working 4 straight weeks? I doubt it. Rotate the schedule so that not everyone is out the same week. Or don't. Shut the whole thing down. Be creative. Go for it.<br />
<br />
Maybe my math is off a bit, but you get the picture.<br />
<br />
Perhaps there are other, even better options. <b>Maybe 10 weeks on, 2 weeks off (16 days straight!) is the ticket?</b> For example: if you worked the same schedule as above, 9.42 hours a day, you'd have to work 10 weeks in a row, but then could take two full weeks off + 6 weekend days. Since, there are 4 groups of 12 in 52 weeks, you could it 4 times a year!<br />
<br />
It all boils down to the fact that there are multiple ways to work toward this goal of both satisfying your obligations to your career, and of carving out more continuous blocks of time off for rest and recreation.</div><div><br />
<br />
</div>Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-16276069682487221392012-08-26T20:49:00.002-07:002012-08-27T21:46:14.388-07:00Learning CoffeeScript, F#, and Haskell (and brushing up on math)I've started to get very interested in new programming languages, as a result of working with people at <a href="http://www.versionone.com/" target="_blank">http://www.VersionOne.com</a>. At V1, they use CoffeeScript for some of the UI features. While also brushing up on some of my math fundamentals, I started watching this old (but good) video series: <a href="http://www.learner.org/resources/series66.html?pop=yes&pid=189">http://www.learner.org/resources/series66.html?pop=yes&pid=189</a><br />
<div><br />
</div><div>The three algorithms I wanted to implement are factorial, the permutations algorithm, and combinations algorithm. The mathematical short hands for these are typically:</div><div><ul><li>n!</li>
<li>P(n, r)</li>
<li>C(n, r)</li>
</ul><div>To read more about these, you can find thousands of pages on the internet, including <a href="http://en.wikipedia.org/wiki/Permutation">http://en.wikipedia.org/wiki/Permutation</a>. But, I like <a href="http://www.mathisfun.com/">http://www.MathIsFun.com</a> in the algebra section.</div><div><br />
</div><div>Anyway, it's easier for me to memorize math concepts when I write my own functions to give me conceptual, hands-on grounding.</div><div><br />
</div><div><b><u>CoffeeScript:</u></b></div><div><br />
</div><div><div>factorial = (number) -> </div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total = { Value : 1 }</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>iteration = (number, total) -></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>unless number is 0 </div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total.Value = total.Value * number</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>iteration number - 1, total</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total.Value</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>iteration number, total</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div>factorialSplit = (number) -> </div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total = { Value : 1 }</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>factorialSplit_iteration number, total</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total.Value</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div>factorialSplit_iteration = (number, total) -></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>unless number is 0 </div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total.Value = total.Value * number</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>factorialSplit_iteration number - 1, total</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total.Value</div><div><br />
</div><div>permutations = (totalNumberOfItems, numberOfItemsToChoose) -></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>unless numberOfItemsToChoose <= totalNumberOfItems</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>throw "numberOfItemsToChoose cannot exceed totalNumberOfItems"</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total = factorial totalNumberOfItems</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>divisorBase = totalNumberOfItems - numberOfItemsToChoose</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>divisorTotal = factorial divisorBase</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total / divisorTotal</div><div><br />
</div><div>combinations = (totalNumberOfItems, numberOfItemsToChoose) -></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>unless numberOfItemsToChoose <= totalNumberOfItems</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>throw "numberOfItemsToChoose cannot exceed totalNumberOfItems"</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total = factorial totalNumberOfItems<span class="Apple-tab-span" style="white-space: pre;"> </span></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>divisorBase = totalNumberOfItems - numberOfItemsToChoose</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>divisorSubTotal = factorial divisorBase</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>divisorAdditionalToReduceBy = factorial numberOfItemsToChoose</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>divisorTotal = divisorSubTotal * divisorAdditionalToReduceBy</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div><span class="Apple-tab-span" style="white-space: pre;"> </span>total / divisorTotal</div><div><span class="Apple-tab-span" style="white-space: pre;"> </span></div><div>console.log factorial 5</div><div>console.log factorial 10</div><div><br />
</div><div>console.log factorialSplit 5</div><div>console.log factorialSplit 10</div><div><br />
</div><div>console.log permutations 5, 3</div><div>console.log permutations 12, 4</div><div><br />
</div><div>console.log combinations 15, 5</div><div>console.log combinations 5, 3</div></div></div><div><br />
</div><div><b><u>Syntax Explanation</u></b></div><div><b><u><br />
</u></b></div><div>The syntax is a simplification of JavaScript, and is inspired by languages like Ruby and Python, for example. A few key highlights:</div><div><ul><li>The "->" syntax just means that what follows will be the definition of a function.</li>
<li>Whitespace is significant (get over it).</li>
<li>The last statement in a function is the return value, though you can return values earlier by using the return statement.</li>
<li>I made two versions of factorial, one with an embedded function defined within the first, and split one that uses a call to a separately defined function.</li>
</ul></div><div>You can learn more about the CoffeeScript by reading a few good resources:</div><div><ul><li><a href="http://arcturo.github.com/library/coffeescript/">The Little Book on CoffeeScript</a></li>
<li><a href="http://coffeescript.org/">CoffeeScript Web Site</a></li>
</ul><div><b><u>Using with Node.js on Windows</u></b></div></div><div><b><u><br />
</u></b></div><div>Testing with Node.js was trivial. I ran "npm install coffee-script -g" then after creating JMath.coffee, ran "coffee -c JMath.coffee", and finally typed "node JMath.js".</div><div><br />
</div><div>The output was:</div><div><br />
</div><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div><div>120</div></div><div><div>3628800</div></div><div><div>120</div></div><div><div>3628800</div></div><div><div>60</div></div><div><div>11880</div></div><div><div>3003</div></div><div><div>10</div></div></blockquote><div><br />
</div><div>Running the coffee -c command generates the following JavaScript code:</div><div><br />
</div><div><div>// Generated by CoffeeScript 1.3.3</div><div>(function() {</div><div> var combinations, factorial, factorialSplit, factorialSplit_iteration, permutations;</div><div><br />
</div><div> factorial = function(number) {</div><div> var iteration, total;</div><div> total = {</div><div> Value: 1</div><div> };</div><div> iteration = function(number, total) {</div><div> if (number !== 0) {</div><div> total.Value = total.Value * number;</div><div> iteration(number - 1, total);</div><div> }</div><div> return total.Value;</div><div> };</div><div> return iteration(number, total);</div><div> };</div><div><br />
</div><div> factorialSplit = function(number) {</div><div> var total;</div><div> total = {</div><div> Value: 1</div><div> };</div><div> factorialSplit_iteration(number, total);</div><div> return total.Value;</div><div> };</div><div><br />
</div><div> factorialSplit_iteration = function(number, total) {</div><div> if (number !== 0) {</div><div> total.Value = total.Value * number;</div><div> factorialSplit_iteration(number - 1, total);</div><div> }</div><div> return total.Value;</div><div> };</div><div><br />
</div><div> permutations = function(totalNumberOfItems, numberOfItemsToChoose) {</div><div> var divisorBase, divisorTotal, numberOfEvents, total;</div><div> if (!(numberOfItemsToChoose <= totalNumberOfItems)) {</div><div> throw "numberOfItemsToChoose cannot exceed totalNumberOfItems";</div><div> }</div><div> total = factorial(totalNumberOfItems);</div><div> divisorBase = totalNumberOfItems - numberOfItemsToChoose;</div><div> divisorTotal = factorial(divisorBase);</div><div> return total / divisorTotal;</div><div> };</div><div><br />
</div><div> combinations = function(totalNumberOfItems, numberOfItemsToChoose) {</div><div> var divisorAdditionalToReduceBy, divisorBase, divisorSubTotal, divisorTotal, numberOfEvents, total;</div><div> if (!(numberOfItemsToChoose <= totalNumberOfItems)) {</div><div> throw "numberOfItemsToChoose cannot exceed totalNumberOfItems";</div><div> }</div><div> total = factorial(totalNumberOfItems);</div><div> divisorBase = totalNumberOfItems - numberOfItemsToChoose;</div><div> divisorSubTotal = factorial(divisorBase);</div><div> divisorAdditionalToReduceBy = factorial(numberOfItemsToChoose);</div><div> divisorTotal = divisorSubTotal * divisorAdditionalToReduceBy;</div><div> return total / divisorTotal;</div><div> };</div><div><br />
</div><div> console.log(factorial(5));</div><div><br />
</div><div> console.log(factorial(10));</div><div><br />
</div><div> console.log(factorialSplit(5));</div><div><br />
</div><div> console.log(factorialSplit(10));</div><div><br />
</div><div> console.log(permutations(5, 3));</div><div><br />
</div><div> console.log(permutations(12, 4));</div><div><br />
</div><div> console.log(combinations(15, 5));</div><div><br />
</div><div> console.log(combinations(5, 3));</div><div><br />
</div><div>}).call(this);<br />
<br />
<b><u>F# and Haskell:</u></b><br />
<b><u><br />
</u></b> I've been working with Joe Koberg at V1, and he's been exploring a lot of functional languages, which has sparked my interest. Here are my first attempts at writing the same functions in F# and in Haskell:<br />
<br />
<b>F#:</b><br />
<br />
<br />
open System<br />
<br />
let rec factorial (n : uint64) =<br />
if n = 0UL then<br />
1UL<br />
else<br />
n * factorial (n - 1UL)<br />
<br />
let permutations totalNumberOfItems numberOfItemstoChoose =<br />
let total = factorial totalNumberOfItems<br />
let divisorBase = totalNumberOfItems - numberOfItemstoChoose<br />
let divisorTotal = factorial divisorBase<br />
total / divisorTotal<br />
<br />
let combinations totalNumberOfItems numberOfItemsToChoose =<br />
let total = factorial totalNumberOfItems<br />
let divisorBase = totalNumberOfItems - numberOfItemsToChoose<br />
let divisorSubTotal = factorial divisorBase<br />
let divisorAdditionalToReduceBy = factorial numberOfItemsToChoose<br />
let divisorTotal = (divisorSubTotal * divisorAdditionalToReduceBy)<br />
let result = total / divisorTotal<br />
result<br />
<br />
printfn "%A" (factorial 5UL)<br />
printfn "%A" (factorial 10UL)<br />
<br />
printfn "%A" (permutations 5UL 3UL)<br />
printfn "%A" (permutations 12UL 4UL)<br />
<br />
printfn "%A" (combinations 15UL 5UL)<br />
printfn "%A" (combinations 5UL 3UL)<br />
<br />
Console.Read()<br />
<br />
<b><u><br />
</u></b> <b>Haskell</b><br />
<b><u><br />
</u></b> <br />
-- n!<br />
factorial number =<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if number < 1 then<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>number * factorial (number - 1)<br />
<br />
factorial2 0 = 1<br />
factorial2 n = n * factorial (n - 1)<br />
<br />
-- P(n, r)<br />
permutations totalNumberOfItems itemsToChoose =<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>(factorial totalNumberOfItems) / (factorial (totalNumberOfItems - itemsToChoose) )<br />
<br />
permutations2 n r =<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fac_n / fac_n_minus_r<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>where<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fac_n = factorial n<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fac_n_minus_r = factorial (n - r)<br />
<br />
-- C(n, r)<br />
combinations totalNumberOfItems itemsToChoose =<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>(factorial totalNumberOfItems) / ((factorial (totalNumberOfItems - itemsToChoose) ) * (factorial itemsToChoose) )<br />
<br />
combinations2 n r =<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fac_n / ( fac_n_minus_r * fac_r )<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>where<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fac_n = factorial n<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fac_n_minus_r = factorial (n - r)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>fac_r = factorial r<br />
<br />
Now, in the Haskell version there are a couple of versions of each, but it's still less code than any of the others. What I love about this is the minimal number of parentheses, no curly braces, and the <b>where clause</b> that assigns "local definitions" for the permutations2 and combinations2 functions. I'll admit that until I read <a href="http://en.wikibooks.org/wiki/Haskell/Variables_and_functions">http://en.wikibooks.org/wiki/Haskell/Variables_and_functions</a>, I was a bit miffed as to how to do this without defining a constant outside the function, which would have made no sense at all for reusability.<br />
<br />
Thus, while I like all three of these languages so far, I'm most intrigued by the Haskell program and its economy of syntax.<br />
<br />
Learn more about these two languages:<br />
<br />
<br />
<ul><li><a href="http://www.tryfsharp.org/">http://www.tryfsharp.org/</a> (Features online execution env)</li>
<li><a href="http://en.wikibooks.org/wiki/F_Sharp_Programming">http://en.wikibooks.org/wiki/F_Sharp_Programming</a> </li>
<li><a href="http://tryhaskell.org/">http://tryhaskell.org/</a> (Features online execution env)</li>
<li><a href="http://learnyouahaskell.com/chapters">http://learnyouahaskell.com/chapters</a> </li>
<li><a href="http://en.wikibooks.org/wiki/Haskell">http://en.wikibooks.org/wiki/Haskell</a></li>
</ul><br />
<br />
<br />
</div></div>Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-72930940436052414272012-08-23T11:44:00.001-07:002012-08-23T11:44:32.513-07:00Working 40 Hours in 3 Days? Possibilities for Making it WorkI've been thinking about different kinds of work schedules. I found this poll interesting:<br><br><a href="http://boards.straightdope.com/sdmb/showthread.php?t=608388">http://boards.straightdope.com/sdmb/showthread.php?t=608388</a><br> <br><b>Question: If you could choose your own work week hours<br></b><br><b>Responses:<br></b><br><table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center" style="background-color:rgb(255,255,255);color:rgb(0,0,0);border:1px solid rgb(224,224,224);font-family:'Trebuchet MS',Arial,Verdana,sans-serif;font-size:13px"> <tbody><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">5 hours, 42 minutes/day, 7 days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar2-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar2.gif" alt="" width="0" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar2-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="201" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>0</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 0%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">6 hours, 40 minutes/day, 6 days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar3-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar3.gif" alt="" width="0" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar3-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="201" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>0</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 0%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">8 hours/day, 5 consecutive days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar4-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar4.gif" alt="" width="24" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar4-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="177" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>10</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 12.35%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">8 hours/day, 5 non-consecutive days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar5-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar5.gif" alt="" width="4" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar5-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="197" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>2</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 2.47%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">10 hours/day, 4 consecutive days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar6-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar6.gif" alt="" width="80" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar6-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="121" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>32</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 39.51%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">10 hours/day, 4 non-consecutive days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar1-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar1.gif" alt="" width="22" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar1-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="179" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>9</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 11.11%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">13 hours, 20 minutes/day, 3 consecutive days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar2-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar2.gif" alt="" width="32" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar2-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="169" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>13</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 16.05%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">13 hours, 20 minutes/day, 3 non-consecutive days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar3-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar3.gif" alt="" width="2" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar3-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="199" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>1</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 1.23%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">20 hours/day, 2 consecutive days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar4-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar4.gif" alt="" width="0" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar4-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="201" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>0</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 0%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">20 hours/day, 2 non-consecutive days a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar5-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar5.gif" alt="" width="0" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar5-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="201" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>0</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 0%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">40 consecutive hours a week</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar6-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar6.gif" alt="" width="0" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar6-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="201" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>0</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 0%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">40 varyingly distributed hours (i.e. something else)</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar1-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar1.gif" alt="" width="28" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar1-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="173" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>11</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 13.58%</td></tr><tr><td class="alt1" width="75%" style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)">I'm retired</td><td class="alt2" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> <img src="http://boards.straightdope.com/sdmb/images/polls/bar2-l.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar2.gif" alt="" width="8" height="10"><img src="http://boards.straightdope.com/sdmb/images/polls/bar2-r.gif" alt="" width="3" height="10"><img src="http://boards.straightdope.com/sdmb/clear.gif" alt="" width="193" height="10"></td> <td class="alt1" width="12%" align="center" title="Votes" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"><strong>3</strong></td><td class="alt2" width="13%" align="right" nowrap style="font-size:10pt;font-family:'Trebuchet MS',Arial,sans-serif;background-color:rgb(248,248,248)"> 3.70%</td></tr></tbody></table><br>So, is it really possible to do 3 straight days, 13.20 each, and then have 4 days off each week?<br><br>Of course, it is possible if you can swing it and really want to.<br><br><b>Some variations:<br> </b><br>12:05 - 6:05 AM sleep<br>7:00 - 1:30 6.5 hours work<br>1:30 - 2:15 lunch<br>2:15 - 3:15 nap<br>3:15 - 6:45 3.5 hours work<br>6:45 - 8:45 dinner, socialize/family, exercise (whatever you want)<br>8:45 - 12:05 3 hours, 20 minutes work<br> <br>Maybe you'd prefer to exercise from 2:15 to 3:15 instead of nap, and do an evening nap later before the last sprint, but whatever.<br><br>If you could get by on 6 hours nightly sleep PLUS the nap during the day or evening.<br> <br>Or maybe you could try two 6:40 segments from 7 to 1:40 and 5:20 to midnight.<br><br><b>Alternative to three day: 3 big days, 1 tiny day<br></b><br>The more I think about it, the more I like the idea, in general, but 13:20 seems to push it a bit too far.<div> <br></div><div>How about:</div><div><br></div><div>7:30 - 1:30 work (You can eat some snacks while working to tide you over before lunch; besides, isn't it said you should have small meals throughout the day anyway?)</div> <div><br></div><div>1:30 - 6:00 free time. Eat, drink, visit friends, family, do errands, and take a nap after an earlyish dinner. Sleep from 5 to 6 to get your second wind ready.</div><div><br></div><div>6:00 - 12 work</div> <div><br></div><div>This ends up at 12 hours. Or maybe you could handle 7:30 to 3:30, followed by 8 - 12. You get the picture.</div><div><br></div><div><b>The Numbers Game</b></div><div><br></div><div>After 3 days, it's 36 hours worked. On Thursday morning, you do 4 hours of review and preparation for the next week's worth of work.</div> <div><br></div><div>But, the big benefit is now it's noon on Thursday, and you have 3 and a half days completely to yourself, your family and friends, and your own goals.</div><div><br></div><div>Lots of small excursions or even just local travels can be done in 3.5 days. </div> <div><br></div><div>Suppose you have 3 weeks off and 10 holidays. You probably still end up working something like 1,880 hours a year.</div><div><br></div><div>There are 8760 hours in a full year. Subtract 8 a day for sleep. You're still left with 5840.</div> <div><br></div><div>So, you already have about 3960 to yourself. That's 100 more than twice 1,880!</div><div><br></div><div><b>The Trouble With Today's Work Environments</b></div><div><br></div><div>So, why is it so difficult these days to <b>actually feel </b>like you're not working all the time? Maybe it's because you actually <i><b>are</b></i>, in <b><i>your brain</i></b>.</div> <div><br></div><div>It's not always possible to "just turn off" your brain when you're working on difficult, and interesting, problems to solve.</div><div><br></div><div>And, when you work in technology, sometimes a "schedule" like 9-5 is a ridiculous thing to even talk about. Creative problem solving work is not the same thing as assembling parts in a factory that have <b>*already been creatively designed by someone else long ago and made into a formulaic process to follow*. </b>It can, and should, be mentally exhausting work to create technological products and services properly.</div> <div><br></div><div>Poorly designed technologies often result when people are completely burnt out and treated as if they belong in the long out-dated stereotypical factories of the 19th and 20th century.</div><div><br></div> <div><b>Work Hard, Recover Harder</b></div><div><br></div><div>A lot of self-styled "rugged" or "progressive" companies adore the phrase "Work Hard, Play Hard", or something like that. Often this works out to something more like:</div> <div><br></div><div>"We own this company, and you work for us, but we also like to have fun -- at least, the kind of fun that we deem to be fun, and therefore you also should deem to be fun. Therefore, when you are here, you will work hard, and we will inject our form of 'fun' into the day in order for you to see us as a company that also 'plays hard'."</div> <div><br></div><div>Needless to say, this is misguided.</div><div><br></div><div><b>Daniel Pink's Drive and the Results Only Work Environment</b></div><div><br></div><div>Have you read Drive, by Daniel Pink? If not, have you heard what BestBuy's corporate office did? They turned themselves into what they call a ROWE, a results-only work environment. Here's more about the people who pioneered the concept:</div> <div><br></div><div><a href="http://www.gorowe.com/">http://www.gorowe.com/</a> </div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="color:rgb(63,63,63);font-family:Helvetica,sans-serif;font-size:14px;line-height:23.100000381469727px;background-color:rgb(255,255,255)">Results-Only Work Environment goes beyond telework. It's a management strategy where employees are evaluated on performance, not presence. In a ROWE, people focus on results and only results – increasing the organization's performance while cultivating the right environment for people to manage all the demands in their lives...including work.</span></div> <div><span style="color:rgb(63,63,63);font-family:Helvetica,sans-serif;font-size:14px;line-height:23.100000381469727px;background-color:rgb(255,255,255)"><br></span></div></blockquote><font color="#3f3f3f" face="Helvetica, sans-serif"><span style="font-size:14px;line-height:23.100000381469727px">Think this is just a gimmick, that BestBuy is a fluke? Think again. How about these companies:</span></font><div> <font color="#3f3f3f" face="Helvetica, sans-serif"><span style="font-size:14px;line-height:23.100000381469727px"><br></span></font></div><div><a href="http://www.gorowe.com/about/clients/">http://www.gorowe.com/about/clients/</a> </div> <div><div><br></div><div>Are they flukes too? Gap, Banana Republic, etc. </div><div><br></div><div><b>Personal Summation</b></div><div><br></div><div>In the modern age, it's ridiculous to expect creative, skilled knowledge and information workers to want to work the "routines" of the 19th and 20th centuries. Obviously, companies like BestBuy Corporate, GAP, etc have found better ways of working and retaining talented thinkers and leaders.</div> <div><br></div><div>Working 9 to 5 (or 7 to 5, or whatever) 5 days a week is not a badge of honor. It's often a curse, because many of us do not, cannot, simply be "present" for x number of hours and turn off our brains and attend to "the rest of life". We are goal and results-oriented, and want to create valuable results by working long hours that require intense concentration and attention to details that often get overlooked.</div> <div><br></div><div>So, in a culture that, at large, has not yet adapted to the mental and creative demands of the 21st century, we must find ways to "put in our 40" creatively, and in a sustainable way.</div><div> <br></div><div>For me, that definitely means giving a short at "4 10s", or even "3 12s and a 4".</div><div><br></div><div>Wish me luck.</div><div><br><br><br><br></div></div> Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-37332291210251307982012-08-23T10:56:00.001-07:002012-08-23T10:56:37.429-07:00Testtest Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-8810914317584887512012-06-22T23:32:00.000-07:002012-06-22T23:33:18.352-07:00Leading Technical Teams is Not Like Managing an Assembly Line<div>Often times people who grew up in another era or time equate management with "task mastering". This is unfortunate when it comes to the management of software projects, because it's not an effective way to manage people, products, services, or projects.</div> <div><br></div><div>I don't have much to say that has not been said better elsewhere on this subject.</div><div><br></div><div>Two good references are Mary Poppendieck's presentation named The Role of Leadership in Software Development:</div> <div><br></div><div><a href="http://www.youtube.com/watch?v=ypEMdjslEOI">http://www.youtube.com/watch?v=ypEMdjslEOI</a></div><div><br></div><div>And, Daniel Pink's book <u>Drive: The Surprising Truth About What Motivates Us:</u></div> <div><br></div><div><a href="http://www.amazon.com/Drive-Surprising-Truth-About-Motivates/dp/0143145088">http://www.amazon.com/Drive-Surprising-Truth-About-Motivates/dp/0143145088</a></div><div><br></div><div><br></div><div> <br></div><div><br></div> Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-68193028361966792982012-06-03T18:28:00.001-07:002012-06-03T18:28:29.651-07:00Sonatina I Progress, the Wisdom of Slowness in Music Practice, and Agile Songware Development<p>I've decided to mostly keep just one blog and start doing a better job with tags for separating out categories. In that spirit, this one is for my own tracking of piano progress. But, it will have some tangents with agile, anyway.</p> <p>A few years ago when I decided I wanted to stop just toying with "Alfred's All in One Adult Beginner Course", I realized I needed to focus on one complete song, from end to end. I even joked with a coworker who I had helped introduce Scrum at a company with that I was going to work toward a "potentially performable songware increment", like Scrum's "potentially shippable software increment".</p> <p>This absolutely worked for me. I focused on learning a relatively short song called "October", a song that features mostly piano, from the 1981 album of the same name by U2. I picked this because I remembered long ago wondering what I would have to do to play it if I actually knew how to play piano.</p> <p>But, it also reminded me of my aunt Kara, because she had introduced U2's music to me when I was 10 years old in 1987 by handing me a copied tape of The Joshua Tree, complete with a photo-copied insert cover.</p> <p>Kara was by this later time in 2008 ill with Lou Gehrig's disease. I wanted to be able to play the song someday for her. I soon became proficient enough with the song on my little electronic keyboard, and recorded it on MP3 and sent it to her. Later, after she passed away in early 2011, I performed the song at her memorial service, which was about a year ago now in June of 2011.</p> <p>For me, someone who had only played a recorder in 2nd grade, to ever have imagined myself performing anything musical in front of people was a big confidence booster. I did not make any glaring mistakes either, which I was also happy about (phew!)</p> <p>During the process of *learning how to play that first "playable song increment"*, there is no way a teacher would look at what I was doing and say my form was correct, or that my fingering was optimal.</p> <p>I had one teacher as Little Five Points Music Center, Natia, who helped me get through that first song and started me on what has become a more "methodologically sound" approach to learning, which includes understanding reading music, understanding scales, intervals, chords, modes, etc.</p> <p>But, again, in the beginning, I simply forced myself, note by note and measure by measure to figure out which keys to push down with the right hand and which to hold down with the left hand, and eventually when to push the pedal with my foot -- which I still don't have totally correct.</p> <p>I have now been taking lessons with Charles Hutton, from Charles Hutton Piano Studio, for almost a year now after that first performance. He has helped me start from where I was to progress through playable "increments" of music that teach the fundamentals of scales, chords, inversions, and intervals. Each song has helped me to experience the important satisfaction of adding to my reportoire, or my "portfolio" if you will, while also learning about those musical theory concepts.</p> <p>I would, as I am sure he would, still classify myself as an "Advanced Beginner". But, if you are the kind of learner, like I am, who cannot sit still, physically or mentally, without a combined practical and theoretical understanding, then I would definitely recommend Charles and his approach for learning.</p> <p>Touching back on agile software, we know that Iteration is fundamental to Incremental delivery. That,is, one must build a software module in an iterative fashion. Iteration means approaching the analysis, design, development, deployment, and testing in repeated cycles. This is coupled with incrementalism, which means approaching the problem by breaking the large goal, the entire system, into smaller slices.</p> <p>During each iteration, learning happens. This learning then feeds back into the next iterative step. This process cycles round and round and continues to pull in more and more incremental slices of the system as it goes. This process resembles the "Plan Do Check Act" approach, and even the basics of the "Scientific Method".</p> <p>Given a piece of music, it is already replete with requirements! After all, the sheet music is staring you in the face. All you have to do is read that requirements document and just play it.</p> <p>Of course, a software requirements document is rarely anywhere near as complete or unambiguous as a sheet of music is. No, not even close, and that is a subject for a different day.</p> <p>It is actually highly possible for well trained, seasoned musicians, of course, to sit down in front of a piano and play directly from the sheet music the first time they see it. Sometimes in one sitting they can get it "right". Even then, they will rarely feel like they did it perfectly the first time, and will repeat it many times before feeling proficient.</p> <p>I have been struggling to feel any real progress recently in learning new songs, partly due to lack of practice time, but partly due to gaps in my approach, which Charles has helped me to see and approach differently, and in fact much closer to the way I develop a software program anyway.</p> <p>Here's how:</p> <p>First, from reading Neil Miller's The Piano Lessons Book, I became convinced of the "Learn it Backwards" method, something Charles also said other teachers call "The Reverse Brick Laying Method".</p> <p>This means take the last two measures of a song, learn those FIRST! Then, add measures backward toward the beginning.</p> <p>Why? Well, when you start to play back what you have practiced this way, you start at what you more recently learned, and have played fewer times, and progress toward measures you have played more often.</p> <p>Since you have played them fewer times, you are more likely to make a mistake on those, and will thus waste less time than if you were to always play back from the beginning and into less frequently practiced measures toward the end.</p> <p>However, Charles helped me to start to logically segment pieces into phrases and groups of measures that flow well together. So, in my current piece, Sonatina I by Thomas Attwood, we have marked off measures 17 to 24 as a logical group.</p> <p>Within that, we have:</p> <p>17 to 18 Right Hand<br> 19 to 20 RH<br> 17 to 20 RH<br> 21 to 22 RH<br> 21 to 24 RH<br> 17 to 24 RH</p> <p>Then, same thing but with Left Hand, or bass.</p> <p>And, then trying them with both left and right hands.</p> <p>As you can tell, this is the epitome of an Iterative, and Incremental development process.</p> <p>And, it is also an iterative and incremental analysis, design, and delivery method.</p> <p>Here is how Charles has explained what should happen when practicing this way, and what it should feel like:</p> <p>When playing 17 to 18, do it slowly enough to play the notes correctly, and with the correct fingering, ignoring the rhythm count for the moment.</p> <p>Next, try it again, slightly faster.</p> <p>If I make a mistake, then learning has not happened properly yet, and something is wrong. Stop the line. Correct it immediately. Go back.</p> <p>But, wait, here is where we diverge from "Lean Manufacturing" and it's "stop the line" mantra you may recognize and move closer into agile software, at least the way I see agile.</p> <p>As Charles explained it, helping me get past my reluctance to move further into more measures, you MUST move forward when still uncomfortable, and while still *making mistakes*.</p> <p>That is: yes, stop and fix the measure, to a point. But, after correcting it to a sufficient degree, expand the surface area of practice. Move down to measures 19 and 20. If you flub on those, also stop and fix, but only to the point of basic comfort.</p> <p>Then, cycle back (iterate) on measures 17 through 20.</p> <p>Again, this iteration should procede slowly enough to get the notes correct the first time. But, next it should be played at a more uncomfortable, error-prone pace.</p> <p>When making errors at this pace, seek to "pin point" where, and then "zoom in" on those points.</p> <p>Are they transition points?</p> <p>Are they fingering oddities or shifts?</p> <p>Incorrect fingerings?</p> <p>Incorrect timing? Held a note too long, not long enough?</p> <p>The diagnosis will vary from "fracture" to fracture, now zoom in and correct it in *isolation*, or in collaboration with adjacent measures to assure smooth entry and exit.</p> <p>According to Charles, doing this will NOT feel comfortable, and mistakes and fractures will happen. This is expected and good, and the remedy is the iterative process, the repeition, the cycle.</p> <p>What mitigates against the failure besides the repitition? What ensures eventual success?</p> <p>Well, quite simply: your own ears and others' ears. The expectation of correct playback is already encoded in our ears. We will know it when we hear it. Fair enough.</p> <p>The parallel to software development here is more nuanced. We cannot know that a subsystem of function works by hearing or seeing it! Most of software happens below the user interface, and nobody ever sees or hears it.</p> <p>This is why the test-driven, unit-test covered, and acceptance-test driven approaches to software are so important.</p> <p>TODO: fnsh<br> </p> Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-30936247975755045412012-05-16T15:47:00.004-07:002012-05-22T18:39:55.134-07:00Draft: The Centers for Defect Control and Prevention: Public Health and Epidemiology Principles for the Development of Information Systems<div class="gmail_quote"><div lang="EN-US" link="blue" vlink="purple"><h2>Introduction</h2><div class="MsoNormal">Have you ever thought much about the following statement?</div><div class="MsoNormal"><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b><span style="color: #0070c0;">"CDC 24/7: Saving Lives, Protecting People, Saving Money through Prevention"<u></u><u></u></span></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">This is the banner headline on <a href="http://www.cdc.gov/" style="color: #1155cc;" target="_blank">http://www.cdc.gov</a>, the home page for the United States Centers for Disease Control and Prevention. It's an important statement that conveys the constant vigilance, goals, and primary mindset required in today's world needed to help keep people healthy!<u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Another thing you may have never thought about is the vast and varied number of <b>information systems</b> required for epidemiologists and other public health professionals to quickly and reliably perform the public health surveillance and other scientific work required to achieve their goals of improving human health. It's easy to understand why such systems are necessary, though. Simply consider how quickly people travel today from country to country and how quickly infectious diseases can spread. Recall the SARS pandemic from 2003 as an example.</div><div class="MsoNormal"><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">In the world of public health, these systems operate all over the United States and world, at local, state, territorial, and federal levels and in collaboration across national boundaries. They empower the public health workforce to control and prevent disease in a variety of biological populations. Human health also depends upon animal health and the health of plants, trees, and ecosystems as a whole. The entire ecosystem is the shared environment, or context, within which we all live.<u></u><u></u></div><h2><b>Disclaimer</b></h2><div class="MsoNormal">I do not work directly for CDC or as a federal employee, so these opinions are based only in my own experience working with contracting companies on technology teams providing services to CDC and the public health community at large. I am also not a public health expert, so these ideas are a work-in-progress as my own understanding of public health and epidemiology evolves.</div><h2><b>Article Series Goal: Building The Centers for <i>Defect</i> Control and Prevention</b></h2><div class="MsoNormal">Having helped build CDC mission-critical information systems that protect the public's health, I feel is important to share ideas for improving those systems and the process undertaken to build them. This is the first of a multi-part series of articles that will create a vision for CDC's information systems acquisition and development process, a vision that applies the very principles of public health itself and epidemiology to guide those processes. As we'll see, there are already many parallel concepts between the disciplines. The goal is that CDC should also stand for <b>Centers for </b><i style="font-weight: bold;">Defect </i><b>Control and Prevention </b>when it comes to its information systems.</div><div class="MsoNormal"><br />
</div><div class="MsoNormal">This first article will introduce several fundamental concepts of epidemiology and disease control and prevention while drawing parallels with the activities necessary for designing and developing successful, useful, and cost-effective information systems. </div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Terms we'll introduce related to epidemiology are:</div><ul><li style="margin-left: 15px;">Epidemiology</li>
<li style="margin-left: 15px;">Populations</li>
<li style="margin-left: 15px;"> Control (as in controlling health problems)</li>
<li style="margin-left: 15px;">Disease</li>
<li style="margin-left: 15px;">Determinant</li>
<li style="margin-left: 15px;">Incidence</li>
<li style="margin-left: 15px;">Prevalence</li>
<li style="margin-left: 15px;">Incubation Period</li>
<li style="margin-left: 15px;">Subclinical Infection</li>
<li style="margin-left: 15px;">Quarantine and Isolation</li>
</ul><div>For each of these concepts from the domain of epidemiology, which pertains to biological, chemical, ecological (ultimately physical) objects, we'll draw parallel models within the world of information systems which pertain, ultimately, to technological objects.</div><div class="MsoNormal"><u></u></div><h2><b>Definition: Epidemiology</b> </h2><div class="MsoNormal"><u></u></div><div class="MsoNormal">CDC defines epidemiology as:<u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="margin-left: 0.5in;"><i>The study of the distribution and determinants of health-related states in specified populations, and the application of this study to control health problems.<u></u><u></u></i></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="text-indent: 0.5in;"><b>Source:</b> <a href="http://www.cdc.gov/excite/classroom/outbreak/steps.htm" style="color: #1155cc;" target="_blank">http://www.cdc.gov/excite/classroom/outbreak/steps.htm</a><u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">There is a lot more to say about that, but for this article, let's highlight these two parts:</div></div></div><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><div class="gmail_quote"><div lang="EN-US" link="blue" vlink="purple"><ul><li><i><b>Populations</b>—One of the most important distinguishing characteristics of epidemiology is that it deals with groups of people rather than with individual patients.</i></li>
<li><i><b>Control</b>—Although epidemiology can be used simply as an analytical tool for studying diseases and their determinants, it serves a more active role. Epidemiological data steers public health decision making and aids in developing and evaluating interventions to control and prevent health problems. This is the primary function of applied, or field, epidemiology.</i></li>
</ul></div></div></blockquote><div class="gmail_quote"><div lang="EN-US" link="blue" vlink="purple"><h2><b>Controlling and Preventing Information System Disease in Populations of Technological Objects</b><span style="font-family: arial, sans-serif; font-size: 13px;"> </span></h2><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">Information systems are like ecosystems. But, instead of being composed of populations of <i>biological</i> objects, they're composed of populations of <i>technological</i> objects. Beyond that obvious differences in these types of populations are a great many similarities regarding control and prevention surveillance and intervention techniques needed to keep these populations <i>healthy and free of disease</i>.</div><h3><b><span style="color: red;">Wait, can information systems really be diseased? I believe they can, and that <i>all too many of them are</i>.</span></b><span style="font-family: arial, sans-serif; font-size: 13px;"> </span></h3><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">Here's a standard dictionary definition of the word "disease":<u></u><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px; margin-left: 0.5in;"><i>"a disordered or incorrectly functioning organ, part, structure, or system of the body resulting from the effect of genetic or developmental errors, infection, poisons, nutritional deficiency or imbalance, toxicity, or unfavorable environmental factors; illness; sickness; ailment."<u></u><u></u></i></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px; margin-left: 0.5in;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px; margin-left: 0.5in;"><span style="font-size: 9pt;"><b>Source:</b> <a href="http://dictionary.reference.com/browse/disease" style="color: #1155cc;" target="_blank">http://dictionary.reference.com/browse/disease</a><u></u><u></u></span></div><h2><b>Definition: Information System Disease</b> </h2><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><b><u></u></b></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">Here's my adapted definition for "Information System Disease": </div><blockquote class="tr_bq"><i>"an incorrectly functioning or incomplete component, feature, sub-system, or unit of a an information system resulting from the effect of requirements, design, or developmental errors and defects, performance, usability, or capability deficiency, or unfavorable environmental factors such as network communications failures or operating system incompatibilities."</i> </blockquote><b style="font-family: arial, sans-serif; font-size: 13px;"><span style="font-size: 10pt;">Aside: With the increasing use of biotechnology and nanotechnology that interacts with our own biology, it will become increasing difficult to draw any clear distinctions between a designed technologically-augmented biological system and one that is strictly naturally evolved.</span></b><br />
<div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">The phrase "developmental errors and defects" has a much catchier name:<b><span style="color: #9bbb59;"> Bugs! </span>That actually sounds a bit like the germ-theory of disease doesn't it? </b>A lot of people refer to catching "the flu bug" or being "sick with some bug".<span style="color: #9bbb59;"><u></u><u></u></span></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><b>Here is a photo of the "first actual bug" found in 1946:<u></u><u></u></b></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div align="center" class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHHyBAg5gwt85YAbzeSc1Mx8CgoTSTa0aGAyQZMBUN54rGoseOTAJ0V-sLcfdnKSmADEH53u6JMrFfN3ZGz55JFLhCfz3rLQp7EK5K7tDVsCgrcHXGVNh1fhBiDu7iMB2QEEFv1u1hG6M/s1600/image003-754227.jpg"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5743266582036532402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHHyBAg5gwt85YAbzeSc1Mx8CgoTSTa0aGAyQZMBUN54rGoseOTAJ0V-sLcfdnKSmADEH53u6JMrFfN3ZGz55JFLhCfz3rLQp7EK5K7tDVsCgrcHXGVNh1fhBiDu7iMB2QEEFv1u1hG6M/s320/image003-754227.jpg" /></a><b><span style="color: #9bbb59;"><u></u><u></u></span></b></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">Trivia aside, our definition encompasses a lot of different types of "inputs", though not all, but it focuses in the beginning on one critical perception: <u></u><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px; text-indent: 0.5in;"><i>an incorrectly functioning or incomplete component, feature, sub-system, or unit<b><u></u><u></u></b></i></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">This brings us to one more important definition before we move on.</div><h2><b>Definition: Determinant</b> </h2><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px; text-indent: 0.5in;"><i>any factor that brings about change in a health condition or in other defined characteristics<u></u><u></u></i></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">In epidemiology, a determinant can take on a broad range of concrete forms. In summary, the World Health Organization groups them into these categories: </div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><u></u></div><div style="font-family: arial,sans-serif; font-size: 13px;"></div><ul><li>the social and economic environment,</li>
<li>the physical environment, and</li>
<li>the person's individual characteristics and behaviors. </li>
</ul><div style="font-family: arial,sans-serif; font-size: 13px;"><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><b>Source: </b><a href="http://www.who.int/hia/evidence/doh/en/" style="color: #1155cc;" target="_blank">http://www.who.int/hia/evidence/doh/en/</a> </div><h2><b>The Determinants of Information System Health are <i>Almost Always</i> Human-Caused</b> </h2><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">Information systems differ from biological systems because they are specifically <i>designed</i> by humans to serve human needs or goals. Because information systems are designed by us, we have better <i>internal control</i> over the resulting behavior, and thus the healthy status, of information systems. Compare this to the medical or epidemiology professions where purely <i>naturalistic, biological systems</i> are constrained only by the laws of nature, many of which we only partially understand and have only <i>partial</i> <i>external control</i>.<u></u><u></u></div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"><br />
</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;">Since software development is entirely human-made, and consists of a closed set of concepts entirely understandable and <i>controllable</i>should we understand and follow a few simple guiding principles that we'll introduce in the next article. Because of this fact, software development can be done in a way that <i>defect prevention</i> is this built in<b><i> from the beginning</i></b>. But for now, let's introduce a few more epidemiology terms and see how they apply to software development.</div><div class="MsoNormal" style="font-family: arial,sans-serif; font-size: 13px;"></div><h2>Definition: Incidence </h2><div style="font-family: arial,sans-serif; font-size: 13px;"></div></div></div><blockquote><div class="gmail_quote"><div lang="EN-US" link="blue" vlink="purple"><div class="MsoNormal"></div><div class="MsoNormal"><i>Incidence refers to the occurrence of new cases of disease or injury in a population over a specified period of time</i> </div></div></div></blockquote><blockquote><div class="gmail_quote"><div><div lang="EN-US" link="blue" vlink="purple"><div class="MsoNormal"><span style="font-weight: bold;">Source: </span></div></div></div><a href="http://www.ihs.gov/medicalprograms/portlandinjury/pdfs/principlesofepidemiologyinpublichealthpractice.pdf" style="color: #1155cc;" target="_blank">http://www.ihs.gov/medicalprograms/portlandinjury/pdfs/principlesofepidemiologyinpublichealthpractice.pdf</a></div></blockquote><div class="gmail_quote"><div lang="EN-US" link="blue" vlink="purple"><h2> Definition: Prevalence</h2></div></div><blockquote><div class="gmail_quote"><div lang="EN-US" link="blue" vlink="purple"><div class="MsoNormal"></div><div class="MsoNormal"><i>Prevalence, sometimes referred to as prevalence rate, is the proportion of persons in a population who have a particular disease or attribute at a specified point in time or over a specified period of time. Prevalence differs from incidence in that prevalence includes all cases, both new and preexisting, in the population at the specified time, whereas incidence is limited to new cases only.</i></div></div></div></blockquote><blockquote><div class="gmail_quote"><div lang="EN-US" link="blue" vlink="purple"><div class="MsoNormal" style="font-weight: bold;"> <b>Source: </b><a href="http://www.ihs.gov/medicalprograms/portlandinjury/pdfs/principlesofepidemiologyinpublichealthpractice.pdf" style="color: #1155cc;" target="_blank">http://www.ihs.gov/medicalprograms/portlandinjury/pdfs/principlesofepidemiologyinpublichealthpractice.pdf</a> </div></div></div></blockquote><div class="gmail_quote"><div lang="EN-US" link="blue" vlink="purple"><div class="MsoNormal" style="font-weight: bold;"><br />
</div><h2>Applying Incidence and Prevalence to Information System Development and <i>Defect </i>Control and Prevention </h2><div class="MsoNormal"><u></u></div><div class="MsoNormal">We saw above that defect prevention can be built into the software development process <b><i>from the beginning</i></b>. While this is true and will be explained in detail in another article, we need to consider the all too common scenario that we are all used to: <b><i><span style="color: #9bbb59;">buggy software.</span><u></u><u></u></i></b></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Let us equate a software defect, bug or otherwise <i>"incorrectly functioning or incomplete component, feature, sub-system, or unit"</i>, with<i>"disease or injury"</i> from the definition of incidence.<u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Now, suppose an organization hires a contracting company to build a large information system. The contractor says the system will be ready to deploy to a production environment for use by the end of one year's time from project inception.<u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Next, suppose this company sets out to analyze and define <i>all the requirements</i> to build that system <i>before building even a single small portion</i> of the system. Suppose this process takes six months before any new code is written at all. The company delivers large <i>requirements and design documents</i> to their customer at the end of this process.<u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">At this point, there may already be a <i><b>high prevalence of undiagnosed defects</b></i> inside of the requirements and design documents for that system! Thus, any ensuing "disease" has not yet had a "date of first occurrence" because <b><u>none</u></b> of the system's code has been written, tested, or used -- <i><span style="color: red;"><b>not even in prototype or proof-of-concept form</b></span></i>!<u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><u></u><u></u></div><div class="MsoNormal">Here are a few more epidemiological terms that draw immediate analogies:</div><h2><b>Definition: Incubation Period</b> </h2><div class="MsoNormal"><u></u></div><div class="MsoNormal" style="margin-left: 0.5in;"><i>A period of subclinical or unapparent pathologic changes following exposure, ending with the onset of symptoms of infectious disease.<u></u><u></u></i></div><h2><b>Definition: Latency Period</b> </h2><div class="MsoNormal"><b><u></u></b></div><div class="MsoNormal"><u></u></div><div class="MsoNormal" style="margin-left: 0.5in;"><i>A period of subclinical or unapparent pathologic changes following exposure, ending with the onset of symptoms of chronic disease.<u></u><u></u></i></div><h2><b>Defects Latent in Large Documents Have a Long Incubation Period Followed by Sudden Onset</b> </h2><div class="MsoNormal"><b><u></u></b></div><div class="MsoNormal"><u></u></div><div class="MsoNormal">Now we can understand that when the contractor spent six months building a large requirements and design document, but built no physical code for others to review and use they raised the risk of "infection" which will likely result in a sudden, or acute, onset of a variety of problems. Ultimately, this will be measured as both a <b><i>high incidence</i></b> and a <b><i>high prevalence</i></b> during the time period the defects are discovered.</div><h2><b>Latent Defects are Like Subclinical Infections Until Onset</b> </h2><div class="MsoNormal"><u></u></div><div class="MsoNormal">Wikipedia defines a subclinical infection as follows:<u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="margin-left: 0.5in;"><i>"A subclinical infection is the asymptomatic (without apparent sign) carrying of an (infection) by an individual of an agent (microbe, intestinal parasite, or virus) that usually is a pathogen causing illness, at least in some individuals. Many pathogens spread by being silently carried in this way by some of their host population. Such infections occur both in humans and nonhuman animals."</i><u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Now we know such infections occur in humans, nonhuman animals, and <b><i>large requirements and design documents</i></b> not yet tested by tangible development. Keep in mind that "tangible development" does not mean 100% complete and ready for release, but it does mean, at minimum, prototyped and delivered in a visible, clickable, malleable form -- not just words on paper or promises in contractual agreements.</div><h2><b>Applying Quarantine and Isolation Tactics Not Just at Borders</b> </h2><div class="MsoNormal" style="margin-left: 0.5in;"><u></u></div><div class="MsoNormal">Let's now consider quarantine and isolation practices, considering the SARS outbreak mentioned above. When SARS happened, public health officials acted quickly and implemented quarantine procedures to try to control and prevent the spread of the pathogen into their own populations. Consider this summation of quarantine measures from Taiwan:<u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: x-small;">During the 2003 Severe Acute Respiratory Syndrome (SARS) outbreak, traditional intervention measures such as quarantine and border control were found to be useful in containing the outbreak. We used laboratory verified SARS case data and the detailed quarantine data in Taiwan, where over 150,000 people were quarantined during the 2003 outbreak, to formulate a mathematical model which incorporates Level A quarantine (of potentially exposed contacts of suspected SARS patients) and Level B quarantine (of travelers arriving at borders from SARS affected areas) implemented in Taiwan during the outbreak. We obtain the average case fatality ratio and the daily quarantine rate for the Taiwan outbreak. Model simulations is utilized to show that Level A quarantine prevented approximately 461 additional SARS cases and 62 additional deaths, while the effect of Level B quarantine was comparatively minor, yielding only around 5% reduction of cases and deaths. The combined impact of the two levels of quarantine had reduced the case number and deaths by almost a half. The results demonstrate how modeling can be useful in qualitative evaluation of the impact of traditional intervention measures for newly emerging infectious diseases outbreak when there is inadequate information on the characteristics and clinical features of the new disease-measures which could become particularly important with the looming threat of global flu pandemic possibly caused by a novel mutating flu strain, including that of avian variety.</span><span style="font-size: 9pt;"><u></u><u></u></span></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="text-indent: 0.5in;"><b>Source:</b> <a href="http://www.ncbi.nlm.nih.gov/pubmed/17055533" style="color: #1155cc;" target="_blank">http://www.ncbi.nlm.nih.gov/pubmed/17055533</a><u></u><u></u></div><div class="MsoNormal" style="text-indent: 0.5in;"><br />
</div><div class="MsoNormal" style="text-indent: 0.5in;"><u></u><u></u></div><div class="MsoNormal">What this summary illustrates is that quarantine, when applied at a <i>higher level in the chain of transmission</i> led to a far better reduction in the incidence rate of infection. The other measure led to a more modest, 5% reduction of cases and deaths.<u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b><span style="color: #0070c0;">What would happen if we applied this kind of model to the development of information systems, and did it at many levels, in order to prevent large populations of infected, buggy, defect-ridden documents or code from becoming <i><u>integrated</u></i> with healthy, corrected, defect-free populations (of software objects)?</span></b></div><h2><b>Defining the Quarantine Model of Integration</b></h2><div class="MsoNormal">Let's define a simplified "Quarantine Model of Integration" that can apply to more than just humans with possible infections crossing borders, but can also apply to requirements documents, design documents, napkin sketches, whiteboard scrawling, information system releases or upgrades, specific system features, and certainly all the way down to discrete units of software code.<u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal"><b>Population A:</b> Some set of individual objects.<u></u></div><div class="MsoNormal"><b>Population B</b>: Another set of individual objects similar to Population A.<u></u><u></u></div><div class="MsoNormal"><b>Population B-Harmful:</b> Some potential subset of population B with harmful characteristics that would disrupt and weaken the integrity of desired characteristics if introduced into Population A.<u></u><u></u></div><div class="MsoNormal"><b>Population B-Benign:</b> Some potential subset of population B without harmful characters if integrated into Population A.<u></u><u></u></div><div class="MsoNormal"><b>Mitigating Filter Procedures:</b> A set of actions that can be taken upon Population B to identify <b>Population B-Harmful</b> and <b>Population B-Benign</b>, thus allowing Population B-Benign to be integrated into Population A without harming it (while also isolating and preventing Population B-Harmful from integrating)</div><h2><b>Improving Outcomes by Applying the Quarantine Integration Model Throughout the Development of an Information System</b> </h2><div class="MsoNormal"><u></u></div><div class="MsoNormal">We will delve into the specifics of how to apply a model like this to control the development process in the next article. However, the type of control and prevention practices that are necessary when building an information system are different from what you might have seen in many large projects, such as the fictional one described above. Many projects undertaken by large corporations or governments attempt, with good intention, to prevent exposure to risks and defects by trying to define as many "requirements" and "design details" in large documents long before any of the software system is constructed. This is most often a mistake. It's a mistake, as we'll see, that goes back at least 42 years to 1970, but perhaps even further.<u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">You probably remember that I earlier wrote:<u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal" style="margin-left: 0.5in;"><i>Because information systems are designed by us, we have better internal control over the resulting behavior, and thus the healthy status, of information systems.<u></u><u></u></i></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">The key phrase there is "resulting behavior". What is unstated is that the <i>process of creating</i> that resulting behavior is itself can take a very meandering path that is very iterative (completed in multiple passes) and incremental (completed as a series of smaller divisions of a larger whole) </div><div class="MsoNormal"><br />
</div><div class="MsoNormal">It's often said that an empirical model of process control is needed to properly manage this kind of creative, evolutionary process. </div><div class="MsoNormal"><u></u></div><h2><b>Definition: Empirical Process Control Model</b> </h2><div class="MsoNormal"><u></u></div><div class="MsoNormal" style="margin-left: 0.5in;"><i>The empirical model of process control provides and exercises control through frequent inspection and adaptation for processes that are imperfectly defined and generate unpredictable and unrepeatable outputs.<u></u><u></u></i></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">Notice that an empirical process control model is a lot like the scientific method. In the next article, we'll also discuss how scientific knowledge advances through iterative, incremental, and evolutionary spurts. For example: we all know that one woman's hypothesis and experiment would not overturn the germ-theory of disease if she claimed that illness was caused by another mechanism. </div><div class="MsoNormal"></div><h2>Peer Review is the Hallmark of Sound Science (And Also of a Sound Information Systems Development Process)</h2><br />
<div class="MsoNormal">In the case above, we know the scientist's ideas must face the rigor of the peer review system that is the hallmark of science. The peer review process is just one implementation of the "Quarantine Model of Integration" we just defined. And, peer review is, in fact, the self-correcting mechanism <i>built into the heart of science</i> which differentiates it from countless other "ways of knowing" that our human species has and continues to utilize.<u></u><u></u></div><div class="MsoNormal"><br />
</div><div class="MsoNormal">That peer-review system is also, naturally, at the heart of what CDC does in its constant effort to do sound science. And, as we'll preview next time, several types of peer review, and even-wider-review, <i>are at the heart of any successful process for developing a winning, useful, and cost-effective information system</i>.</div></div></div>Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-86423971547784663092012-04-22T09:54:00.001-07:002012-04-22T09:54:54.343-07:00Replace Your Unique Web Addresses One-by-One, Just Like They Replace Unique Mailing Addresses in the Construction Industry<p>Many people in the software industry like to make an analogy between "building a house" and building an information system.</p> <p>Fair enough, at first thought.</p> <p>But, do you think construction workers ever tell other construction workers: "This is a lot like programming an information system...etc, etc".</p> <p>Probably not.</p> <p>Why? Because construction workers know that building a house is very little like programming information systems. </p> <p>First of all, one is entirely physical and requires vast amounts of three-dimensional space, while the other, physically, is entirely based upon electronic states and fits inside of the space of a thimble. This is just a small example which could go on for pages and pages.</p> <p>Yet, all is not lost in the construction analogy, especially if you think about rennovating a house, or better yet: a neighborhood or city improvement project, and compare that to the case of reengineering web-based, distributed information systems.</p> <p>Neighborhoods, cities, and towns all have discrete, individual buildings. Each building has a Unique Mailing Address.</p> <p>In a web system, each discrete feature, or "page" also has a a Unique Web Address, better known as a URL, or Uniform Resource Locator.</p> <p>Suppose now a neighborhood is run down and an effort springs up to rebuild it.</p> <p>What do you normally see happen?</p> <p>1. A construction team studies the existing neighborhood, and carefully rebuilds an exact clone of it at a distance, but with more modern concrete, flooring, walls, nails, paint, and insulation, and then one day brings a giant bull dozer, knocks down all the houses, and uses giant helicopters to load every replacment house on top of the same old spot *ALL AT THE SAME MOMENT*?</p> <p>2. One house or building, or a few depending upon how large the team is, gets rebuilt into something a new buyer wants to pay for and move into. Then, the next, and the next.</p> <p>Of course, we all know it is the second scenario.</p> <p>The first is simply fanciful and would be assinine. Of course, due to the physical, three-dimensional nature of construction it also is nearly impossible, at least for an entire street or town to be replaced in a single *MOMENT*.</p> <p>Instead, house by house, surely enough, the Mailing Address that used to belong to a broken, dilapidated home, is replaced by brand new, valuable, livable homes.</p> <p>It's a beautiful thing, as they say. Doing this, the team can "keep it moving", and by it, I mean cash flow, and I mean community and homeowner value.</p> <p>Curiously, still today many software engineers and managers have failed to deeply analyze and ake to heart their favorite metaphor.</p> <p>We see teams laboring under pressure filled "dead lines" to do a "big bang release in a single MOMENT" to replace a legacy system with hundreds of features or pages.</p> <p>Or, if they have learned their lesson partially, they may run two systems in parallel, and slowly retire the old one while people are brought into the new one. While better, this option suffers from higher costs and lower return on investment as well as low user value.</p> <p>This situation is beyond lunacy. In the former case, of single-MOMENT big-bang replacement it may even cross lunacy and enters professional irresponsibility and lack of due dilligence. At best, it showcases a sad lack of knowledge about web servers, lack of understanding about HTTP, lack of understanding about risk mitigation, and ultimately a lack of compassion for the customer and end users.</p> <p>I blame not just engineers, but big contracting companies who perpetuate this situatiom on paying customers and governments who simply take their word for it that they cannot do it any faster, any better, or with more risk mitigation.</p> <p>In a web system, as in a neighborhood or city, each feature, page, or controller, or script, or image has a Unique Web Address.</p> <p>Each of these discrete units can, and should, be replaced in a careful, methodical, but ultimately FASTER, and return on investment increasing and risk reduing way.</p> <p>Replace the parts at the end of your Unique Web Addresses one by one, just like they do in the construction industry when they replace the parts at the end of their Unique Mailing Addresses one by one.</p> <p>I will be presenting a demo of how to do this with <a href="http://ASP.NET">ASP.NET</a> MVC being used to incrementally replace parts of a system built on classic ASP and <a href="http://ASP.NET">ASP.NET</a> WebForms on May 1 via <a href="http://www.meetup.com/AtlAltDotNet">http://www.meetup.com/AtlAltDotNet</a>.</p> Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-6728491765798401212012-04-21T20:22:00.001-07:002012-04-21T20:22:56.587-07:00Thank You to the Resource, of Course<p>I have been building software systems and web systems for more than 17 years now. During that time, I have seen the web evolve, as we all have, from a poorly understood academic novelty with cryptic error messages about "Resource not found" to something that has completely revolutionized information sharing, and because of that, the world.</p> <p>As developers, we had to progress through those early, foggy days, on through days when web servers we treated like souped up FTP servers, and into today when feeds and simple REST based services built upon, or aspiring toward, Roy Fielding's architectural principles behind the URI. Tim Berners Lee, the web's original inventor, is still a visionary, and his Linked Data initiative has percolated its way, at least conceptually, into all of our pockets as our phones constantly send small requests and consume data results to keep our apps and lives on track (or swerving off the highway).</p> <p>Here is my tribute, with credit to Dan North who wrote something similar a while ago:</p> <p>In the beginning there was the Resource<br> And it was good<br> But, misunderstood</p> <p>Of course.</p> <p>Then came files and extensions<br> And this brought much knowledge<br> Mostly to kids in college<br> Downloading and sharing things best left unmentioned.</p> <p>Next came that simple search engine that did not require we select miles of criteria<br> Much more frugal, all it asked for was a phrase and a click<br> Then our screens filled with results oh-so-quick!<br> Days later I got email about my long-lost and newly deceased benefactor uncle in Nigeria.</p> <p>He died again the next week, too.</p> <p>Soon came flickr and Facebook<br> And whether we wanted to or not<br> No matter hot-or-not<br> Everyone sent us links saying "Come on, take a look!"</p> <p>Then the dirt was washed away<br> And as the soap swirled down the drain<br> Our eyes opened to the vision from Roy's brain<br> TBL himself announced for TED: Urls, Links, and Data will save the day!</p> <p>In the present there is the Resource<br> And we navigate to its Address<br> Now understood as the key to our Success</p> <p>Of course.</p> Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-81997200399898053272012-04-18T22:19:00.000-07:002012-04-18T22:20:09.152-07:00Focus; Or, If You Don't Know Where You are Going, You May Get There Sooner Than You ThinkAll too often on a software development project, teams can fall into the trap of getting "too many balls" on the court at once.<div><br></div><div>Imagine a basketball team which decided that in order to score more points, it would put 5 balls into play and have all 5 players attempt to score.</div> <div><br></div><div>Or, a baseball team which put one left-handed hitter and one right-handed hitter at the plate in hopes that there would be a better chance of getting a hit?</div><div><br></div><div>What about a burrito shop which, in attempting to serve more customers, tried to have multiple people operating the shell steamer and multiple people trying to scoop beans, rice, and meat at the the same time?</div> <div><br></div><div>Why do these examples suck? Because, it's obvious that nobody would ever do these things because of the physical limitations of space and time (and the rules of games).</div><div><br></div><div>So, what if you work on a software team which has several developers, but only one Quality Assurance person? What if that person is the gatekeeper through which all developed software must pass for approval and review?</div> <div><br></div><div>If this is the case you find yourself in, then do whatever you can to make that person's job as easy as possible. Do not build gigantic inventories of features for that person to review "all at once" or "at a future date". Instead, work closely with them to prioritize the delivery of work for their inspection and review, because there will be things you do incorrectly that you must fix, and they must re-test.</div> <div><br></div><div><b><i>In short: the team must Focus, through collaboration, on the delivery of features in a prioritized, logical sequence that aids review and testing.</i></b></div><div><br></div><div><i><b>The team must avoid working on too many things all at the same time which hinder or slow down review and testing.</b></i></div> <div><br></div><div>To visualize this, I recall a previous article I wrote a couple of years ago: <a href="http://agilefromthegroundup.blogspot.com/2009/12/agile-software-construction-is-like.html"><font color="#333333" face="Georgia, serif"><span style="line-height:1.4em;text-align:left">Agile Software Construction is Like Neighborhood Constructio</span></font>n</a>.</div> <div><br></div><div>In summary, imagine you have three forms that you want to deliver to your customer for their web site:</div><div><ol><li>Standard Story Form</li><li>Emergency Story Form</li><li>Travel Story Form</li> </ol> </div><div>You know that many components of these forms will be, potentially, identical, such a Title, Description, or Category section.</div><div><br></div><div>Upon further analysis, you see that the forms break down like this:</div> <div><ol><li>Standard Story Form</li><ol><li>Title</li><li>Description</li><li>Category</li><li>Location</li><li>Save Draft</li><li>Delete Draft</li><li>Edit Draft</li><li>Submit Draft</li><li>Send to Expert for Review</li> <li>Post to Site</li><li>View </li></ol><li>Emergency Story Form</li><ol><li>Title</li><li>Description</li><li>Category</li><li>Location</li><li>Save Draft</li><li>Delete Draft</li><li>Edit Draft</li><li>Submit Draft</li> <li><i><b>Post Immediately to Site</b></i></li><li>Send to Expert for Review</li><li>Post to Site</li></ol><li>Travel Story Form</li><ol><li>Title</li><li>Description</li><li>Location</li><li>Save Draft</li><li>Delete Draft</li> <li>Edit Draft</li><li>Submit Draft</li><li>Post to Site</li></ol></ol></div><div>While there a number of ways you could go about developing this, here are two:</div><div><br></div><div><font size="4">All Features in Progress, None Done</font></div> <div><br></div><div>In both approaches, our iteration is 3 weeks long. In the horizontal approach, the team focuses on building up collection of requirements for all story form types. This is followed by developing, testing, reviewing, and releasing the forms, all at once.</div> <div><br></div><div>As we move from left to right on the time axis in weeks, we see that there is no actual working software delivered after 3 weeks, or 6 weeks of effort. In the 7th week, we potentially have finished the Standard Story Form, followed by the other two in subsequent weeks. After 9 weeks, 3 deliverables have been made.</div> <div><h3 class="post-title entry-title" style="margin-top:0.25em;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:4px;padding-left:0px;font-weight:normal;line-height:1.4em;color:rgb(204,102,0)"> <br class="Apple-interchange-newline"><table border="1" cellspacing="0" cellpadding="2" width="645" style="color:rgb(51,51,51);font-size:13px;line-height:20px;text-align:left"><tbody><tr><td valign="top" width="76"> </td> <td valign="top" width="95"><p align="center"><strong><u>Week 1</u></strong></p></td><td valign="top" width="94"><p align="center"><strong><u>Week 2</u></strong></p></td><td valign="top" width="98"><p align="center"><b><u>Week 3</u></b></p> </td><td valign="top" width="94"><b style="background-color:rgb(255,255,255)"><u>Working Software Delivered</u></b> <p align="center"></p></td><td valign="top" width="83"><b><u>Deliverables Remaining</u></b></td><td valign="top" width="103"><p align="center"><b><u>Business Value Accrued</u></b></p></td></tr><tr><td valign="top" width="76"> <p align="center"><b><u>Iteration 1</u></b></p></td><td valign="top" width="95"><p align="center"><span style="font-size:13px;line-height:20px;font-family:Georgia,serif">Standard Story Form Requirements</span> and Design</p> </td><td valign="top" width="93"><p align="center"><font face="Georgia, serif"><span style="line-height:20px">Emergency Story Form Requirements and Design</span></font></p></td><td valign="top" width="98"><p align="center"> <font face="Georgia, serif"><span style="line-height:20px">Travel Story Form Requirements and Design</span></font></p></td><td valign="top" width="94"><p align="center">0</p></td><td valign="top" width="87"><p align="center"> 3</p></td><td valign="top" width="102"><p align="center">0%</p></td></tr><tr><td valign="top" width="75"><p align="center"><strong><u>Iteraion 2</u></strong></p></td><td valign="top" width="94"><p align="center"><span style="font-family:Georgia,serif;line-height:20px;background-color:rgb(255,255,255)">Standard Code and Test</span></p> </td><td valign="top" width="93"><p align="center">Emergency Code and Test</p></td><td valign="top" width="97"><p align="center">Travel Code and Test</p></td><td valign="top" width="94"><p align="center">0</p></td><td valign="top" width="89"> <p align="center">3</p></td><td valign="top" width="101"><p align="center">0%</p></td></tr><tr><td valign="top" width="75"><p align="center"><strong><u>Iteration 3</u></strong></p></td><td valign="top" width="94"><p align="center"> <span style="background-color:rgb(255,255,255)">Standard Review, Revise, Retest, Release</span> </p></td><td valign="top" width="93"><p align="center"><span style="background-color:rgb(255,255,255)">Emergency Revise, Retest, Release</span> </p> </td><td valign="top" width="97"><p align="center"><span style="background-color:rgb(255,255,255)">Travel Revise, Retest, Release</span> </p></td><td valign="top" width="94"><p align="center">3</p></td><td valign="top" width="90"> <p align="center">0</p></td><td valign="top" width="101"><p align="center">100%</p></td></tr><tr><td valign="top" width="75"><p align="center" style="text-align:left"><b><u><br></u></b></p></td><td valign="top" width="94"> <br></td><td valign="top" width="93"><br></td><td valign="top" width="97"><br></td><td valign="top" width="93"><br></td><td valign="top" width="91"><br></td><td valign="top" width="101"><br></td></tr></tbody></table></h3> <div class="post-body entry-content" style="margin-top:0px;margin-right:0px;margin-bottom:0.75em;margin-left:0px;line-height:1.6em;font-size:13px"><div class="post-header-line-1"></div><div class="post-body entry-content" style="margin-top:0px;margin-right:0px;margin-bottom:0.75em;margin-left:0px;line-height:1.6em"> <div style="float:left;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"></div><br class="Apple-interchange-newline"></div></div></div><div><span style="background-color:rgb(255,255,255);color:rgb(51,51,51);font-family:Georgia,serif;font-size:large;line-height:20px;text-align:left">One Feature in Progress Until Done</span></div> <div><h3 class="post-title entry-title" style="margin-top:0.25em;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:4px;padding-left:0px;line-height:1.4em;font-family:Georgia,serif;text-align:left;background-color:rgb(255,255,255)"> <div style="font-weight:normal;color:rgb(0,0,0);font-family:arial;line-height:normal;text-align:-webkit-auto;font-size:small"><br></div><div style="font-weight:normal;color:rgb(0,0,0);font-family:arial;line-height:normal;text-align:-webkit-auto;font-size:small"> In this approach, the situation is very different in terms of both Time-Value-of-Money and Return-on-Investment for our customer, and in terms of reducing risk for ourselves.</div><div style="font-weight:normal;color:rgb(0,0,0);font-family:arial;line-height:normal;text-align:-webkit-auto;font-size:small"> <br></div><div style="font-family:arial;line-height:normal;text-align:-webkit-auto;font-size:small"><span style="color:rgb(0,0,0);font-weight:normal">As we move from left to right on the time axis again, this time we stay </span><i><font color="#009900">FOCUSED AS A TEAM</font></i><span style="color:rgb(0,0,0)"><span style="font-weight:normal"> on the Standard Story Form and going all the way from requirements to release before the end of three weeks. After three weeks, we see positive numbers in the final three columns! Compare that to the double easter eggs above, and you will agree that staying focused as a team with </span><i>One Feature in Progress Until Done</i><span style="font-weight:normal"> is a much better approach.<br> <br></span></span></div></h3><h3 class="post-title entry-title" style="margin-top:0.25em;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:4px;padding-left:0px;font-weight:normal;line-height:1.4em;color:rgb(204,102,0)"> <table border="1" cellspacing="0" cellpadding="2" width="645" style="color:rgb(51,51,51);font-size:13px;line-height:20px;text-align:left"><tbody><tr><td valign="top" width="76"> </td><td valign="top" width="95"><p align="center"> <strong><u>Week 1</u></strong></p></td><td valign="top" width="94"><p align="center"><strong><u>Week 2</u></strong></p></td><td valign="top" width="98"><p align="center"><b><u>Week 3</u></b></p></td><td valign="top" width="94"> <b style="background-color:rgb(255,255,255)"><u>Working Software Delivered</u></b><p align="center"></p></td><td valign="top" width="83"><b><u>Deliverables Remaining</u></b></td><td valign="top" width="103"><p align="center"> <b><u>Business Value Accrued</u></b></p></td></tr><tr><td valign="top" width="76"><p align="center"><b><u>Iteration 1</u></b></p></td><td valign="top" width="95"><p align="center"><span style="font-size:13px;line-height:20px;font-family:Georgia,serif">Standard Story Form Requirements</span> and Design</p> </td><td valign="top" width="93"><p align="center"><span style="font-family:Georgia,serif;line-height:20px;background-color:rgb(255,255,255)">Standard Code and Test</span> </p></td><td valign="top" width="98"><p align="center"> <span style="background-color:rgb(255,255,255)">Standard Review, Revise, Retest, Release</span> </p></td><td valign="top" width="94"><p align="center">1</p></td><td valign="top" width="87"><p align="center">2</p></td><td valign="top" width="102"><p align="center">33%</p></td></tr><tr><td valign="top" width="75"><p align="center"> <strong><u>Iteration 2</u></strong></p></td><td valign="top" width="94"><p align="center"><span style="font-size:13px;line-height:20px;font-family:Georgia,serif">Emergency Story Form Requirements</span> and Design </p></td><td valign="top" width="93"><p align="center"><span style="font-family:Georgia,serif;line-height:20px;background-color:rgb(255,255,255)">Emergency Code and Test</span> </p></td><td valign="top" width="97"><p align="center"> <span style="background-color:rgb(255,255,255)">Emergency Review, Revise, Retest, Release</span> </p></td><td valign="top" width="94"><p align="center">2</p></td><td valign="top" width="89"><p align="center">1</p></td><td valign="top" width="101"><p align="center">66%</p></td></tr><tr><td valign="top" width="75"><p align="center"> <strong><u>Iteration 3</u></strong></p></td><td valign="top" width="94"><p align="center"><span style="font-size:13px;line-height:20px;font-family:Georgia,serif">Travel Story Form Requirements</span> and Design </p></td><td valign="top" width="93"><p align="center"><span style="font-family:Georgia,serif;line-height:20px;background-color:rgb(255,255,255)">Travel Code and Test</span> </p></td><td valign="top" width="97"><p align="center"> <span style="background-color:rgb(255,255,255)">Travel Revise, Retest, Release</span> </p></td><td valign="top" width="94"><p align="center"> 3</p></td><td valign="top" width="90"><p align="center">0</p></td><td valign="top" width="101"> <p align="center">100%</p></td></tr><tr><td valign="top" width="75"><p align="center" style="text-align:left"><b><u><br></u></b></p></td><td valign="top" width="94"><p align="center"><br></p></td><td valign="top" width="93"> <br></td><td valign="top" width="97"><br></td><td valign="top" width="93"><br></td><td valign="top" width="91"><br></td><td valign="top" width="101"><br></td></tr></tbody></table></h3><div class="post-body entry-content" style="margin-top:0px;margin-right:0px;margin-bottom:0.75em;margin-left:0px;line-height:1.6em;font-size:13px"> <div class="post-header-line-1"></div><div class="post-body entry-content" style="margin-top:0px;margin-right:0px;margin-bottom:0.75em;margin-left:0px;line-height:1.6em"><div style="float:left;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"> </div><p></p>TODO: Complete</div></div><p></p></div> Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-51098564729353483602012-03-30T19:44:00.001-07:002012-03-30T19:44:09.340-07:00Resolve issues now! Do it in a "GIFI"<p>My colleagues and I came up with a new acronym today. We are prone to making short silly phrases to pass around like memes.</p> <p>This time, after several spurned candidates, we settled on "GIFI": </p> <p>Go, Investigate, Fix Immediately.</p> <p>If you research Lean, or other similar efficiency and continuous flow methods, this kind of mindset is encouraged relentlessly.</p> <p>Abounding are phrases like "Go to the gemba", meaning go to the place where the work is being done, or "Stop the Line", "Stop and Fix", etc .</p> <p>The goal of all of these ideas is not to build up a "backlog" or "inventory" of undone ideas and problems, or "debts" that need to be "revisited later".</p> <p>Instead, they tell us to stop piling onto the heap and FOCUS on correcting issues immediately when they are found.</p> <p>We made tremendous progress this week by reinforcing this mindset and its attendant behavior this week.</p> <p>Our whole team oriented its focus toward Quality and Security, and toward "Defect Prevention".</p> <p>This kind of focus is extremely motivating and addictive. It creates momentum that can be stopped only by lethargy and lack of passion or disinterest.</p> <p>So, next time you see an issue staring at you, address it in a GIFI.</p> <p>Go! Investigate, Fix Immediately!<br></p> Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com1tag:blogger.com,1999:blog-4441160589671124737.post-30257389237251352892012-03-25T18:34:00.163-07:002012-04-23T12:30:32.284-07:00Control and Prevent “Defect Outbreaks” in Public Health Information Systems by Applying Epidemiological Methods<h1 class="western"><i><u>ROUGH DRAFT:</u></i><br />
</h1><h1 class="western"></h1><div style="font-style: normal;">Have you ever thought about much about the following statement?</div><div style="font-style: normal;"><br />
</div><div style="font-style: normal;"><b style="color: blue;">"CDC 24/7: Saving Lives, Protecting People, Saving Money through Prevention"</b></div><br />
Maybe, maybe not. This is the banner headline on <a href="http://www.cdc.gov/">http://www.cdc.gov</a>, the home page for the United States Centers for Disease Control and Prevention. It's an important statement that conveys the constant vigilance, the goals, and the primary mindset required in today's world needed to help keep people healthy! <br />
<br />
Another thing you may have never thought about is the vast and varied number of information systems required for epidemiologists and other public health professionals to quickly and reliably perform the public health surveillance and other scientific work required to achieve their goals of improving human health. It's easy to understand why such systems are necessary, though. Simply consider how quickly people travel today from country to country and how quickly infectious diseases can spread. Recall the SARS pandemic from 2003 as an example.<br />
<br />
In the world of public health, these systems operate all over the United States and world, at local, state, territorial, and federal levels and in collaboration across national boundaries. They empower the public health workforce to <i><b>control and prevent disease</b></i> in a variety of biological populations. Human health also depends upon animal health and the health of plants, trees, and ecosystems as a whole. The entire ecosystem is the shared environments, or context, within which we all live.<br />
<br />
<b style="font-size: x-large;">Controlling and Preventing Information System Disease</b><br />
<br />
Information systems are like ecosystems. Instead of being composed of populations of biological objects, they're composed of populations of technological objects. Beyond that obvious differences in these types of populations are a great many similarities regarding control and prevention surveillance and intervention techniques needed to keep these populations <i><b>healthy and free of disease</b></i>.<br />
<br />
Can information systems really be diseased? I believe they can, and that all too many of them are.<br />
<br />
Here's a standard dictionary definition of the word "disease":<br />
<div class="dndata"><blockquote class="tr_bq"><i><span id="hotword"><span id="hotword" name="hotword" style="color: #333333; cursor: default;">"a</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">disordered</span> <span id="hotword" name="hotword">or incorrectly</span><span id="hotword" name="hotword" style="color: #0055bb; cursor: pointer;"></span> <span id="hotword" name="hotword">functioning</span> <span id="hotword" name="hotword">organ,</span> <span id="hotword" name="hotword">part,</span> <span id="hotword" name="hotword">structure,</span> <span id="hotword" name="hotword">or</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">system</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">of</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">the</span> <span id="hotword" name="hotword">body</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">resulting</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">from</span> <span id="hotword" name="hotword">the</span> <span id="hotword" name="hotword">effect</span> <span id="hotword" name="hotword">of</span> <span id="hotword" name="hotword">genetic</span> <span id="hotword" name="hotword">or</span> <span id="hotword" name="hotword">developmental</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">errors,</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">infection,</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">poisons,</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">nutritional</span> <span id="hotword" name="hotword">deficiency</span> <span id="hotword" name="hotword">or</span> <span id="hotword" name="hotword">imbalance,</span> <span id="hotword" name="hotword">toxicity,</span> <span id="hotword" name="hotword">or</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">unfavorable</span> <span id="hotword" name="hotword">environmental</span> <span id="hotword" name="hotword">factors;</span> <span id="hotword" name="hotword">illness;</span> <span id="hotword" name="hotword">sickness;</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">ailment."</span></span></i></blockquote><blockquote class="tr_bq"><b><span style="font-size: x-small;">Source: <a href="http://dictionary.reference.com/browse/disease">http://dictionary.reference.com/browse/disease</a></span></b></blockquote></div><span style="font-size: large;"><b>Information System Disease Definition</b></span><br />
<br />
<br />
Here's my adapted definition for "Information System Disease":<br />
<blockquote class="tr_bq"><i><span id="hotword"><span id="hotword" name="hotword" style="color: #333333; cursor: default;">"a</span>n <span id="hotword" name="hotword">incorrectly</span><span id="hotword" name="hotword" style="color: #0055bb; cursor: pointer;"></span> <span id="hotword" name="hotword">functioning</span> or incomplete component<span id="hotword" name="hotword">,</span> <span id="hotword" name="hotword">feature,</span> sub-system, or<span id="hotword" name="hotword"></span> unit<span id="hotword" name="hotword" style="color: #333333; cursor: default;"></span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">of</span> a an information system<span id="hotword" name="hotword"></span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">resulting</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">from</span> <span id="hotword" name="hotword">the</span> <span id="hotword" name="hotword">effect</span> <span id="hotword" name="hotword">of</span> <span id="hotword" name="hotword">requirements, design,</span> <span id="hotword" name="hotword">or</span> <span id="hotword" name="hotword">developmental</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">errors and defects,</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">performance, usability,</span> or capability deficiency<span id="hotword" name="hotword">,</span> <span id="hotword" name="hotword">or</span> <span id="hotword" name="hotword" style="color: #333333; cursor: default;">unfavorable</span> <span id="hotword" name="hotword">environmental</span> <span id="hotword" name="hotword">factors such as network communications failures or operating system incompatibilities."</span><span id="hotword" name="hotword" style="color: #333333; cursor: default;"></span></span></i></blockquote><br />
<blockquote class="tr_bq"><span style="background-color: #999999;"><b>Aside: </b>With the increasing use of biotechnology and nanotechnology that interacts with our own biology, it will become increasing difficult to draw any clear distinctions between a designed technologically-augmented biological system and one that is strictly naturally evolved.</span></blockquote><br />
This definition encompasses a lot of different types of "inputs", though not all possible inputs, but it focuses in the beginning on one critical perception: <i> </i><br />
<blockquote class="tr_bq"><i>an incorrectly functioning or incomplete component, feature, sub-system, or unit </i></blockquote>What makes an information system differ from a biological system is that since an information system is specifically designed to serve human cognitive needs, we have better control over defining what <i><b>incorrect</b></i> or<br />
<i><b>incomplete</b></i> means than we do in many cases for purely biological systems.<br />
<h2>-----------------</h2><div>NOTE: this next part is more notes....not sure it follows so quickly from above yet.....</div><h2>The Quarantine Model of Integration</h2>Think now about quarantine, considering the SARS outbreak again. When SARS happened, public health officials acted quickly and implemented quarantine procedures to try to control and prevent the spread of the pathogen into their own populations. Consider this summation of quarantine measures from Taiwan:<br />
<blockquote class="tr_bq"><span style="background-color: white; font-family: arial,helvetica,clean,sans-serif; font-size: 13px; line-height: 17px; text-align: left;">During the 2003 Severe Acute Respiratory Syndrome (SARS) outbreak, traditional intervention measures such as quarantine and border control were found to be useful in containing the outbreak. We used laboratory verified SARS case data and the detailed quarantine data in Taiwan, where over 150,000 people were quarantined during the 2003 outbreak, to formulate a mathematical model which incorporates <b>Level A quarantine (of potentially exposed contacts of suspected SARS patients) and Level B quarantine (of travelers arriving at borders from SARS affected areas) </b>implemented in Taiwan during the outbreak. We obtain the average case fatality ratio and the daily quarantine rate for the Taiwan outbreak. Model simulations is utilized to show that Level A quarantine prevented approximately 461 additional SARS cases and 62 additional deaths, while the effect of Level B quarantine was comparatively minor, yielding only around 5% reduction of cases and deaths. <b>The combined impact of the two levels of quarantine had reduced the case number and deaths by almost a half.</b> The results demonstrate how modeling can be useful in qualitative evaluation of the impact of traditional intervention measures for newly emerging infectious diseases outbreak when there is inadequate information on the characteristics and clinical features of the new disease-measures which could become particularly important with the looming threat of global flu pandemic possibly caused by a novel mutating flu strain, including that of avian variety.</span></blockquote><br />
<blockquote class="tr_bq"><b><span style="font-size: x-small;">Source: <a href="http://www.ncbi.nlm.nih.gov/pubmed/17055533">http://www.ncbi.nlm.nih.gov/pubmed/17055533</a></span></b></blockquote>What this summary illustrates is that quarantine, when applied at a higher level in the chain of transmission led to a far better reduction in the <i><b>incidence rate of infection</b></i>. The other measure led to a more modest, 5% reduction of cases and deaths.<br />
<h3>Defining the Quarantine Model of Integration</h3>Let's define a simplified "Quarantine Model of Integration" that can apply to more than just humans with possible infections crossing borders.<br />
<br />
<b>Population A: </b>Some set of individual objects.<br />
<b>Population B</b>: Another set of individual objects similar to Population A.<br />
<b>Population B-Harmful</b>: Some subset of population B with harmful characteristics that will disrupt and<br />
weaken the integrity of desired characteristics if introduced into Population A.<br />
<b>Population B-Benign:</b> Some subset of population B without harmful characters if integrated into Population A.<br />
<b>Mitigation Procedures</b>: A set of actions that can be taken upon Population B to identify Population B-Harmful and Population B-Benign, thus allowing Population B-Benign to be integrated into Population A without harming it.<br />
<br />
NOTE:<br />
<br />
Apply to populations at borders<br />
Apply to scientific body of knowledge in general<br />
Apply to systems development, code, unit tests, continuous integration, etc, etc, etc<br />
<br />
<h2>Scientific Knowledge Develops through Iteration</h2><br />
<h2>Information Systems Develop through Iteration</h2><br />
<br />
--------------------------------<br />
<br />
TODO: revise everything below <br />
<br />
The vast majority of public health information systems are built to serve one or more functions of public health surveillance for epidemiologists and other public health professionals collaborating to control and prevent health problems in human and animal populations.<br />
<br />
A simple definition of public health surveillance by the World Health Organization is: <br />
<blockquote class="tr_bq">Public health surveillance is the continuous, systematic collection, analysis and interpretation of health-related data needed for the planning, implementation, and evaluation of public health practice. Such surveillance can:<br />
<ul class="disc"><li>serve as an early warning system for impending public health emergencies;</li>
<li>document the impact of an intervention, or track progress towards specified goals; and</li>
<li>monitor and clarify the epidemiology of health problems, to allow priorities to be set and to inform public health policy and strategies. </li>
</ul></blockquote><b>Source: http://www.who.int/topics/public_health_surveillance/en/</b><br />
<br />
And, a simple definition of epidemiology by the CDC is:<br />
<br />
<i>The study of the distribution and determinants of health-related states in specified populations, and the application of this study to control health problems.</i><br />
<div style="font-style: normal;"><br />
</div><div style="font-style: normal;"><i>(<b>Source: <a href="http://www.cdc.gov/excite/classroom/outbreak/steps.htm">http://www.cdc.gov/excite/classroom/outbreak/steps.htm</a>)</b> </i></div><div style="font-style: normal;"></div><h3 style="font-style: normal;">Series Goals: Increasing Value, Protecting Investments, and Saving Money through Prevention</h3><h3 style="font-style: normal;"><br />
</h3> This is the first article in a series which will compare the practices of public health surveillance and epidemiology with modern practices of information systems development. It will show how systems developers can view their work through the lens of a prevention-focused mindset <br />
<div style="font-style: normal;"><br />
</div><div style="font-style: normal;"><br />
</div><div style="font-style: normal;">Here is more detail from that link:</div><ul><li><span style="font-style: normal;"><b>Study</b></span><span style="font-style: normal;">—Epidemiology is the basic science of public health. It's a highly quantitative discipline based on principles of statistics and research methodologies.</span></li>
</ul><ul><li><b>Distribution</b>—Epidemiologists study the distribution of frequencies and patterns of health events within groups in a population. To do this, they use descriptive epidemiology, which characterizes health events in terms of time, place, and person.<br />
</li>
<li><b>Determinants</b>—Epidemiologists also attempt to search for causes or factors that are associated with increased risk or probability of disease. This type of epidemiology, where we move from questions of "who," "what," "where," and "when" and start trying to answer "how" and "why," is referred to as analytical epidemiology.<br />
</li>
<li><b>Health-related states</b>—Although infectious diseases were clearly the focus of much of the early epidemiological work, this is no longer true. Epidemiology as it is practiced today is applied to the whole spectrum of health-related events, which includes chronic disease, environmental problems, behavioral problems, and injuries in addition to infectious disease.<br />
</li>
<li><b>Populations</b>—One of the most important distinguishing characteristics of epidemiology is that it deals with groups of people rather than with individual patients.<br />
</li>
<li><b>Control</b>—Finally, although epidemiology can be used simply as an analytical tool for studying diseases and their determinants, it serves a more active role. Epidemiological data steers public health decision making and aids in developing and evaluating interventions to control and prevent health problems. This is the primary function of applied, or field, epidemiology. </li>
</ul><div style="font-style: normal;">In this and following articles in this series, we will refer to these basic principles multiple times to build an analogous model within the field of information systems development. The analogy, like all analogies, will not be perfect. It will serve to help both epidemiologists and systems developers to better understand each others' professions and to begin to craft a better "shared language" when discussing both the subject matter of the systems they use and develop, and the actual development and management process of such systems.</div><h3 style="font-style: normal;">Goal: Control and Prevent Defects and Create Healthier Systems </h3>Through better understanding of the fundamental precepts and concepts of epidemiology and public health surveillance, system developers building public health information systems can "control and prevent defects", leading to "healthier systems". Similarly, epidemiologists and public health professionals, with a better understanding of the defect control and prevention practices available for systems development, will see how These systems can be seen as a "technological populations" of individual components which share technological contexts and environments. Thus, we see the mission as similar to the core mission of public health to "control and prevent disease" from afflicting biological populations.<br />
As this series of articles will show, there is already wide and pervasive overlap in the skills and mindsets of both epidemiologists and system developers. However, field-specific jargon and other domain-specific differences has often prevented better understanding by both sides.<br />
To begin, it is obvious that the fields of epidemiology and systems development are far too vast to draw point-by-point analogies. Instead we will start by comparing and contrasting a "Disease Outbreak" investigation to a "Defect Discovery" investigation. This comparison will closely follow CDC's Excellence in Teaching Epidemiology web site (EXCITE), which is a series of classroom-focused articles and exercises for teaching epidemiology to students.<br />
<u><b><br />
Defects in Software: High Prevalence Due to Repeated Incidence:</b></u><br />
It is important to note that "defect discovery" is a process that, as this series will ultimately demonstrate, is something that should not happen "in the field" (by a systems' users) in quite the same way that epidemiologists must investigate outbreaks when and where they occur. The reason why this should not happen is similar to what many public health professionals would say: through better understanding and application of disease control and prevention practices and behaviors, both the incidence and prevalence of infectious disease can be greatly reduced.<br />
In the case of software systems development, we can say: <i>through better understanding and application of defect control and prevention practices and behaviors, both the incidence and prevalence of system defects can be greatly reduced, and in many cases completely eradicated.</i><br />
Why would I say "completely eradicated" in the case of systems development, but not for infectious disease, when it's well-known that many horrific diseases have indeed been eradicated through inoculation and other measures? Unfortunately, new infectious diseases can and do emerge, most often by crossing over from animal populations into human populations. In fact, CDC publishes a scientific journal called Emerging Infectious Diseases devoted entirely to this vast sub-field of epidemiology.<br />
<div style="margin-left: 0.49in;">As a side bar, see the section about "Zero Defects", a philosophical approach to systems engineering pioneered by the Martin Marietta Corporation (Now Lockheed Martin) in the early 1960s which led to the successful human moon landings. </div>However, in systems development, there is a distinct advantage. The technological populations, the source lines of code, the objects, components, the hardware components, the networks, etc, are all 100% completely <b>designed objects</b>. <i>There is not a single part of a software system that was not developed by human intelligence.</i> Because of this, achieving complete eradication of defects from software systems is not only possible, it is something that any public health official would simple expect by default. After all, they have the arduous task of discovering the <b>invisible to the naked eye objects</b> that can interact with our biology to harm or kill us. While, systems developers have the task of designing well-structured, highly-visible objects that must behave in well-specified, 100% predictable ways.<br />
So, where is the disconnect? Why do so many software systems have such high prevalence of defects? The simplified answer returns us to epidemiological science: it has everything to do with the <i>incidence rate of defects introduced during any single time-period. </i><span style="font-style: normal;"> Because very few technological systems have "self-healing" capabilities like biological organisms, once a defect enters a technological population, it can </span><span style="font-style: normal;"><b>only be removed by human discovery and concentrated effort. </b></span><span style="font-style: normal;"><span style="font-weight: normal;">This defect discovery and removal process is far too costly, both monetarily and in terms of public-health preparedness. </span></span> <br />
<span style="font-style: normal;"><span style="font-weight: normal;">So, this series will show how to reduce defect incidence rates as close to zero as possible during any one time-period (or system release or software version), to come class to guaranteeing zero prevalence of defects.</span></span><br />
<span style="font-style: normal;"><span style="font-weight: normal;">But..before we get there, we do need to discuss exactly how defects can and do get reported by those "in the field", the users of systems. Doing so will make clear why the defect discovery process is very time-consuming and costly.</span></span><br />
<u><b>CDC: Steps of an Outbreak Investigation</b></u><br />
<table border="1" cellpadding="4" cellspacing="0" style="width: 664px;"><colgroup><col width="235"></col> <col width="273"></col> <col width="130"></col> </colgroup><tbody>
<tr valign="TOP"> <td width="235"><b>Disease Outbreak Investigation Step</b></td> <td width="273"><b>Defect Root-Cause Investigation Step</b></td> <td width="130"><b>Comments</b></td> </tr>
<tr valign="TOP"> <td width="235">Prepare for field work</td> <td width="273">Establish defect communication channels</td> <td width="130">End users are the ones "in the field", and management must provide communication channels (automatic error trapping within deployed systems and telephone, email, issue tracking systems) that enable users to provide their feedback</td> </tr>
<tr valign="TOP"> <td width="235">Establish the presence of an outbreak</td> <td width="273">Establish confirmed presence of a defect</td> <td width="130">When users report an issue as a defect, the team must be able to verify whether this is true or perhaps some other kind of malfunction or user training issue (misunderstanding, lack of experience, etc)</td> </tr>
<tr valign="TOP"> <td width="235">Verify the diagnosis</td> <td width="273">Verify the steps to reproduce</td> <td width="130">In order to investigate the defect, it is required to document the precise sequence of actions taken by the user. These are needed to reproduce the same issue under controlled testing conditions.</td> </tr>
<tr valign="TOP"> <td width="235">Define and identify cases</td> <td width="273">Define and identify type of issue</td> <td width="130">Not all reported issues fall neatly into the category of "defect". Other categories include:<br />
<ul><li>Request for enhancement</li>
<li>Difficulty using feature</li>
</ul>It is still important to classify each reported item for the purpose of improving the system based upon its users' experiences.</td> </tr>
<tr valign="TOP"> <td width="235">Describe and orient the data in terms of time, place, and person</td> <td width="273">Describe and orient the ??report?? in terms of time, browser, operating system, user role and other system-specific characteristics</td> <td width="130">Document conditions that can help characterize the event for detailed investigation by the management team.??</td> </tr>
<tr valign="TOP"> <td width="235">Develop Hypotheses</td> <td width="273">Reproduce Defect within Controlled Environment</td> <td width="130">The management team must </td> </tr>
<tr valign="TOP"> <td width="235">Evaluate Hypotheses</td> <td width="273">Determine Root-Cause </td> <td width="130">This step may involve a number of trial-and-error "hypotheses" depending upon how well the system itself has been constructed according to quality engineering practices.</td> </tr>
<tr valign="TOP"> <td width="235">Refine hypotheses and carry out additional studies</td> <td width="273">Develop a "fix" for the defect and perform system regression testing</td> <td width="130">This simplifies a much larger series of steps, but the most important part is that a "regression test" is performed which verifies that the resolution of this specific defect does not introduce additional defects in other areas (or even in the same area!)</td> </tr>
<tr valign="TOP"> <td width="235">Implement control and prevention measures</td> <td width="273">Implement control and prevention measures</td> <td width="130">This step requires the team to reflect upon the root-cause determinant of the defect and analyze what it can do to prevent similar defects from occurring again</td> </tr>
<tr valign="TOP"> <td width="235">Communicate findings</td> <td width="273">Deploy fix and communicate resolution</td> <td width="130">This step involves updating the system with the defect corrected (and the rest of the potentially affected system fully regression tested)</td> </tr>
</tbody></table><div style="font-weight: normal; text-decoration: none;"></div><div style="font-weight: normal; text-decoration: none;"><b> </b> </div><div style="font-weight: normal; text-decoration: none;">Let's now go into more detail about each of these points to create a more complete and nuanced analogy.</div><div style="font-weight: normal; text-decoration: none;">First, the CDC site prefaces the steps with:</div><div style="font-weight: normal; margin-left: 0.49in; text-decoration: none;"><i>In investigating an outbreak, speed is essential, but getting the right answer is essential, too. To satisfy both requirements, epidemiologists approach investigations systematically, using the following 10 steps:</i></div><ol><div style="font-weight: normal; margin-bottom: 0in; text-decoration: none;"><i><see above></i></div></ol><div style="font-weight: normal; margin-bottom: 0in; text-decoration: none;"><br />
</div><div style="font-weight: normal; margin-bottom: 0in; text-decoration: none;">It concludes with this:</div><div style="font-weight: normal; margin-bottom: 0in; text-decoration: none;"><br />
</div><div align="LEFT" style="font-weight: normal; margin-left: 0.49in; text-decoration: none;"><i>The steps are presented here in conceptual order. In practice, however, several may be done at the same time, or they may be done in a different order. For example, control measures should be implemented as soon as the source and mode of transmission are known, which may be early or late in any particular outbreak investigation.</i></div><span style="text-decoration: none;"><span style="font-weight: normal;">In the software systems development industry, this situation is very similar. It is well known that scientists find the idea of a strictly defined "scientific method" as naïve, at best, and dangerous at worst (TODO give references to well known scientists in past and contemporary who discuss this problem)</span></span><br />
<span style="text-decoration: none;"><span style="font-weight: normal;">In the software industry, there are similar naïve models of the software development process, or "Life Cycle" which, while applicable in certain situations, are completely inadequate for sophisticated, expensive, and mission-critical systems development.</span></span><br />
<span style="text-decoration: none;"><span style="font-weight: normal;">Without going into great detail here, one of the most prevalent naïve models of development is that of the "Waterfall method", also known as "single-pass all-at-once delivery". Here is a diagram from the paper by Winston J. Royce from 1971 which began the propagation of this so-called method:</span></span><br />
<br />
<br />
<br />
<span style="text-decoration: none;"><span style="font-weight: normal;"><<TODO>></span></span><br />
<span style="text-decoration: none;"><span style="font-weight: normal;">Sadly, and to the extreme financial diminution of countless companies and government budgets, this diagram was Royce's illustration of a well-known risk factor, to use the language of epidemiology. That is, Royce was saying that when a system was developed this way, it had a higher than 50% chance of resulting in failure, a "negative health outcome" so-to-speak.</span></span><br />
<span style="text-decoration: none;"><span style="font-weight: normal;">What Royce went on to illustrate in his paper was this far more nuanced and realistic model of systems development:</span></span><br />
<br />
<br />
<br />
<span style="text-decoration: none;"><span style="font-weight: normal;"><<TODO>></span></span><br />
<br />
<br />
<br />
<span style="text-decoration: none;"><span style="font-weight: normal;">Here is a diagram from Public Health Practices and Principles which shows the generally accepted pattern of public health science:</span></span><br />
<span style="text-decoration: none;"><span style="font-weight: normal;"><<TODO>></span></span><br />
<span style="text-decoration: none;"><span style="font-weight: normal;">TODO: ADDITIONAL DIAGRAMS</span></span><br />
<span style="text-decoration: none;"><span style="font-weight: normal;">To more fully understand the history of sequential, single-pass Waterfall, and why it has been strongly discouraged due to its high cost and predictable rates of failure by certain government organizations, such as the Department of Defense, please say Dr. Craig Larman's paper: "Iterative and Incremental Development a Brief History". <<TODO>></span></span>Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-48407443373792114152011-06-27T19:52:00.001-07:002011-06-27T19:52:20.154-07:00Microsoft Moles!This is a very cool project from Microsoft Research:<br><br><a href="http://research.microsoft.com/en-us/projects/moles/">http://research.microsoft.com/en-us/projects/moles/</a><br><br>I'm able to use this to "fake" or "mock" sealed classes inside of the <a href="http://ASP.NET">ASP.NET</a> runtime.<br> <br>For example:<br><br> [TestMethod]<br> [HostType("Moles")]<br> public void WhenCannotInterpretSdnUserKeyAsIntegerThenMustRedirectToGlobalErrorPageWithProperMessage()<br> {<br> // Arrange<br> var cookies = new HttpCookieCollection { new HttpCookie(SdnUserKeyCookieName, "Gibberish") };<br> var context = new MHttpContext();<br> var request = new MHttpRequest();<br> var response = new MHttpResponse();<br> var redirectWasCalled = false;<br> var redirectedToLocation = string.Empty;<br> var responseEnded = false;<br> response.RedirectStringBoolean = (string location, bool endResponse) =><br> {<br> redirectWasCalled = true;<br> redirectedToLocation = location;<br> responseEnded = endResponse;<br> };<br> MHttpContext.CurrentGet = () => context;<br> context.RequestGet = () => request;<br> context.ResponseGet = () => response;<br> request.CookiesGet = () => cookies;<br><br> // Act<br> _sdnAuthenticator.Process(context);<br> <br> // Assert<br> Assert.IsTrue(redirectWasCalled);<br> Assert.AreEqual("/Error.aspx", redirectedToLocation, true);<br> Assert.IsTrue(responseEnded);<br> }<br> <br>How cool is that? The moles are implemented as "detours" and replace components of the runtime when configured to do so.<br><br>This is great stuff.<br> Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-85056023858819198712011-06-23T07:27:00.001-07:002011-06-23T07:27:21.485-07:00From 15 Minute Stand Ups to Standing Work Stations : How to Start a TrendAs many people involved with the various agile development practices know, one of the common practices is a brief "Daily Stand Up" meeting to discuss project progress, priority changes, and impediments.<br><br>When I joined my most recent team, the Epi-X program at CDC, I wanted to try a different kind of Stand Up. This time, I raised my monitors and my keyboard and I began standing for a large portion of the day to do my work. I don't claim any medical expertise, despite working at CDC, so don't take my counsel on this as anything scientific.<br> <br>All I can say is that there have been some studies written about in popular articles that seem to indicate constant sitting is detrimental to long-term health, including increased risks of obesity and heart disease. I should also say other studies say there are health risks with constant standing as well!<br> <br>So, for me, it is not that I stand at my workstation all day long. I am in various sit-down meetings and discussions, and have to walk to different areas to speak with people. And, I do lower my monitor and sit from time to time as well.<br> <br>I'll continue this post later, but in the past week two people in my office have followed suit! So far, we just use boxes to prop up our equipment, but I'm strongly considering investing in a genuine table-top adjustable desk from <a href="http://www.ergodesktop.com">http://www.ergodesktop.com</a>.<br> <br>One coworker that adopted this practice also bought himself a foot mat. I have been wearing sandals or occasionally kneeling on my chair.<br><br>Remember: Stay agile, not fragile.<br><br><br> Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-15834153299349866812011-05-20T19:21:00.001-07:002011-05-20T19:25:11.770-07:00MIX 2011 Presentations ReviewsGlenn Block's presentation on WCF and URIs is very good from MIX 2011. <a href="http://www.slipjig.org/">Mike Simpson</a> also forwarded me a recent DotNetRocks episode in which Block discusses the WCF HTTP WebAPI.<br />
<div>MIX 2011 presentation: "There's a URI for That": <a href="http://channel9.msdn.com/events/MIX/MIX11/FRM14">http://channel9.msdn.com/events/MIX/MIX11/FRM14</a></div><div>DNR episode: "Glenn Block Simplifies WCF with WebAPI": <a href="http://www.dotnetrocks.com/default.aspx?showNum=661">http://www.dotnetrocks.com/default.aspx?showNum=661</a></div><div><br />
In the MIX 2011 presentation, some highlights of things he demonstrates the following:</div><ul><li>Microsoft is committed to delivering a first-class HTTP programming model for WCF</li>
<li>The HttpWebResponse<OfTypeT> response type, which has full support of HTTP status codes, demonstarted with response.StatusCode = HttpStatusCode.Created to indicate a successful "resource created" response status from the server to the client.</li>
<li>The use of media types and registering X number of media type processors to handle incoming requests based on "extensions" supplied on the URI.</li>
<ul><li>Gone are the days when an extension like ".aspx" or ".txt" were tightly-coupled to the file-system and to physical files on disk. Instead, these are now fully interceptable and processable by YOUR handler code in the way YOU WANT.</li>
</ul><li>Using an OData producer resource, he showed Google's GMail contacts import dialog pulling down contacts from his WCF service in vCard format, as specified by an extension, and an OData filter expression that limited the results returned to the top 3 results</li>
</ul><div>All in all, I am feeling increasinly confident that Microsoft's direction regarding HTTP and REST is moving in a solid path. While it is of course possible to build REST/HTTP style Web APIs without WCF and without explicit support from Microsoft, the fact that Microsoft is supporting this provides two advantages:</div><ol><li>It increases the mind-share and desire amongst .NET developers to understand the web and to leverage these technologies,</li>
<li>It provides an easier path toward enterprise-wide adoption because mangement will begin to understand the benefits and see the backing of MS within their flagship WCF offerring.</li>
</ol><div>Perhaps "hard-core" ALT.NETters and "Restafarians" will say they've been doing things like this without MS support for years, and I would not argue with that. However, most of us work in a heterogeneous world that involves a lot of layers of management and risk-mitigation. So, the extra support at an official level from Microsoft's platform can only help the general adoption curve of web technology.</div><div></div><div>And, regarding developers and architects, these groups of stakeholders have a lot riding on their technical choices and often face an uphill battle when the major vendor of their company's tools isn't yet "on board".<br />
<br />
I and a few of my colleagues at various companies have been building REST-style (though I'd hesitate to call it full REST because of little attention paid to links and hypermedia constraints) for a efw years and have often faced skepticism because of the "That's not what WCF does" responses. Those responses were well-founded at the time, but it's also very nice to see how far MS has come with modernizing WCF to fully support the web and the HTTP specifications for all they offer and are worth.</div><div></div><div><br />
For me this is a great step in the right direction, and I look forward to evaluating further the use of WCF HTTP WebAPI for backend resources / services.</div>Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-29494588517480776432011-04-16T08:53:00.001-07:002011-04-16T08:53:15.181-07:00MIX 2011: WCF, OData, MVC, and MEF Highlighted PresentationsMIX 11 has finished. Here are the presentations that I will be "diving into" more quickly than others.<div><br></div><div><b>My Summary of Summaries:<br></b><div><br></div><div>The topics below caught my eye as priority because:</div> <div><ul><li>They build upon <a href="http://www.odata.org/developers/protocols/atom-format">OData, and thus upon Atom</a> and REST . REST is the foundational architecture of the WWW, and is still not widely understand throughout the entire development industry</li> <ul><li>I'm likely to be joining a large project that will be providing enterprise wide alerting, notification, and reporting capabilities to X number of organizational sub-units. It's critical that interfaces to such services be simple, document-based, and that output data be consumable by end-user tools like Excel. OData support is "baked in" to the latest Office products and into Sharepoint 2010.</li> </ul><li>Regarding MVC and MEF: these two technologies are critical for modular, extensible web applications on the .NET platform. Being able to deploy sub-units independent of an independent application architecture is critical both for ease of maintenance and extensibility, but is also important in highly secure environments that require rigorous application scanning for security threats.</li> </ul></div><div>That's more than enough from me. I'll let the experts Castro and Block elaborate :)</div><div><br></div><div><b>Scott Guthrie's key-note, naturally:</b></div><div><a href="http://channel9.msdn.com/Events/MIX/MIX11/KEY01">http://channel9.msdn.com/Events/MIX/MIX11/KEY01</a></div> <div><br></div><div>Why: because it's The Gu. Period. Full-stop.</div><div><br></div><div><b>Pablo Castro on OData Roadmap: Powering the Next Generation of Services:</b></div><div><a href="http://channel9.msdn.com/Events/MIX/MIX11/FRM11">http://channel9.msdn.com/Events/MIX/MIX11/FRM11</a></div> <div><br></div><div><b>Summary:</b></div><div><br></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; ">At home and work, the way we experience the web (share, search and interact with data) is undergoing an industry-changing paradigm shift from "the web of documents" to the "web of data" which enables new data-driven experiences to be easily created for any platform or device. Come to this session to see how OData is helping to enable this shift through a hands-on look at the near term roadmap for the Open Data Protocol and see how it will enable a new set of user experiences. From support for offline applications, to hypermedia-driven UI and much more, join us in this session to see how OData is evolving based on your feedback to enable creating immersive user experiences for any device.</span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b>OData Roadmap: Exposing any Data Source as an OData Service: </b></span><a href="http://channel9.msdn.com/Events/MIX/MIX11/FRM16"><b>http://channel9.msdn.com/Events/MIX/MIX11/FRM16</b></a></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b>Summary:</b></span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b><br></b></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b><span class="Apple-style-span" style="font-weight: normal; ">Many of the popular OData services, including Netflix, Twitpic and Facebook Insights were built by reusing their existing web API with an OData service. Implementing this type of OData service is not simple but it's also not as hard as you might think. In this session, you'll learn how to build similar services that wrap different types of data sources using the WCF Data Services Toolkit. We'll take a look at the implementations for several of the popular services as examples of how to use the toolkit to create new OData services.</span></b></span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b><br></b></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b>Fun with MVC 3 and MEF: </b><a href="http://channel9.msdn.com/Events/MIX/MIX11/OPN07"><b>http://channel9.msdn.com/Events/MIX/MIX11/OPN07</b></a></span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b>Summary:</b></span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; ">So you have a team of developers… And a nice architecture to build on… How about making that architecture easy for everyone and getting developers up to speed quickly? Learn all about integrating the managed extensibility framework and <a href="http://ASP.NET">ASP.NET</a> MVC for creating loosely coupled, easy to use architectures that anyone can grasp.</span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b>OData in Action: Connecting Any Data Source to Any Device</b></span></div> <span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><h1 style="margin-top: 0px; margin-right: 0px; margin-bottom: 0.2em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; outline-width: 0px; outline-style: initial; outline-color: initial; font-size: 32px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; font-style: normal; font-family: Calibri, 'Lucida Grande', Helvetica, Arial, sans-serif; line-height: 0.9; border-bottom-style: initial; border-bottom-color: initial; background-position: initial initial; background-repeat: initial initial; "> <span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-weight: normal; line-height: 18px; font-size: 13px; "><a href="http://channel9.msdn.com/Events/MIX/MIX11/FRM10">http://channel9.msdn.com/Events/MIX/MIX11/FRM10</a></span></h1> </span><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b>Summary:</b></span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; ">We are collecting more diverse data than ever before and at the same time undergoing a proliferation of connected devices ranging from phone to the desktop, each with its own requirements. This can pose a significant barrier to developers looking to create great end-to-end user experiences across devices. The OData protocol (<a href="http://odata.org">http://odata.org</a>) was created to provide a common way to expose and interact with data on any platform (DB, No SQL stores, web services, etc). In this code heavy session we'll show you how Netflix, EBay and others have used OData and Azure to quickly build secure, internet-scale services that power immersive client experiences from rich cross platform mobile applications to insightful BI reports.</span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><b>Glen Block on WCF Web Apis: There's an URI for That: </b></span><b><a href="http://channel9.msdn.com/Events/MIX/MIX11/FRM14">http://channel9.msdn.com/Events/MIX/MIX11/FRM14</a></b></div> <div><br></div><div><b>Summary:</b></div><div><br></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; ">Web application developers today are facing new challenges around how to expose data and services. The cloud, move to devices, and shift toward browsers are all placing increasing demands on surfacing such functionality in a web-friendly manner. WCF's Web API makes it easy for developers to expose their services and data to a broad set of clients and to take advantage of rich emerging web standards like Web Sockets.</span></div> <div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br> </span></div><div><span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 18px; "><br></span></div></div> Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-77806643613193903492011-04-05T22:58:00.001-07:002011-04-07T11:38:15.713-07:00Delivery and Simplicity : Don't Leave Home Without These Agile Principles<h1></h1><h1><span class="Apple-style-span" style="font-size: large; font-weight: normal;">Bootstrapping Agile from the Trenches</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">In February of 2006, I was offered the position of Lead Architect for the redevelopment of CDC's <a href="http://www.cdc.gov/epix">Epi-X system</a>, CDC's flagship secure communications platform for emergent disease outbreak notification and bi-directional collaboration between multi-jurisdictional public health authorities. However, on the same day I was offered a position at a private .NET consulting company, Abel Solutions. Realizing that actual redevelopment of Epi-X would be months, if not years away, due to the then very disruptive agency-wide reorganization, I decided to leave so that I could gain more experience in a variety of private sector industries.</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">During the five years since I left Epi-X, I've worked as a senior software engineer, architect, lead application architect, and as an independent consultant. My first assignment with Abel Solutions was to re-architect and re-develop a very popular web-based electronic commerce & auction system to support more than 1 million registered users and the processing of more than 300 million dollars in annual sales. For a different company, I re-engineered the security, object-relational, and querying architecture of a complicated human resources & payroll processing system used by thousands of companies. Most recently, I helped lead the design and development of both a modular user-interface architecture and the core service-oriented architecture for a new correspondence banking & ACH settlement platform to be used by hundreds of local and regional banks to conduct business more easily with the Federal Reserve and each other.</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">For the companies sponsoring the first two projects mentioned above, I introduced and lead the successful adoption of Agile management and development practices. For the third, I was recruited specifically to consult both on their adoption of Agile and the design of its new system's user-interface and service-oriented architecture.</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">I've also consulted with many other private entrepreneurial businesses about technology strategy, and in 2008 founded both the <a href="http://www.meetup.com/AtlantaScienceTavern">Atlanta Science Tavern</a> and the <a href="http://www.meetup.com/ATLAltDotNet">ATL ALT.NET</a> community groups.</span></h1><h1><span class="Apple-style-span" style="font-size: large; font-weight: normal;">Aligning the Agile Approach to the Business Domain</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">Let me be the first to state that adopting Agile in the "real world" is not easy. To be successful, you must internalize the values of Agile, especially the very first one which reads:</span></h1><h1 style="text-align: center;"><span class="Apple-style-span" style="font-size: small;">Our highest priority is to satisfy the customer</span></h1><h1 style="text-align: center;"><span class="Apple-style-span" style="font-size: small;"></span><span class="Apple-style-span" style="font-size: small;">through early and continuous delivery</span></h1><h1 style="text-align: center;"><span class="Apple-style-span" style="font-size: small;"></span><span class="Apple-style-span" style="font-size: small;">of valuable software.</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">Did you notice that this specifies nothing whatsoever about writing code? It specifies nothing at all about writing code at all. It specifies delivery of valuable software.</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">Later on in the principles document, it says:</span></h1><h1 style="text-align: center;"><span class="Apple-style-span" style="font-size: small;">Simplicity--the art of maximizing the amount</span></h1><h1 style="text-align: center;"><span class="Apple-style-span" style="font-size: small;"></span><span class="Apple-style-span" style="font-size: small;">of work not done--is essential.</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">It says simplicity is <i>essential</i>, not optional, but <i>essential</i>. How many projects have you seen that feature unnecessary <i>complexity</i>? That is the exact opposite of this Agile principle. For more about this problem, see my post that <a href="http://agilefromthegroundup.blogspot.com/2010/08/review-learning-from-five-years-as-skye.html">reviews a Skype architect's presentation.</a></span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">You can read the rest of the Agile principles here: <a href="http://agilemanifesto.org/principles.html">http://agilemanifesto.org/principles.html</a></span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">I highlight this because a lot of practitioners think that Agile is some kind of magic bullet that will solve all the problems that sequential "waterfall" style development has. This is absolutely not the case. Agile has its own pitfalls that must be addressed as well, and one of them is plainly that development teams don't even understand or truly believe in these two core principles!</span></h1><h1><span class="Apple-style-span" style="font-size: large; font-weight: normal;">The Core of Agile: Communication and Collaboration</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">As the principles in the Agile Manifesto explain, collaboration and communication are the two most critical underlying themes of agile development. What if, by communicating with your clients successfully you could help them avoid spending millions of dollars custom-developing a solution to a problem that you could solve using low-cost or open-source software?</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;"><i>Would that not be the ultimate fulfillment of the first principle of Agile?</i> I think it most certainly would. And, it would certainly fulfill the later example I highlighted!</span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">Unfortunately, many people, even managers, fail to think this way when they adopt Agile. This is not to say that they don't mean well. It's often just the case that they recognize Agile, and associated development practices like XP and TDD, as a better way of </span><span class="Apple-style-span" style="font-size: small;">building software</span><span class="Apple-style-span" style="font-size: small; font-weight: normal;">, but can lose sight of principle number one: </span><span class="Apple-style-span" style="font-size: small;">delivery of valuable software.</span></h1><h1><span class="Apple-style-span" style="font-weight: normal;"><span class="Apple-style-span" style="font-size: large;">Internalized Agility = Flexibility</span></span></h1><h1><span class="Apple-style-span" style="font-size: small; font-weight: normal;">True internalization of Agile values should cause architects, developers, testers, and all manner of managers to adopt an attitude of true collaboration with their stakeholders.</span></h1><h1><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;">So, keep it mind that being agile doesn't always mean </span><i>building software</i><span class="Apple-style-span" style="font-weight: normal;">. First and foremost, it means </span><i>delivering valuable software</i><span class="Apple-style-span" style="font-weight: normal;">.</span></span></h1>Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-15800095670350403852011-03-29T22:38:00.001-07:002011-03-29T22:38:15.957-07:00New Reading List: Acceptance Testing, Specification by ExampleAs usual, there are far, far too many topics that interest me than I will likely be able to comprehend.<div><br></div><div>I'm extremely interested in recent presentations and work from Gojko Adzic.</div><div><br></div> <div>I'm going to buy his books Briding the Communication Gap and Specification by Example:</div><div><br></div><div><a href="http://www.acceptancetesting.info/the-book/">http://www.acceptancetesting.info/the-book/</a></div> <div><br></div><div><a href="http://www.manning.com/adzic/">http://www.manning.com/adzic/</a></div><div><br></div><div>You can see Gojko present about these topics in numerous places, including:</div><div><br></div><div><a href="http://www.acceptancetesting.info/">http://www.acceptancetesting.info</a></div> <div><br></div><div><a href="http://www.mefeedia.com/watch/32039109">http://www.mefeedia.com/watch/32039109</a></div><div><br></div><div><a href="http://skillsmatter.com/podcast/design-architecture/ddd-tdd-bdd">http://skillsmatter.com/podcast/design-architecture/ddd-tdd-bdd</a></div> <div><br></div><div>Why do these topics interest me? The easy answer is that I find it very painful, both mentally, and physically to endure lapses of communication in projects that lead to lost time, money, or functionality when I know in my heart such problems can be avoided with proper communication.</div> <div><br></div><div>Scott Ambler has also written extensively about Executable Specifications at <a href="http://www.agilemodeling.com/essays/executableSpecifications.htm">http://www.agilemodeling.com/essays/executableSpecifications.htm</a>. </div> <div><br></div><div>These ideas bring together the two aspects of system development that matter most to me:</div><div><ul><li>Achieving the correct result for my customer / user</li><li>Seeing something <b><i><u>valuable </u></i></b><i><u><b>running</b></u></i></li> </ul></div><div>Nothing is more crucial to my sense of accomplishment when building a system than to see the correct result in <i><b><u>action.</u></b></i> I know, however, that many teams value "documentation" as a very important communication artifact that serves to mediate between "the business" and "the development team", but I find this to be a source of constant frustration for the very reasons that Gojko lays out. Instead, what is more valuable, and very satisfying, is to execute the documentation, the specification, the requirements in a testable, verifiable way that itself represents real tangible value, not just words on a dead sheet of paper.</div> <div><br></div><div>Gojko's presentations are excellent and his books look like they will really fill the "gap" in my own arsenal. I am looking forward to devoting significant time to studying these works.</div> <div><br></div><div>As he explains on his web site, here are the "Key Ideas" in the Bridging the Communication Gap book:</div><div><ul style="font-family: verdana, sans-serif; font-size: 12px; line-height: 16px; "> <li><a href="http://www.acceptancetesting.info/key-ideas/telephone-game/" style="color: blue; text-decoration: none; ">The telephone game</a></li><li><a href="http://www.acceptancetesting.info/key-ideas/collaborative-specifications" style="color: blue; text-decoration: none; ">Collaborative specifications</a></li> <li><a href="http://www.acceptancetesting.info/key-ideas/challenging-requirements" style="color: blue; text-decoration: none; ">Challenging requirements</a></li><li><a href="http://www.acceptancetesting.info/key-ideas/specification-by-example/" style="color: blue; text-decoration: none; ">Specification by example</a></li> <li><a href="http://www.acceptancetesting.info/key-ideas/examples-as-acceptance-tests" style="color: blue; text-decoration: none; ">Examples as acceptance tests</a></li><li><a href="http://www.acceptancetesting.info/key-ideas/ubiquitous-language" style="color: blue; text-decoration: none; ">Ubiquitous language</a></li> <li><a href="http://www.acceptancetesting.info/key-ideas/communicating-intent" style="color: blue; text-decoration: none; ">Communicating intent</a></li><li><a href="http://www.acceptancetesting.info/key-ideas/incremental-specifications" style="color: blue; text-decoration: none; ">Incremental specifications</a></li> <li><a href="http://www.acceptancetesting.info/key-ideas/specification-workshop" style="color: blue; text-decoration: none; ">Specification workshops</a></li><li><a href="http://www.acceptancetesting.info/key-ideas/distilling-the-specification" style="color: blue; text-decoration: none; ">Distilling the specification</a></li> <li><a href="http://www.acceptancetesting.info/key-ideas/executable-specifications" style="color: blue; text-decoration: none; ">Executable Specifications</a></li><li><a href="http://www.acceptancetesting.info/key-ideas/live-documentation" style="color: blue; text-decoration: none; ">Live documentation</a></li> </ul></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div> Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-8666293332229143452011-03-28T21:49:00.001-07:002012-04-28T16:04:50.891-07:00Strangulation: The Pattern of Choice for Risk Mitigating, ROI-Maximizing Agilists When Rewriting Legacy Systems<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhInUr4ilMveUpG0vxsxSk5VJ75r089RP_GYTT-t5aJJW3aI84dH9gev8i86DPgOdXUzmmdLsNw6QyRui9lmEV4ChcCPexuX4yGWTi8BLfeql8oZSrg2D8UiF-q_pSc6ir6gLUAAAsyqjg/s1600/strangler.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhInUr4ilMveUpG0vxsxSk5VJ75r089RP_GYTT-t5aJJW3aI84dH9gev8i86DPgOdXUzmmdLsNw6QyRui9lmEV4ChcCPexuX4yGWTi8BLfeql8oZSrg2D8UiF-q_pSc6ir6gLUAAAsyqjg/s1600/strangler.jpg" /></a></div><br />
<blockquote><i>"The most important reason to consider a strangler application over a cut-over rewrite is reduced risk. A strangler can give value steadily and the frequent releases allow you to monitor its progress more carefully. Many people still don't consider a strangler since they think it will cost more - I'm not convinced about that. Since you can use shorter release cycles with a strangler you can avoid a lot of the unnecessary features that cut over rewrites often generate.<b>" -- Martin Fowler, Chief Scientist, ThoughtWorks, on <a href="http://www.martinfowler.com/bliki/StranglerApplication.html">The Strangler Pattern</a></b></i></blockquote><br />
<span style="font-family: arial;">When rewriting a system in a new technology, it's tempting to think that the task will be easier and quicker than the first time it was written. Because of this, sometimes business sponsors believe that a "waterfall" or "big bang all at once" approach will work out, but this is rarely the case for any project large enough and important enough to warrant rewriting. It's always important to practice iterative and incremental development to provide for feedback loops. But, it's even more important to do this in the case of a large application rewrite. This article will explain why this is true. There are a few bedrock development principles that project sponsors and team members should put into practice to ensure the success of large scale migrations. Having learned these lessons from experience, these are:</span><br />
<ol><li style="font-family: Arial;">Involve business sponsors and end-users directly (or a user-experience specialist) and the entire support and operations teams during the entire rewrite<br />
</li>
<li style="font-family: Arial;">Involve permanent quality-assurance professionals from the beginning and during the entire rewrite<br />
</li>
<li style="font-family: Arial;">Design, code, and test one complete feature rewritten from the existing system as quickly as possible<br />
</li>
<li style="font-family: Arial;">Thereafter, design, code, test, and pilot user-valued, return-on-investment-generating (ROI) features in small increments</li>
<li style="font-family: Arial;"><span style="font-family: arial;">Most importantly, continuously build team member skills, knowledge, and leadership abilities</span><br />
</li>
</ol><h2><span style="font-family: arial;">Lessons Learned in Rewriting Large Legacy Systems </span></h2><span style="font-family: arial;">In February of 2006 I joined a small .NET consulting company. Shortly thereafter I was assigned to a brand new project for one of their clients to analyze, design, and develop a new version of an existing electronic commerce platform. The system was a highly successful, niche-market leading auction site with nearly 700,000 registered users at the time. In operation for more than seven years by then, the system was built on classic ASP, C++/COM, and SQL Server 2000. It consisted of about 330 ASP pages. Our client wanted to do two primary things. First, he wanted to add new, value-added features to the system to provide a much better user experience, one that would be similar to eBay. These features would be called "My Auctions". This new set of features would take the place of roughly 30 pages from the existing web site. Second, he wanted to migrate the other 300 pages, without introducing any functionality or usability improvements, to <a href="http://asp.net/">ASP.NET</a> WebForms. Having already personally designed and developed the entire business object back-end COM objects, he wanted all of the new web site to <i>reuse this investment</i> by utilizing COM Interop.<br />
</span><br />
<h2><span style="font-family: arial;">My Recommendation: Perform a Phased, Vertical Migration One Piece at a Time</span></h2><span style="font-family: arial;">My first assignment was to analyze the existing ASP and C++ code to and produce a migration strategy recommendation. This strategy document would lay out our company's professional opinion for migrating the system to the .NET platform and the C# language. My recommendation was for our client to perform a vertical migration, which is a migration that incorporates an entire functional slice of a subset of the system (My Auctions) which cuts across all architectural layers (top-to-bottom). In their book <u>The Pragmatic Programmer</u>, Dave Thomas and Andrew Hunt call this a "tracer bullet". This was, in fact, what Microsoft recommended in their best practices guidance documents that I researched about performing large scale system architecture migrations. I recommended that our client hire us to build a new core platform on <a href="http://asp.net/">ASP.NET</a> with C# and get the new, value-added features to market <i><b>as soon as possible</b></i> on top of that core platform. Only after these value-added features were in production would we then move on to replacing the rest of the 300 pages with <a href="http://asp.net/">ASP.NET</a> replacements.<br />
</span><br />
<h2><span style="font-family: arial;">My Reasoning: Place Customer Satisfaction, ROI, and Risk Mitigation First</span></h2><span style="font-family: arial;">My reasoning was that by creating a new core platform and building the brand new, usability-focused, value-added My Auctions features on top of that, our client would generate a return-on-investment (ROI) much sooner by generating more sales volume with the user-friendly features and would simultaneously mitigate significant risk by testing the viability of the COM Interop strategy. By virtue of the features being <i>value-added</i>, there would be no risk whatsoever for him to deploy them to a parallel web server and get his users to begin pilot testing the system and <b><i>providing valuable feedback early on in the game when he could still make significant changes prior to committing to replacing the entire system</i></b> with the new technology.</span><br />
<span style="font-family: arial;"><br />
</span><br />
<div style="color: red;"><span style="font-family: arial;"><i><b>I've since learned from Dan North at QCon 2010 in S.F. that is called <a href="http://www.martinfowler.com/bliki/StranglerApplication.html">The Strangler Pattern</a> according to Martin Fowler, hence the title of this post!</b></i> </span><span style="font-family: arial;"> </span></div><h2><span style="font-family: arial;">Client Decision: Let's Do It All At Once</span></h2><span style="font-family: arial;">Our client considered my recommendation very carefully, but wanted to take a different approach. Rather than deploy the new My Auctions features independently, side-by-side with the existing system, he wanted to have his in-house staff work on the other 300 pages while our company worked on the value-added features. With more than 330 pages to complete, I estimated that the project would not take less than a year, but would more likely take two years or more to complete. Our client and my manager thought things could be done much faster if we had three or four people working on the system. This was certainly the case early on when I worked side-by-side with another developer in our company. <b><i>Within four months, he and I had completed the new C# application foundation and the value-added features to the point that they were ready for beta-testing.</i></b><br />
<br />
And that's when all the fun began!<br />
</span><br />
<h2><span style="font-family: arial;">Planning is Essential; Plans are Useless</span></h2><span style="font-family: arial;">As anyone who has worked in the software industry for a number of years knows, the best laid plans never go as you planned. Our client's lead C# developer left his company. Soon after that, my manager at my company was let go, but several months later he was hired by our client to take over the development management of the project. This made sense since he already had strong background on the project since its inception. Shortly after this, our client's HTML, graphics, and CSS developer quit when asked to change his focus to become an <a href="http://asp.net/">ASP.NET</a> developer. They hired a lead C# developer and he got to working on a large slice of the application while I continued to work on another large slice. Five months later, they hired a second C# developer and he began working on several other slices of the application. <br />
<br />
Wanting to see the project through to success, I joined the client as a direct employee to continue being the lead architect for the project.<br />
</span><br />
<h2><span style="font-family: arial;">Naturally, There's a Big Trade Show In The Story</span></h2><span style="font-family: arial;">What would any development story be without a "Big Trade Show" lurking around the corner? As luck and fate would have it, in early 2008 there was a huge industry trade show, and it was critical that we would be able to demonstrate the new version of the system to the roughly 25,000 customers that would be passing through our booth. And, it would be very important that these customers be able to see their own <i><b>real items</b></i>, either ones they were selling or ones they were buying. The problem was, of course, that the system was not ready to replace the production system! Due to security requirements brought about by a changing legal environment, we had to repartition the back-end database for the new system from 2 SQL databases into 6 separate databases just before the trade show. It was deemed too risky to perform this radical "surgery" on the live, production system just two months before the trade show. The new system's schema was about 95% the same as the old system, but there were corrections to long-standing column name problems or foreign-key reference inconsistencies. This was a complicating factor, however, for migration.<br />
<br />
We tossed around various ideas, such as:<br />
</span><br />
<ul><li><span style="font-family: arial;">Perform the "surgery" on the production database to upgrade it to the new system schema, then use views and synonyms to create a "pass-through" database that looked like the old schema, but mapped across to the new DBs and structures.</span></li>
<li><span style="font-family: arial;">Do the reverse: create several "pass-through" new databases with views and synonyms that actually resolved to the single existing production database's objects.</span></li>
</ul><span style="font-family: arial;">We felt that we could mitigate risk entirely by following the second option. What this also allowed us to do was to "override" some of the production system's tables with configuration data specific to the new system. The approach of using synonyms and views ensured that all writes and reads against the pass-through objects would actually resolve into the production database, thus enabling the beta version of the new system to live side-by-side with the legacy system.<br />
</span><br />
<h2><span style="font-family: arial;">The War Room</span></h2><span style="font-family: arial;"> After some proof-of-concept prototyping, we realized this would be a winning strategy. Over the next couple of weeks, the four of us on the development team gathered daily in our "war room", and worked together to create all the necessary SQL scripts and shell databases, synonyms, views, etc that would be the magic glue. We ensured that we could re-run the scripts at will and automated our quality-control checks and sanity checks to be certain that all mappings would have proper permissions and configurations. After enough practice runs, we felt confident that it was ready to go. We created a single zip file which contained 5 BAK files, and a T-SQL script. We handed them off to our lead database administrator and he ran the scripts. Everything worked just as planned!</span> <br />
<h2><span style="font-family: arial;">Cha-Ching!</span></h2><div style="font-family: Arial;">At the trade show, everything went off flawlessly! Customers attended our booth and we, the development team, aided them directly in logging into the system and showcasing the new features we had worked so hard to develop. It was a very gratifying feeling to see how our improvised plan came together so well. Most importantly, we had succeeded in mitigating all risks to the money-generating production system, while also achieving the benefit of showcasing the new system to customers with real data. This was very exciting to them because they felt that the new features would greatly help them run their own businesses atop our platform.</div><h2 style="font-family: Arial;">Phased Transition From Legacy to New</h2><div style="font-family: Arial;">We had now successfully demonstrated and validated the new, value-added features directly with customers in person. This was a great success. Yet, there was still much to do after the trade show. Features of lesser prominence, those in the 300 other pages set still needed to be developed and tested. This ended up taking a very long time, but we ultimately cycled back to my original recommendation by adopting an incremental replacement strategy.</div><div style="font-family: Arial;"><br />
</div><div style="font-family: Arial;"><b>It worked like this:</b></div><ul><li><span style="font-family: arial;">We deployed the new system to a new web server, named v2. <br />
</span></li>
<li><span style="font-family: arial;">The existing, v1 site, remained at www. <br />
</span></li>
<li><span style="font-family: arial;">We provided a link from v1 to v2 in the header of the v1 site, including advertising the benefits of the new system, but also including disclaimers and calls for assistance in testing and validating the usability of the new system.</span></li>
<li><span style="font-family: arial;">This garnered a lot of early-adopters who helped find bugs and inconsistencies, all for free to us!</span></li>
<li><span style="font-family: arial;">We monitored the usage patterns of v2 versus v1, to help estimate the load capacity under real-world conditions.</span></li>
<ul><li><span style="font-family: arial;">Michael Nygard's book "Release It!" proved prophetic here. In his book he says that "feature complete" is not the same as "production ready."</span></li>
<li><span style="font-family: arial;">We learned this because the COM code had to be completely replaced with pure C# code since it could not stand up under load using COM Interop.</span></li>
<ul><li><span style="font-family: arial;">This result bore out my original advice to get the new features into production <i><b>as soon as possible</b></i> to monitor under real world conditions.</span></li>
</ul></ul><li><span style="font-family: arial;">We formally adopted Scrum and Agile practices by identifying business-driven priorities and working through them in sprints.</span></li>
<ul><li><span style="font-family: arial;">We did this by closely monitoring the real-world usage of both the existing v1 system and the v2 system and focusing our effort first on the highest traffic pages, such as Viewing, Browsing, and Searching. Of course, Bidding and Payment, while producing less volume, were also mission-critical.</span></li>
<li><span style="font-family: arial;">This focus allowed us to prioritize properly. We did not place inordinate emphasis on automating the testing of all areas of the system.</span></li>
<ul><li><span style="font-family: arial;">For example: we did not write Selenium test suites for things like Help Pages or Support Pages. Why? They are seldom used! And, they generate no revenue.</span></li>
<ul><li><span style="font-family: arial;">Instead, we built comprehensive Selenium test suites for the Big Four: Viewing, Browsing & Searching, Bidding, and Payment.</span></li>
</ul></ul></ul></ul><h2 style="font-family: Arial;">A Pleasant Surprise!</h2><div style="font-family: Arial;">With the site now operating both in legacy, classic mode at www, and in "beta" mode at v2, the team began to actively monitor the new system's health health and encourage more and more users to jump into using v2. And, because we had focused on developing the value-added My Auctions features in the very beginning of the project, those features sat ready and willing to get into production! Our newest member of the team, who joined about two years after those features were ready and "shelved", took it on his own initiative, to our delight, to start building a mobile version of the core My Auctions features using <a href="http://asp.net/">ASP.NET</a> MVC and the business objects that supported the My Auctions features. He was reluctant to show this prototype to the "higher ups", but the rest of our team encouraged him to do so. Within a few months, his mobile application was released into production before the global "switchover", described below, to the new system. A job well done!</div><h2><span style="font-family: arial;">Switching Over Right on Time for a Cool Billion Dollars</span></h2><span style="font-family: arial;">Over the course of more than a year, the team monitored the usage of v1 and v2, and began to more aggressively push the late adopters and stragglers into the new system. </span><span style="font-family: arial;">Eventually a "switchover" was made, and the v2 system took over the place of www. At that point, there was now a link back to v1, which ran from a virtual machine.</span><span style="font-family: arial;"> Several months after this, the VM was retired, and the v1 system, and all of its legacy COM, was no more.</span><br />
<br />
<span style="font-family: arial;"><u><i><b>Just after the legacy system was retired for good, the company celebrated its 10th anniversary and 1 billion dollars in sales volume!</b></i></u></span><br />
<br />
<h2 style="font-family: Arial;">Retrospective</h2><span style="font-family: arial;">In retrospect, I spent nearly three years working on this project and learned a great deal! While I wish that the original plan of seeing the entire migration take place "all at once" could have been successful, I also am pleased that my original recommendation to take a phased, incremental, risk-mitigating, ROI-maximizing approach was very sound. Ultimately, that very approach became necessary due to the "expected" unexpected bumps along the road!</span><br />
<h2><span style="font-family: arial;">Application to Domains Seeking Non-Financial Returns</span></h2><span style="font-family: arial;">I understand that not all projects involve financial reward goals. Before I began working on the project just described, I worked for four years at the US Centers for Disease Control and Prevention. While working there, we were not seeking to generate financial return-on-investment. However, we did seek returns in the form of utility and value to the users and stakeholders of our systems. To assess this properly, it was critical to either observe the real users working with the system or to sit down with them and experience their pain, frustration, and sometimes: <i><b>delight!</b></i> Our team did this regularly by conducting evaluations, performing proficiency testing, and through coordinated multi-agency and stakeholder exercises under simulated public health emergency "war games". </span><br />
<h2 style="font-family: Arial;">Tying This All Back to Agile</h2><div style="font-family: Arial;">While I've written more extensively on Agile in other posts on this blog, this post has not been about the "mechanics" of agile so much as it has been about the why. But, I want to look at just the first principle of the Agile Manifesto and make a brief comment:</div><div style="font-family: Arial;"><br />
</div><div style="font-family: Arial; text-align: center;"><span style="font-size: medium;">Our highest priority is to satisfy the customer<br />
through early and continuous delivery<br />
of valuable software.</span></div><br />
<span style="font-family: arial;">One might look at this principle and ask how can this be done when facing the situation I originally faced that featured my own client asking not for a continuous delivery model, but a "big bang" model? That's a very good question, and it's not one that has any quick-fix answer. My best advice here is that you need to learn the language and goals of both your client and your client's ultimate customers. If your client values financial returns, then ask him or her exactly what it is that generates financial returns. </span><br />
<br />
<span style="font-family: arial;">In my client's case, returns come in when more people purchase items through his system. The next question should be: <b><i>what is the shortest path we can take to increase that rate?</i></b> If the client answers that the shortest path is to rewrite the entire system and deploy a big-bang upgrade, then you're going to have to keep breaking that down into smaller and smaller value-added chunks. You might have to suggest straw-men in terms of business-value if your client will not prioritize by business value naturally. Ultimately, like in this story, reality may bear down on the situation and if you have done your best to incrementally develop the system in terms of business value, then you can deliver value, upholding your end of the deal to the utmost of your ability within your realm of control. Sometimes that's the best you can do, until you run your own show!<br />
</span>Joshua Goughhttp://www.blogger.com/profile/14059295487103799456noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-38472952019294467062011-03-16T23:36:00.001-07:002011-03-16T23:36:54.202-07:00Thoughts on www.MVCConf.com : ExcellentI started listening to some of the videos at <a href="http://www.MVCConf.com">http://www.MVCConf.com</a> today, including Scott Guthrie's keynote and Glen Block's lecture about WCF's super-enhanced REST support. Glen now calls himself a "REST head". Great!<div> <br></div><div>The development of NuGet and Openwrap is really welcome to me. What must be 14 to 15 years ago now, when I started using PERL, I was very impressed by how well-oiled the machinery of CPAN was for installing packages and modules from the command line, even under Windows. When I started developing C# applications in 2001, I was very disappointed by the lack of a cohesive community of open-source packages available for Microsoft .NET. There have long been open-source projects. But, a package is different from a project. A package is shippable, deployable, consumable. I'm really happy to see this kind of thing coming into the .NET world.</div> <div><br></div><div>I don't know where the credit goes, I'm sure it goes to many people. But, I definitely think a lot goes to Scott Guthrie for the enhanced openness that Microsoft has demonstrated in past years. I know from reading that this story also ties to Shawn Walker, the creator of DotNetNuke for his advanced forays into open-source based upon .NET.</div> <div><br></div><div>Yes, I know the "entire stack" is not open-source, and that doesn't bother me that much.</div> Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-13442779683150249682010-09-05T00:13:00.001-07:002010-09-05T23:07:37.727-07:00Aligning Business Requirements With Test-Driven-Development: Behavior-Driven-Development<div class="wlWriterHeaderFooter" style="float:none; margin:0px; padding:4px 0px 4px 0px;"><iframe src="http://www.facebook.com/widgets/like.php?href=http://agilefromthegroundup.blogspot.com/2010/09/aligning-business-requirements-with.html" scrolling="no" frameborder="0" style="border:none; width:450px; height:80px"></iframe></div><div class="zemanta-img">Test-Driven-Development (TDD) is a topic that has become ubiquitous within software development over the past ten years or so. What is somewhat lesser known at this point is a particular evolution of TDD into what Dan North and <a class="zem_slink" title="Dave Astels" href="http://en.wikipedia.org/wiki/Dave_Astels" rel="wikipedia">Dave Astels</a> have dubbed <a class="zem_slink" title="Behavior Driven Development" href="http://en.wikipedia.org/wiki/Behavior_Driven_Development" rel="wikipedia">Behavior-Driven-Development</a> (BDD). There are some specific problems with TDD that Dan and Dave have sought to correct by attempting to popularize BDD. This article will discuss some of the problems as well as some of the remedies.</div> <div class="zemanta-img"> </div> <div class="zemanta-img">While the stated goals of both TDD and BDD are similar, there are thought-process differences that should be understood by both technical developers and business people, including business analysts, project managers, product owners, and even CEOs. While one can philosophically argue that TDD “done right” is simply BDD anyway, I’ll trust North and Astels when they confidently state that the language people use is powerful and important and that is why they prefer to practice and speak of BDD now after years of experience.</div> <div class="zemanta-img"> </div> <h3>Article Goal: Explain Why Businesses and Developers Might Want to Try BDD</h3> <div class="zemanta-img"> <br />This article will explain the distinctions between TDD and BDD and will show how using the BDD approach, as designed, should lead to:</div> <ul> <li> <div class="zemanta-img">Reduced costs due to higher fidelity specifications and communications</div> </li> <li> <div class="zemanta-img">Reduced timelines due to less requirements churn and closer business and development alignment</div> </li> <li> <div class="zemanta-img">Increased productivity due to the executable nature of BDD specifications</div> </li> </ul> <h3>Test-Driven-Development</h3> <p>As a working definition of Test-Driven-Development from <a title="http://en.wikipedia.org/wiki/Test-driven_development" href="http://en.wikipedia.org/wiki/Test-driven_development">http://en.wikipedia.org/wiki/Test-driven_development</a> is:</p> <blockquote> <p>“Test-Driven-Development (TDD) is a software development process that relies on the repetition of a very short development cycle: first the developer writes a failing automated test case that defines a desired improvement or new function, then produces code to pass that test and finally refactors the new code to acceptable standards. <a class="zem_slink" title="Kent Beck" href="http://en.wikipedia.org/wiki/Kent_Beck" rel="wikipedia">Kent Beck</a>, who is credited with having developed or 'rediscovered' the technique, stated in 2003 that TDD encourages simple designs and inspires confidence. </p> <p>Test-driven development is related to the test-first programming concepts of extreme programming, begun in 1999,[2] but more recently has created more general interest in its own right.”</p> </blockquote> <p><a class="zem_slink" title="Scott Ambler" href="http://en.wikipedia.org/wiki/Scott_Ambler" rel="wikipedia">Scott Ambler</a> also provides a great summary here: <a title="http://www.agiledata.org/essays/tdd.html" href="http://www.agiledata.org/essays/tdd.html">http://www.agiledata.org/essays/tdd.html</a>. </p> <h5>Test-Driven-Development Workflow Diagram</h5> <p>The mantra of Red, Green, Refactor is well-known by developers. It looks like this:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5YT4JcWsBznTD6yWwQOtvxYbzg1J_i-GgZZpv7Ovl-S33zAN93nC21TpPFEgitEaiPoK14m85gKlAiK8nQl6bsNFIY-jqHVIYwFA_P1O0jZ0ymh-9Yb_V9ol6H828mKmdP84tesefHM8/s1600-h/image%5B3%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUHUKpbp-khKaaNgxav2wB2pBVg0tjM-NJ-tk8B_NXir5GObe0pFfVmJ9Gdc3GEk9PXfy_3wgnPOoPd_rWKIGhJkoEOtjCrd8T1IU6R6qvURm2iBqt-yoKP-RU2WmLhaeisgADrFiElrE/?imgmax=800" width="384" height="736" /></a></p> <h5>Why and When To Practice Test-Driven-Development</h5> <p>It’s important to look at the complete historical, and current context, of Test-Driven-Development to understand its most-appropriate, and less appropriate usage.</p> <p>Kent Beck, mentioned above as the most prominent formalizer of the practice, states this in his blog post “Where, Oh Where to Test?” at <a title="http://www.threeriversinstitute.org/WhereToTest.html" href="http://www.threeriversinstitute.org/WhereToTest.html">http://www.threeriversinstitute.org/WhereToTest.html</a>:</p> <blockquote> <p><strong>“Cost, Stability, Reliability <br /></strong>On reflection, I realized that level of abstraction was only a coincidental factor in deciding where to test. I identified three factors which influence where to write tests, factors which sometimes line up with level of abstraction, but sometimes not. These factors are cost, stability, and reliability. <br /> <br />Cost is an important determiner of where to test, because tests are not essential to delivering value. The customer wants the system to run, now and after changes, and if I could achieve that without writing a single test they wouldn't mind a bit. The testing strategy that delivers the needed confidence at the least cost should win. <br /> <br />Cost is measured both by the developer time required to write the tests and the time to execute them (which also boils down to developer time). Effective software design can reduce the cost of writing the tests by minimizing the surface area of the system. However, setting up a test of a whole system is likely to take longer than setting up a test of a single object, both in terms of developer time and CPU time.”</p> </blockquote> <p>More recently, he clarified the historical context of TDD with his post “To Test or Not to Test? That’s a Good Question”: <a href="http://www.threeriversinstitute.org/blog/?p=187">http://www.threeriversinstitute.org/blog/?p=187</a></p> <blockquote> <p>“Turns out the eternal verities of software development are neither eternal nor verities. I’m speaking in this case of the role of tests. <br /> <br />Once upon a time tests were seen as someone else’s job (speaking from a programmer’s perspective). Along came XP and said no, tests are everybody’s job, continuously. Then a cult of dogmatism sprang up around testing–if you can conceivably write a test you must.</p> <p>By insisting that I always write tests I learned that I can test pretty much anything given enough time. I learned that tests can be incredibly valuable technically, psychologically, socially, and economically. However, until recently there was an underlying assumption to my strategy that I wasn’t really clear about.”</p> </blockquote> <p>In this post, Kent goes on to state this about a product he developed called JUnit Max:</p> <blockquote> <p>“When I started JUnit Max it slowly dawned on me that the rules had changed. The killer question was (is), “What features will attract paying customers?” By definition this is an unanswered question. If JUnit (or any other free-as-in-beer package) implements a feature, no one will pay for it in Max.</p> <p>Success in JUnit Max is defined by bootstrap revenue: more paying users, more revenue per users, and/or a higher viral coefficient. Since, per definition, the means to achieve success are unknown, what maximizes the chance for success is trying lots of experiments and incorporating feedback from actual use and adoption.”</p> </blockquote> <p>He later continues:</p> <blockquote> <p>“When I started Max I didn’t have any automated tests for the first month. I did all of my testing manually. After I got the first few subscribers I went back and wrote tests for the existing functionality. Again, I think this sequence maximized the number of validated experiments I could perform per unit time. With little or no code, no tests let me start faster (the first test I wrote took me almost a week). Once the first bit of code was proved valuable (in the sense that a few of my friends would pay for it), tests let me experiment quickly with that code with confidence.</p> <p>Whether or not to write automated tests requires balancing a range of factors. Even in Max I write a fair number of tests. If I can think of a cheap way to write a test, I develop every feature acceptance-test-first. Especially if I am not sure how to implement the feature, writing a test gives me good ideas. When working on Max, the question of whether or not to write a test boils down to whether a test helps me validate more experiments per unit time. It does, I write it. If not, damn the torpedoes. I am trying to maximize the chance that I’ll achieve wheels-up revenue for Max. The reasoning around design investment is similarly complicated, but again that’s the topic for a future post.</p> <p>Some day Max will be a long game project, with a clear scope and sustainable revenue. Maintaining flexibility while simultaneously reducing costs will take over as goals. Days invested in one test will pay off. Until then, I need to remember to play the short game.”</p> </blockquote> <h5>Analysis of Kent Beck’s Cost-Benefit Based Strategy</h5> <p>If you read Kent’s posts carefully you will see that he made careful cost-benefit analyses whenever he decided to use or not use a TDD approach. When he developed JUnit Max, he chose to get the product features to the market as soon as he could, and then once he had an idea what customers wanted, he stabilized many of those features with tests.</p> <p>So, what motivated Kent was a practical, reasonable, and important concern: <strong>financial viability</strong> and <strong>return-on-investment</strong>.</p> <p>I thik it’s very important to be fully aware of these factors when deciding when and where to use TDD in any project. One of the main drivers of agile or Lean thinking is to optimize the whole, not necessarily individual parts all at once. Because of this, one must think about the larger context of a project.</p> <h5>Financial Investment Necessitates a Nuanced Approach to Development Practices</h5> <p>When thinking about the larger context, it’s easy for a developer to say something like: “We need this code to be well-factored, test-driven, and easy to maintain.” While this absolutely should be the goal of a developer, developers must also be cognizant of the larger context. Almost always, that larger context is that there is a financial investment in the project and the project’s success.  <strong>And, overwhelmingly more often than not, there is a specific timeline involved.</strong> <strong><em>Thus, it cannot ever be solely the developer’s responsibility to set the acceptance criteria for a system’s completion or its acceptable level of quality.</em></strong> Developers and project managers must present risks and tradeoffs to business stakeholders and collaborate to deliver value that is sufficient and as risk-averse as is necessary to the business stakeholders.</p> <h5>Finding the Correct Balance Takes Careful Thought and Collaboration</h5> <p>I cannot give specific recommendations in this article about any particular situation. Rather, I would recommend that all risks and tradeoffs be written down, categorized, and reviewed with key stakeholders in an open and honest fashion. If a product owner would favor a simpler, less glitzy UI in favor of core, sound, well-tested and stable backend services, then the team must focus on delivering this. On the other hand, if a product owner says that customers will be turned off by a UI that is vapid and barren, then the team must work hard to achieve that. </p> <p>Building the correct features of any system is, as Kent Beck mentions, a very experimental process when the goal is not known. Because of this, it’s important to use practices that help in driving toward the correct features in the quickest fashion. Sometimes that approach is careful, stict adherence to TDD. Sometimes it is not. <strong>It takes judgement and careful balancing of all factors between business people and technical people to make the correct decisions.</strong></p> <h5>Problems That Teams Can Face When Practicing TDD</h5> <p>In my experience, projects can get into trouble when project leaders do not make these nuanced decisions about TDD that require careful understanding, analysis, and collaboration amongst the entire team. In a project without a schedule, then it might make sense to practice a strict form of TDD. In projects that have specific dates set in stone, a team must make decisions about when and where to apply strict TDD and when and where to accept technical debt in order to meet those dates.</p> <h3>Delivering Business Value and Mitigating Project Risk Through Behavior-Driven-DevelSopment</h3> <p>It might come as no surprise by the title of this article, that others much more learned in these practices and problems than I have sought remedies. Namely, Dan North and Dave Astels have written and presented widely on Behavior-Driven-Development (BDD) and its close aligntment to business success criteria. The rest of this article will introduce BDD and provide links to sites, videos, presentations, and a sample project in .NET by Rajesh Pillali that provide extensive information.</p> <h3>Introducing Behavior-Driven-Development</h3> <p>As stated on <a href="http://behavior-driven.org/">http://behavior-driven.org</a>, the definition of BDD is:</p> <blockquote> <p>“Behaviour-Driven Development (BDD) is an evolution in the thinking behind <a href="http://behaviour-driven.org/TestDrivenDevelopment">Test-Driven-Development</a> and <a href="http://behaviour-driven.org/AcceptanceTestDrivenPlanning">Acceptance-Test-Driven-Planning</a>. </p> <p>It brings together strands from <a href="http://behaviour-driven.org/TestDrivenDevelopment">Test-Driven-Development</a> and <a href="http://behaviour-driven.org/DomainDrivenDesign">Domain-Driven-Design</a> into an integrated whole, making the relationship between these two powerful approaches to software development more evident. </p> <p>It aims to help focus development on the delivery of prioritised, verifiable business value by providing a common vocabulary (also referred to as a <a href="http://behaviour-driven.org/UbiquitousLanguage">Ubiquitous Language</a>) that spans the divide between Business and Technology.”</p> </blockquote> <p>Dan North’s original formulation of BDD is here: <a title="http://blog.dannorth.net/introducing-bdd/" href="http://blog.dannorth.net/introducing-bdd/">http://blog.dannorth.net/introducing-bdd/</a>. Dave Astels clearly explains it more succinctly in his own article here: <a title="http://techblog.daveastels.com/files/BDD_Intro.pdf" href="http://techblog.daveastels.com/files/BDD_Intro.pdf">http://techblog.daveastels.com/files/BDD_Intro.pdf</a></p> <h4>Business Analysts Write Executable Specifications When Teams Practice Behavior Driven Development</h4> <p>Here is an example BDD feature specification from the SpecFlow project’s web site:</p> <p><a href="http://lh5.ggpht.com/_iiRWyargx_M/TIPFaQjA-vI/AAAAAAAAAEw/O79F9gIxB_4/s1600-h/image%5B7%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2hvMyAHmFDwnjyeEmYR8C4jqTBj2lYCo7TDwkV8_LhrFUE9RWqouDaXM3F8kB7MneVlC4QfP8ix1KCh1ZjXkzZgZVGJZhebLzBYtfVRojG-RhMxW-7YmEU7is7-83O3We4UKV_IZVjB4/?imgmax=800" width="517" height="331" /></a> </p> <p>There are other “Steps” in the worflow, but here is how the ultimate fulfillment of that specification gets executed and measured:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiTi4qT6kA3hnjjmyuozQ9qzPca24pmFxPipG6WsITEB4YBg6L0Xl4X-Ha3R705eaKRxa9uyAJkEUxmNsKRclMorKztxjvdi-ZRUbajjBzoCEsQZZAG_6B0W6VPf7sL8S_cHBKH_ZFAr0/s1600-h/image%5B11%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_iiRWyargx_M/TIPFa7qfFzI/AAAAAAAAAE8/i8A8C5_HRUs/image_thumb%5B5%5D.png?imgmax=800" width="596" height="435" /></a> </p> <h3>TODO:</h3> <p>Complete article</p> <h3>Complete Examples</h3> <p>Rajesh Pillali provides an excellent article on CodeProject here: <a title="http://www.codeproject.com/KB/architecture/BddWithSpecFlow.aspx" href="http://www.codeproject.com/KB/architecture/BddWithSpecFlow.aspx">http://www.codeproject.com/KB/architecture/BddWithSpecFlow.aspx</a></p> <div class="zemanta-pixie"></div> Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-18036208333618897982010-09-04T23:21:00.001-07:002010-09-04T23:50:11.671-07:00Retrospective of Greg Young’s Final CQRS and DDD Online Course<div class="wlWriterHeaderFooter" style="float:none; margin:0px; padding:4px 0px 4px 0px;"><iframe src="http://www.facebook.com/widgets/like.php?href=http://agilefromthegroundup.blogspot.com/2010/09/retrospective-of-greg-youngs-final-cqrs.html" scrolling="no" frameborder="0" style="border:none; width:450px; height:80px"></iframe></div><p>I woke up at 4 am so that I could virtually attend via LiveMeeting <a href="http://codebetter.com/blogs/gregyoung/default.aspx">Greg Young’s</a> final online CQRS and DDD course. While I had some sound issues and had to keep coming back into the session, I can still say: Wow! Greg’s knowledge is excellent and his presentation was great.</p> <p>You can watch him deliver a similar talk at this Skillsmatter podcast about the business perspectives of this architecture: <a title="http://skillsmatter.com/podcast/open-source-dot-net/greg-young-cqrs-event-sourcing-the-business-perspecive" href="http://skillsmatter.com/podcast/open-source-dot-net/greg-young-cqrs-event-sourcing-the-business-perspecive">http://skillsmatter.com/podcast/open-source-dot-net/greg-young-cqrs-event-sourcing-the-business-perspecive</a></p> <p>It’s easiest these days for me to learn visually, so in review, here are a couple of slides from another blogger, <a href="http://geekswithblogs.net/Optikal/archive/2010/06/08/140287.aspx">Dylan Smyth</a>, who blogged about this that summarize the distinction between a CQRS style architecture and a more typical stack:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-T2z89II6xEGJaZXddBwxqMCvHjelQctVTXVHMxBKkzfMaVj4bUq2kfGSZmcdEekAvZoVywnJFoBfY9Wf8EPFxX5xrbxdF-Qipm3zYPh3UeJc8EHJGO2aMduw7CfJ75pkCXunqoDUUwQ/s1600-h/image3.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; margin-left: 0px; border-left-width: 0px; margin-right: 0px" title="image" border="0" alt="image" align="left" src="http://lh3.ggpht.com/_iiRWyargx_M/TIM29FWLpKI/AAAAAAAAAEU/2mBZbTcCXDw/image_thumb1.png?imgmax=800" width="756" height="280" /></a></p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p><a href="http://abdullin.com/cqrs">Rinat Abdullin has a great diagram</a> on his own blog depicting what Greg also calls the Task-Driven UI:</p> <p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-UDHcaHCku0G-Yhq_cujYGN2QSkgfEhYiEobXaX9BJlszjvtUbNcM-bKk2jU33sl-FtA3d-ECjoAaCG9DCqG-AySuTDWC3FEiFIxFejZY5kt1nMdoP779_f6wvmMRc9NFBLY5Bj2YmOQ/s1600-h/image%5B8%5D.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_iiRWyargx_M/TIM9ogyUyoI/AAAAAAAAAEk/FV5a2ssxqf0/image_thumb%5B3%5D.png?imgmax=800" width="479" height="587" /></a> </p> <p> </p> <p>To summarize in my own, short, words:</p> <h2>Typical Architecture</h2> <p>On the left side we have the “typical” architecture which has this kind of interaction model:</p> <ol> <li>User clicks a button in a client.</li> <li>Client issues a request to the server, asking for Product with ID 50, for example.</li> <li>Server fetches an entity for Product with ID 50.</li> <li>Server creates a DTO from this entity and sends it to the client.</li> <li>The client modifies this DTO.</li> <li>Client ships the modified DTO back to the server for an update.</li> </ol> <h2>CQRS Architecture</h2> <p>He contrasts that the right side, which he says may appear at first to be more complex, but it actually turns out to be simpler and less costly because of the Thin Read Layer in which the operations are optimized for read, not write. This means the translation from data to DTO occurs directly here. </p> <ol> <li>User clicks a button in a client.</li> <li>Client issues a read request to the server, asking for Product with ID 50.</li> <li>Server fetches the data for Product with ID 50.</li> <li>Server creates a DTO from this entity and sends it to the client.</li> <li>The client operates on a screen and issues a Command to the server, which is not equivalent with sending a modified DTO back to the server.</li> </ol> <p>An important note here is that the "Event Store” is where the commands are serialized, which does not have to be in a relational database. The De-Normalized Data Cache is where a “view” of data created and stored as a result of the Events being stored.</p> <h2>CQRS Diagram</h2> <p>This is an image that Udi Dahan uses to describe CQRS <a href="http://www.udidahan.com/2009/12/09/clarified-cqrs/">in his own post Clarified CQRS</a>:</p> <p><a href="http://lh5.ggpht.com/_iiRWyargx_M/TIM29SxofVI/AAAAAAAAAEY/4y0G4gsNE-c/s1600-h/image%5B4%5D.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVVwdqiEa6syrO0iPrksYtcEV8mS6m84hiCCydLlKAwiznaMU6d8NsUrUJ_PG2P2hW1WUSPmeWr-YbzOqYt0osaQ3rMfBP3mii88dBwP6GeihIpyysRLCzubN5ZUTXaLXsauoIJji3kTI/?imgmax=800" width="504" height="323" /></a> </p> <h2>Domain-Driven-DESIGN</h2> <p>He also discussed Domain-Driven-Design after talking about CQRS, but unfortunately I did not hear all of that. </p> <h2>Recommend Resources</h2> <p>In addition to the Skillsmatter podcast above, here are some other recommended links about CQRS:</p> <ol> <li>Super Simple CQRS Example from Greg Young: <a title="http://codebetter.com/blogs/gregyoung/archive/2010/08/31/super-simple-cqrs-example.aspx" href="http://codebetter.com/blogs/gregyoung/archive/2010/08/31/super-simple-cqrs-example.aspx">http://codebetter.com/blogs/gregyoung/archive/2010/08/31/super-simple-cqrs-example.aspx</a></li> <li>Clarified CQRS, Udi Dahan: <a title="http://www.udidahan.com/2009/12/09/clarified-cqrs/" href="http://www.udidahan.com/2009/12/09/clarified-cqrs/">http://www.udidahan.com/2009/12/09/clarified-cqrs/</a></li> <li>Udi Dahan on CQRS, DDD, and NServiceBus: <a title="http://www.infoq.com/interviews/dahan-cqrs-ddd-nservicebus" href="http://www.infoq.com/interviews/dahan-cqrs-ddd-nservicebus">http://www.infoq.com/interviews/dahan-cqrs-ddd-nservicebus</a></li> <li>Command-Query Responsibility Segregation, interview with Udi Dahan: <a title="http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation" href="http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation">http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation</a></li> <li>Greg Young Discusses State Transitions in Domain-Driven Design and DDD Best Practices: <a title="http://www.infoq.com/interviews/greg-young-ddd" href="http://www.infoq.com/interviews/greg-young-ddd">http://www.infoq.com/interviews/greg-young-ddd</a></li> </ol> Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com0tag:blogger.com,1999:blog-4441160589671124737.post-29935057015361952762010-08-12T20:30:00.000-07:002010-08-12T20:59:28.456-07:00Review: Learning From Five Years as a Skype ArchitectThere is an excellent presentation Andres Kutt recorded at QCon London 2010 about lessons learned from working for fives years as an architect within Skype. Here's the link and full description:<br />
<br />
<a href="http://www.infoq.com/presentations/Learning-from-Five-Years-Skype%20">http://www.infoq.com/presentations/Learning-from-Five-Years-Skype </a><br />
<blockquote>"Andres Kutt discusses his experience as architect at Skype for five years, sharing some of the lessons learned: rules of thumb do not always apply, functionality is important, use simple solutions, buzzwords are dangerous, the architecture needs to fit into the organization, and communication is important. <br />
<br />
<b>Bio</b> <br />
Andres Kutt has been with Skype since 2005, leading a growing team of architects. Before that, he worked as IT Deputy Director General for the Estonian Tax and Customs Board, and as a free consultant for financial institutions."</blockquote><span style="font-size: large;">Review</span> <br />
I love his comment at 36 minutes that "80% of what an architect does is communicate". This is so true and important to realize, but not all architects excel at communication. This can cause significant problems on projects. As a steward of the conceptual and functional integrity of a system, the architect must strive to understand and distill the core standards, interfaces, components, connectors, and unifying concepts of the system to the rest of the technical team. They also must be able to speak to business people and other stakeholders using non-jargon language that speaks to the underlying concerns of budgets, ROI, risk management, etc.<br />
<br />
<span style="font-size: large;">Key Points</span><br />
<ul><li><b> Rules of Thumb Do Not Apply</b></li>
<ul><li>His example is that he joined Skype with the belief that "You do not put business logic in the database", but he learned about the Postgre database Skype uses and the distributed cluster and how the team there actually modified the Postgre source code to suit their needs. As a result, he no longer worries about business logic in the database.</li>
</ul>
<li><b>Functional Architecture is Important</b></li>
<ul><li> He says that at least every nine months he gets the whole team together to sit down and all diagram the architecture together and find the problems and fix those problems by analysis and refactoring.</li>
<ul><li>Usually the architecture remains the same, but they fix problems and remove single points of failure.</li>
</ul>
<li>Unfortunately, he says, many times architects get caught up in the finer grained details of technical implementation architecture.</li>
<li>In his experience, ugly functional architecture always leads to ugly technical architecture.</li>
</ul>
<li><b>Simple things work. </b></li>
<ul><li>"When something takes more than three sentences to explain, it usually doesn't work"</li>
<li>"Always remove all the functionality that is not necessary"</li>
<li>"Always chop things up"</li>
<li>He gives the example of SOAP being bloated and overly complicated. Instead of SOAP, Skype uses REST.</li>
</ul>
<li><b>Complicated things do not work well.</b></li>
<ul><li>He says if you're architecture is getting too complicated you are doing something wrong.</li>
</ul>
<li><b>Buzzwords are dangerous.</b></li>
<ul><li>His example is "Cloud Computing"</li>
<ul><li>Instead of resorting to "buzzwords" or being either awed or fearful of them, seek to understand the motivations behind buzzwords when people use them. What benefits are they interested and what about that buzzword makes them think it will deliver those benefits?</li>
</ul></ul>
<li><b>You are there to solve business problems, not the most beautiful, perfect system ever.</b></li>
<ul><li>He says to not take on technical debt that will cripple the business.</li>
</ul>
<li>Talk to people in order to understand and discover requirements</li>
<ul><li>Don't expect them to trust you or your team without you trusting them and the business goals they have.</li>
<li>Also do not expect teams to magically understand requirements if they are not also talking with product folks.</li>
<ul><li>UML diagrams do not help much</li>
</ul></ul></ul><span style="font-size: large;">Comments</span> <br />
The observations Andres makes are right on the money. I've been on so many projects, or went through periods of time on projects, where it seemed like too much management was going on. Managers, by their nature, desire to control and predict everything. They often feel that by limiting the time that one "role" of person, be they BA, QA, TA, DEV, PO, etc need to talk to each other the better the results "should be" and the faster functions "should" get delivered. These managers tend toward thinking of a "pipeline" mentality, such as:<br />
<ol><li>Product Owners and Business Analysts, with the assistance of Technical Architects define functional requirements</li>
<li>Developers and QA then create tasks and test cases to implement these.</li>
<li>And, while the Developers and QA are working, the PO, BA, and TA continue to work on "what's coming next".</li>
</ol><br />
While it is a natural and admirable goal that the firsts step above should produce requirements documents and wireframes that are perfectly defined and perfectly refined state of readiness for Developers and QA to implement, it seldom happens this well.<br />
<br />
Scott Ambler has a great chart about communications in software projects in this article: http://www.agilemodeling.com/essays/communication.htm.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxr35aioMapmWEmQQeDouiUVPukRbBb2gI_d1ykLR7dkZ8kl18KaPkCebYj4Hb6S4Wisb8tK83_5Q7CxsoKDsfXVQY2SuyDcHflTTalQkHHkfwHnB2lz5rSp3Mfq3b4wtKSHmjN5eXRqc/s1600/communicationModes.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="345" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxr35aioMapmWEmQQeDouiUVPukRbBb2gI_d1ykLR7dkZ8kl18KaPkCebYj4Hb6S4Wisb8tK83_5Q7CxsoKDsfXVQY2SuyDcHflTTalQkHHkfwHnB2lz5rSp3Mfq3b4wtKSHmjN5eXRqc/s400/communicationModes.gif" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
For me personally, I saw this recently in a project. We were facing several "unknowns" in our requirements that were effecting me and other developers. We quickly gathered several developers, QA folks, and business analysts together. We had started with a whiteboard, getting everyone to focus on shaping the common language and understanding of the problems at hand, but quickly moved to a notepad instance and simple bullet lists. Everyone quickly reached consensus within five minutes of discussion. We all walked away with a common understanding and greater confidence in the requirements.<br />
<br />
<br />
<ul><ul><ul></ul></ul></ul>Josh Goughhttp://www.blogger.com/profile/13302284610870926934noreply@blogger.com1