<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
 
 <title>kstewart</title>
 
 <link href="http://kstewart.name/" />
 <updated>2009-11-02T07:11:26-08:00</updated>
 <id>http://kstewart.name/</id>
 <author>
   <name>Kevin Stewart</name>
   <email>kevin.p.stewart@gmail.com</email>
 </author>
 
 
 <link rel="self" href="http://feeds.feedburner.com/working-code" type="application/atom+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><entry>
   <title>API Design is Interaction Design</title>
   <link href="http://feedproxy.google.com/~r/working-code/~3/nEyEgRef0A0/api-design-is-interaction-design.html" />
   <updated>2009-06-10T00:00:00-07:00</updated>
   <id>http://kstewart.name/2009/06/10/api-design-is-interaction-design</id>
   <content type="html">&lt;p&gt;For the past few weeks, I have been working with my team on refining the &lt;span class="caps"&gt;REST&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt; for our Web service. While there will be some new additions in order to meet requirements for applications that will build upon the &lt;span class="caps"&gt;API&lt;/span&gt;, many of the changes are refinements. Early adopters and our own experience has provided a treasure trove of information that has guided the development of the latest version.&lt;/p&gt;
&lt;p&gt;From the very beginning, I chose a &lt;span class="caps"&gt;REST&lt;/span&gt; Oriented Architecture (&lt;span class="caps"&gt;ROA&lt;/span&gt;) for the service. To me, this just seemed obvious. I&amp;#8217;ve followed the development of &lt;span class="caps"&gt;XML&lt;/span&gt;-&lt;span class="caps"&gt;RPC&lt;/span&gt; and &lt;span class="caps"&gt;SOAP&lt;/span&gt; for years. For awhile, &lt;span class="caps"&gt;XML&lt;/span&gt;-&lt;span class="caps"&gt;RPC&lt;/span&gt; seemed pretty cool and simple to me especially when compared to the mess that is &lt;span class="caps"&gt;SOAP&lt;/span&gt; (which evolved into &lt;strong&gt;&lt;em&gt;WS-Death Star&lt;/em&gt;&lt;/strong&gt;). However, in practice I always ended up sending some simple, Plain Ol&amp;#8217; &lt;span class="caps"&gt;XML&lt;/span&gt; over &lt;span class="caps"&gt;HTTP&lt;/span&gt;. For the majority of cases, &lt;span class="caps"&gt;HTTP&lt;/span&gt; and URIs covered the functionality I needed sufficiently.&lt;/p&gt;
&lt;p&gt;As &lt;span class="caps"&gt;REST&lt;/span&gt; became a more prevalent meme, I got a copy of &lt;a href="http://www.amazon.com/RESTful-Web-Services-Leonard-Richardson/dp/0596529260/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1244646726&amp;amp;sr=8-1"&gt;RESTful Web Services&lt;/a&gt; and read it cover-to-cover. I recommend this book to &lt;strong&gt;&lt;span class="caps"&gt;ANYONE&lt;/span&gt;&lt;/strong&gt; building Web applications. It put what was common practice for me into context and really illustrated what &lt;span class="caps"&gt;REST&lt;/span&gt; and &lt;span class="caps"&gt;ROA&lt;/span&gt; are really about and what tradeoffs need to be made in every application.&lt;/p&gt;
&lt;p&gt;One part of the book that really stood out for me were the sections on &lt;strong&gt;resource design&lt;/strong&gt;. Instead of the highly procedural &lt;span class="caps"&gt;XML&lt;/span&gt;-&lt;span class="caps"&gt;RPC&lt;/span&gt; or my own custom-coded &lt;span class="caps"&gt;XML&lt;/span&gt; schemas in my &lt;span class="caps"&gt;POX&lt;/span&gt;/&lt;span class="caps"&gt;HHTP&lt;/span&gt; implementations, &lt;span class="caps"&gt;REST&lt;/span&gt; made me think more about the actual objects, or resources, that I wanted to interact with over the network. Doing this forced me to think harder about naming and behaviors (whether or not they mapped cleanly to &lt;span class="caps"&gt;GET&lt;/span&gt;, &lt;span class="caps"&gt;PUT&lt;/span&gt;, &lt;span class="caps"&gt;HEAD&lt;/span&gt;, &lt;span class="caps"&gt;DELETE&lt;/span&gt; and, of course, &lt;span class="caps"&gt;POST&lt;/span&gt;). For error conditions, there was almost always an &lt;span class="caps"&gt;HTTP&lt;/span&gt; status code that would work for us. And, &lt;span class="caps"&gt;HTTP&lt;/span&gt; headers were incredibly useful in dealing with metadata.&lt;/p&gt;
&lt;p&gt;So, on my first pass with our &lt;span class="caps"&gt;API&lt;/span&gt; I attempted to adhere to RESTful principles. After identifying my resources, I spent even more time thinking about &lt;strong&gt;representations&lt;/strong&gt;, the content types and schemas for the data my service would consume and produce. Many of my early assumptions changed quickly as I worked through this process (and again as we started working on the latest version) For instance, I once considered &lt;span class="caps"&gt;XML&lt;/span&gt; a safe, de facto format to support in an &lt;span class="caps"&gt;API&lt;/span&gt;. Then, along came &lt;span class="caps"&gt;JSON&lt;/span&gt;. When, I looked at some of my earlier representations I saw almost an order or magnitude difference in the size of an &lt;span class="caps"&gt;XML&lt;/span&gt; response compared to its &lt;span class="caps"&gt;JSON&lt;/span&gt; counterpart &lt;em&gt;for exactly the same data!&lt;/em&gt; Now, in many cases, &lt;span class="caps"&gt;XML&lt;/span&gt; is a requirement. However, if you have the ability to define exactly which representations you will support, think long and hard about when to use &lt;span class="caps"&gt;XML&lt;/span&gt;. Given the proliferation of libraries in almost every conceivable language, &lt;span class="caps"&gt;JSON&lt;/span&gt; is almost as de facto a choice as &lt;span class="caps"&gt;XML&lt;/span&gt; and has even more practical benefits although there are also downsides, like potential security vulnerabilities. As in everything else, one should pick the tools that help solve the problem at hand.&lt;/p&gt;
&lt;p&gt;The first versions of our &lt;span class="caps"&gt;API&lt;/span&gt; worked fine. The true test was seeing the number of people who just went to our documentation page and started coding against it. Generally, we received fewer than half a dozen questions via email before they were able to productively use the service. That&amp;#8217;s a huge win! We also ate our own dog food by prototyping clients for the service using:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;curl&lt;/li&gt;
	&lt;li&gt;Ruby (using &lt;a href="http://merbivore.com"&gt;Merb&lt;/a&gt; as our framework)&lt;/li&gt;
	&lt;li&gt;Flash (ActionScript 3 and the Flex framework)&lt;/li&gt;
	&lt;li&gt;Adobe &lt;span class="caps"&gt;AIR&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;All the clients worked well, with the minor exception of Flash. Unfortunately, Flash has some limitations with respect to things like:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class="caps"&gt;HTTP&lt;/span&gt; response codes other than 200&lt;/li&gt;
	&lt;li&gt;&lt;span class="caps"&gt;PUT&lt;/span&gt; and &lt;span class="caps"&gt;DELETE&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;Custom &lt;span class="caps"&gt;HTTP&lt;/span&gt; headers&lt;/li&gt;
	&lt;li&gt;Using the User-Agent to identify the Flash Player&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Surprisingly, Adobe &lt;span class="caps"&gt;AIR&lt;/span&gt; works just fine with our &lt;span class="caps"&gt;REST&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt;. Here, we had a nicely defined &lt;span class="caps"&gt;API&lt;/span&gt; but needed to make it work with Flash. The thought of either creating a separate &lt;span class="caps"&gt;API&lt;/span&gt; or moving to a least common delimiter approach for everyone was not appealing. However, there was actually a simple solution. If we added a prefix to all our &lt;span class="caps"&gt;API&lt;/span&gt; endpoints, we would know that the client was the Flash Player. In our Web service code, we wrote a proxy that would extract input from the request and then call the &lt;span class="caps"&gt;REST&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt; directly. When the &lt;span class="caps"&gt;API&lt;/span&gt; code generated a response, the proxy would repackage it appropriately for the player:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Always generate a 200 response&lt;/li&gt;
	&lt;li&gt;In the response body, use an &lt;span class="caps"&gt;XML&lt;/span&gt; document to house:
	&lt;ul&gt;
		&lt;li&gt;The actual &lt;span class="caps"&gt;HTTP&lt;/span&gt; response code&lt;/li&gt;
		&lt;li&gt;Standard and custom headers&lt;/li&gt;
		&lt;li&gt;Response body from the &lt;span class="caps"&gt;REST&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The beauty of this approach is that it is fairly generic. As we add new endpoints, the proxy does not need to be changed. The Web frameworks router just tries to match everything after the prefix against our existing RESTful routes. If we have a match, then the proxy calls that &lt;span class="caps"&gt;API&lt;/span&gt;. Otherwise, we return an error. Simple. So, how is this interaction design? Well, developers are users, right? For the most part, we try every new &lt;span class="caps"&gt;API&lt;/span&gt; by using &lt;strong&gt;curl&lt;/strong&gt; or these days, &lt;a href="http://rest-client.heroku.com/rdoc/"&gt;rest-client&lt;/a&gt;. If the &lt;span class="caps"&gt;API&lt;/span&gt; seems too cumbersome using either of these tools, then we&amp;#8217;ve probably done something really wrong. And, we did. There were a few APIs that were a little unwieldy or confusing due to the naming, so we focused on them a lot for the latest version. Deprecation can be a good thing.&lt;/p&gt;
&lt;p&gt;As developers, we use tons of APIs from various sources. Some are good, some not so good. &lt;a href="http://al3x.net"&gt;Alex Payne&lt;/a&gt;, the &lt;span class="caps"&gt;API&lt;/span&gt; Lead at &lt;a href="http://twitter.com"&gt;Twitter&lt;/a&gt; gave a great presentation the &lt;a href="http://www.slideshare.net/al3x/the-interaction-design-of-apis"&gt;interaction design of APIs&lt;/a&gt;. I almost didn&amp;#8217;t write this blog post because Alex&amp;#8217;s presentation was so spot on. But, I think it is a topic that may not get the attention it deserves so I&amp;#8217;ll throw my hat in the ring. In our &lt;span class="caps"&gt;API&lt;/span&gt;, we leverage an internal user authentication service as opposed to rolling our own. This service had an &amp;#8220;&lt;span class="caps"&gt;XML&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt;&amp;#8221; that was essentially a Plain Ol&amp;#8217; &lt;span class="caps"&gt;XML&lt;/span&gt; over &lt;span class="caps"&gt;HTTP&lt;/span&gt; endpoint that called into their Java code. Not really RESTful, but generally workable. The problem was that their &lt;span class="caps"&gt;XML&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt; did not have feature parity with their Java and ActionScript APIs. We were told that this would be addressed with the next version of the &lt;span class="caps"&gt;API&lt;/span&gt; and there would be a new &amp;#8220;&lt;span class="caps"&gt;REST&lt;/span&gt; &lt;span class="caps"&gt;API&lt;/span&gt;&amp;#8221;. Great!&lt;/p&gt;
&lt;p&gt;Well, maybe not so great. The user authentication service was growing to meet the needs of multiple clients and, like us, did not want to rewrite their code to address their non-primary clients. Their approach was to use a proxy approach as well that generated interfaces from their Java class and method definitions. See where this is going yet?&lt;/p&gt;
&lt;p&gt;The &lt;span class="caps"&gt;XML&lt;/span&gt; generated from the class and method definitions was approximately &lt;strong&gt;an order of magnitude&lt;/strong&gt; larger than the previous &lt;span class="caps"&gt;XML&lt;/span&gt;. Sure, we got feature parity but good luck trying to figure out how to &lt;span class="caps"&gt;USE&lt;/span&gt; the &lt;span class="caps"&gt;API&lt;/span&gt;. I had to have at least 5 browser tabs open and look through JavaDocs to figure out how to create an account! I know, I know&amp;#8230; once we get it done it&amp;#8217;s done&amp;#8230;or is it? What happens when they change method names or parameter lists? Alex defines &amp;#8220;The &lt;strong&gt;Humane&lt;/strong&gt; &lt;span class="caps"&gt;API&lt;/span&gt;&amp;#8221; as:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Explorable&lt;/li&gt;
	&lt;li&gt;Predictable&lt;/li&gt;
	&lt;li&gt;Consistent&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This user authentication &lt;span class="caps"&gt;API&lt;/span&gt; is not humane currently. I suspect that this is rooted in its implementation. It is a Java-based Web service and there are tons of tools and APIs that can turn Java objects into Web services. Unfortunately, the services generated are best consumed by &lt;em&gt;other Java applications and services&lt;/em&gt;. My team uses &lt;a href="http://danube.com/scrumworks/pro"&gt;ScrumWorks Pro&lt;/a&gt; for our agile planning and task tracking. It too has one of these Java-generated Web service APIs which I just find inscrutable. I&amp;#8217;ve seen similar things in the .&lt;span class="caps"&gt;NET&lt;/span&gt; world as well. On the Web, Web service clients can be as simple as curl or as complex as a desktop Windows or Mac application like iTunes. Every programming language/tool has its own idioms, but they all have one thing in common: they likely have one or more libraries for communicating via &lt;span class="caps"&gt;HTTP&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;And that is the interaction design advice I&amp;#8217;d like to impart. Recently, there have been a proliferation of projects that help you build applications and services with nothing more than &lt;span class="caps"&gt;HTTP&lt;/span&gt;, Javascript/&lt;span class="caps"&gt;JSON&lt;/span&gt; and general RESTful principles. &lt;a href="http://getcloudkit.com"&gt;CloudKit&lt;/a&gt; bills itself as an &lt;strong&gt;&lt;em&gt;Open Web &lt;span class="caps"&gt;JSON&lt;/span&gt; Appliance&lt;/em&gt;&lt;/strong&gt;. Once you&amp;#8217;ve downloaded and installed the Ruby gem, you can expose a resource and immediately interact with it using curl. Awesome! And then there is CouchDB, which is getting a ton of attention and for good reason. Jacob Kaplan-Moss, one of the creators of Django, said this of CouchDB in a blog post called &lt;a href="http://jacobian.org/writing/of-the-web/"&gt;Of the Web&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Let me tell you something: Django may be built for the Web, but CouchDB is built of the Web. I&amp;#8217;ve never seen software that so completely embraces the philosophies behind &lt;span class="caps"&gt;HTTP&lt;/span&gt;. CouchDB makes Django look old-school in the same way that Django makes &lt;span class="caps"&gt;ASP&lt;/span&gt; look outdated. Let me try to explain what I&amp;#8217;m talking about. You want an &lt;span class="caps"&gt;API&lt;/span&gt; without having to write a line of code? It&amp;#8217;s called curl, and it ships with your MacBook. And just look at how simple the APIs are in your favorite language.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you are building a Web application or service, strive to make it &lt;strong&gt;Of the Web&lt;/strong&gt;.&lt;/p&gt;</content>
 <feedburner:origLink>http://kstewart.name/2009/06/10/api-design-is-interaction-design.html</feedburner:origLink></entry>
 
 <entry>
   <title>Web Development vs. Software Development</title>
   <link href="http://feedproxy.google.com/~r/working-code/~3/JDFtdjZDDtU/webdev-vs-swdev.html" />
   <updated>2009-04-13T00:00:00-07:00</updated>
   <id>http://kstewart.name/2009/04/13/webdev-vs-swdev</id>
   <content type="html">&lt;p&gt;From Eric S. Raymond, &lt;em&gt;The Art of Unix Programming, Chapter 11: The Web Browser as a Universal Front End&lt;/em&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;For a large class of applications, it makes increasing sense not to write a custom &lt;span class="caps"&gt;GUI&lt;/span&gt; front end at all, but rather to press Web browsers into service in that role. This approach has many advantages. The most obvious is that you don&amp;#8217;t have to write procedural &lt;span class="caps"&gt;GUI&lt;/span&gt; code &amp;#8211; instead, you can describe the &lt;span class="caps"&gt;GUI&lt;/span&gt; you want in languages (&lt;span class="caps"&gt;HTML&lt;/span&gt; and JavaScript) that are specialized for it. This avoids a lot of expensive and complex single-purpose coding and often more than halves the total project effort. Another is that it makes your application instantly Internet-ready; the front end may be on the same host as the back end, or may be a thousand miles away. Yet another is that all the minor presentation details of the application (such as fonts and color) are no longer your back end&amp;#8217;s problem, and indeed can be customized by users to their own tastes through mechanisms like browser preferences and cascading style sheets. Finally, the uniform elements of the Web interface substantially ease the user&amp;#8217;s learning task.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For most of my career, there has been endless, tedious debate over the nature of software development. Is it math, science, engineering or craft? Well, having gone to an &lt;a href="http://poly.edu"&gt;engineering school&lt;/a&gt; to study computer science and in the process take a &lt;span class="caps"&gt;TON&lt;/span&gt; of math, science and engineering courses I can tell you that the majority of what people call software development is a &lt;a href="http://en.wikipedia.org/wiki/Craft"&gt;craft&lt;/a&gt; and we should stop obsessing over that fact.&lt;/p&gt;
&lt;p&gt;I have been a self-professed &lt;strong&gt;computer science bigot&lt;/strong&gt; for a long time. I tended to make a distinction between people who had degrees in computer science (or at least studied the foundation stuff) and self taught developers. You know, a caste system. The high priesthood vs. the unwashed masses. And, in the dotcom days, that bias was reinforced when I saw the &amp;#8220;designs&amp;#8221; created by the Perl and &lt;span class="caps"&gt;PHP&lt;/span&gt; hackers. I have never, and probably will never, write a line of Perl in my life. Of course, some think that Ruby is the new Perl so I may have just lied! :-)&lt;/p&gt;
&lt;p&gt;However, after a few years writing Active Server Pages applications with VBScript and then moving back to a more comfortable language in Java with servlets, JavaServer Pages and &lt;span class="caps"&gt;JDBC&lt;/span&gt; my perspective slowly changed. Sure, I wrote model-view-controller (&lt;span class="caps"&gt;MVC&lt;/span&gt;) code in classic &lt;span class="caps"&gt;ASP&lt;/span&gt; just as I did in Java. But, I learned many things by working closely with Web designers. I gained greater appreciation for aesthetics, user experience and &lt;a href="http://www.cooper.com/insights/books/#inmates"&gt;interaction design&lt;/a&gt; as I built more Web applications. While my stomach churned over some of the hackish code I saw, I realized their true beauty&amp;#8230; they worked and provided value for their users.&lt;/p&gt;
&lt;p&gt;Most computer science programs unwittingly reinforce this foolish caste system mentality from the 60s and 70s because faculty see themselves as divorced from the trivialities of &lt;em&gt;pragmatism, usefulness and real-world scenarios&lt;/em&gt; because they are teaching theory and not practice. Some institutes of higher learning have at least acknowledged the need for a separate track in &lt;strong&gt;software engineering&lt;/strong&gt; that focuses more on what practicing developers need to know: version control, debugging, cross-functional collaboration, etc. However, the very term &lt;em&gt;software engineering&lt;/em&gt; still conveys the wrong sentiment that what we do is equivalent to electrical, aerospace or chemical engineering. It, emphatically, is not.&lt;/p&gt;
&lt;p&gt;Going off on a tangent for a moment, I used to feel the same way about &lt;strong&gt;game developers&lt;/strong&gt;. I used to read Game Developer magazine, especially their Postmortem column, for years and marveled at how little these people seemed to know about basic development principles like object-oriented design. Yet, like Web developers they made products that people paid good money for and enjoyed using. Who cares then if few of them knew how to write a class that properly demonstrated &lt;a href="http://en.wikipedia.org/wiki/Object-oriented_programming"&gt;encapsulation, inheritance and polymorphism&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;Perhaps, the differences could better be described as &lt;em&gt;web &lt;strong&gt;design&lt;/strong&gt; vs. web &lt;strong&gt;development&lt;/strong&gt;&lt;/em&gt;? Unfortunately, this too is a false dichotomy. Web design without development often leads to brochureware. Or, some Web designers fool themselves into thinking that what they are doing is not creating code. I&amp;#8217;ve seen some self-professed designers churn out some awesome Javascript and &lt;span class="caps"&gt;PHP&lt;/span&gt; or Python yet they don&amp;#8217;t believe that they are developing software (even as they check their code into their Subversion repository&amp;#8230;)&lt;/p&gt;
&lt;p&gt;I may be in the minority here, but I actually believe that Apple did the &lt;span class="caps"&gt;WRONG&lt;/span&gt; thing with the iPhone &lt;span class="caps"&gt;SDK&lt;/span&gt;. I think they should have stuck to their guns and &lt;span class="caps"&gt;NOT&lt;/span&gt; come out with a way to build native applications for the iPhone. (Brief pause as multiple people pick their jaws up from the floor.) That&amp;#8217;s right, I said it. I would have been much more impressed if they stuck to the idea that Web applications &lt;span class="caps"&gt;ARE&lt;/span&gt; applications and can be used across multiple device contexts. Apple could have exposed more of the iPhone&amp;#8217;s features as Javascript objects that developers could utilize in their &amp;#8220;Web&amp;#8221; applications. By caving to the pressure to provide a &amp;#8220;real&amp;#8221; &lt;span class="caps"&gt;SDK&lt;/span&gt; Apple has continued to perpetuate the caste system. Granted, the iPhone is such a compelling device that many &amp;#8220;Web developers&amp;#8221; grumbled but grudgingly started to learn Objective C and Cocoa in order to build applications for it&amp;#8230;&lt;/p&gt;
&lt;p&gt;Wait. &lt;strong&gt;Web developers&lt;/strong&gt; learned a language like Objective C that you compile down to a binary in order to deploy on a device? Isn&amp;#8217;t that the domain of &lt;em&gt;software developers&lt;/em&gt;?!? The false dichotomy breaks down! There is no &lt;em&gt;us vs. them&lt;/em&gt; or &lt;em&gt;hacking vs. engineering&lt;/em&gt;. There are only the people who like to tirelessly debate false dichotomies:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;vim vs. Emacs&lt;/li&gt;
	&lt;li&gt;Tabs vs. spaces&lt;/li&gt;
	&lt;li&gt;Python vs. Ruby&lt;/li&gt;
	&lt;li&gt;Microsoft vs. everyone else&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;and those of us who care about our craft enough to focus on building beautiful things that people love to use.&lt;/p&gt;</content>
 <feedburner:origLink>http://kstewart.name/2009/04/13/webdev-vs-swdev.html</feedburner:origLink></entry>
 
 <entry>
   <title>Seven Things</title>
   <link href="http://feedproxy.google.com/~r/working-code/~3/11IO_m5GBIk/seven-things.html" />
   <updated>2009-01-25T00:00:00-08:00</updated>
   <id>http://kstewart.name/2009/01/25/seven-things</id>
   <content type="html">
&lt;p&gt;Damn you, &lt;a href="http://flinglog.com"&gt;Brian!&lt;/a&gt; for tagging me with this meme. But, since it is currently snowing (again?!?!) here in the Seattle area, I figured I needed a diversion. So here goes&amp;#8230;&lt;/p&gt;
&lt;h2&gt;One&lt;/h2&gt;
&lt;p&gt;I was born left-handed. My parents are from the West Indies and apparently, being left-handed was considered &lt;span class="caps"&gt;BAD&lt;/span&gt;. So, at a very young age whenever my Mom saw me doing something with my left hand, she would say &amp;#8220;Use your right hand!&amp;#8221;. My wife told me she thought I was left-handed when she met me because I tended to do things with that hand. Ironically, both my son and our new President are left-handed. I&amp;#8217;ve also learned that lefties tend to be more creative and possibly smarter. See what you&amp;#8217;ve done to me, Mom?&lt;/p&gt;
&lt;h2&gt;Two&lt;/h2&gt;
&lt;p&gt;I met my wife on a blind date. I was at a party where I met up with some mutual friends. After hours of drinking and talking, one of the girls remarked, &amp;#8220;I can&amp;#8217;t believe you don&amp;#8217;t have a girlfriend. You have to meet our friend, Donna.&amp;#8221; Oh great. Since she wasn&amp;#8217;t there and all the girls that were were&amp;#8230;hot, then this must be the ugly one. :-) A few weeks pass by and a friend of mine calls me up one night, saying &amp;#8220;Hey, remember that girl that those girls wanted you to meet?&amp;#8221; Me: &amp;#8220;Yeah&amp;#8230;?&amp;#8221; Friend: &amp;#8220;Here she is.&amp;#8221; (click)&lt;/p&gt;
&lt;p&gt;One tentative conversation led to a first date. It could have been disastrous since I was late driving out to the boondocks of Long Island after spending the day helping a friend move. She was annoyed and I was tired. However, a good Italian meal and a bad movie made things better. A couple of more dates led to a vacation in Jamaica and the rest, as they say, is history.&lt;/p&gt;
&lt;h2&gt;Three&lt;/h2&gt;
&lt;p&gt;I used to be very good at math. I was an honors student all through grade school and most of high school. My math skills declined (and my social skills improved) by the time I hit college and took my first calculus course. I suspect the cause of the change may have been either:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;My mostly Japanese-speaking professor&lt;/li&gt;
	&lt;li&gt;My complete disinterest in anything other than my Computer Science courses&lt;/li&gt;
	&lt;li&gt;Girls&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now, my math skills seem to be stuck at intermediate algebra.&lt;/p&gt;
&lt;h2&gt;Four&lt;/h2&gt;
&lt;p&gt;I love comic books and comic book movies. While I no longer collect them, I do have a pretty big collection in my garage. Batman and Iron Man are my all-time favorites. Superman is a punk (he turned down Wonder Woman&amp;#8217;s advances in one issue!! What?!?!) So, when the live action Iron Man movie came out in 2008 as well as Dark Knight, I could have died happy and complete.&lt;/p&gt;
&lt;h2&gt;Five&lt;/h2&gt;
&lt;p&gt;I am technology agnostic. I&amp;#8217;ve tried lots of different computing platforms. The first computer I ever used was an Apple II and the first one I owned was an Apple IIc. I&amp;#8217;ve had and developed for PCs running &lt;span class="caps"&gt;DOS&lt;/span&gt;, Windows (3.1 &amp;#8211; XP, including NT and 2000). I have worked on numerous workstations running SunOS, &lt;span class="caps"&gt;AIX&lt;/span&gt;, HP/UX and Irix. I tried owning a Linux workstation running Red Hat, but it frustrated me no end as a desktop. I might try again soon, as Ubuntu looks promising. Now, I am primarily a Mac user as it hits all the right notes for me.&lt;/p&gt;
&lt;p&gt;Note to all Microsoft-bashers: Stop it! It&amp;#8217;s not necessary. And the people that work there are not all bad; in fact, they&amp;#8217;re mostly good people trying to do the right thing in a large corporation. If you don&amp;#8217;t like Microsoft&amp;#8217;s products or behavior, just vote with your dollars! That&amp;#8217;s what really sends the message.&lt;/p&gt;
&lt;h2&gt;Six&lt;/h2&gt;
&lt;p&gt;My perfect vacation involves a week on an island (generally in the Caribbean) at some sort of all-inclusive resort. My days should consist of deciding whether to swim in the pool or the ocean first, enjoying great meals and getting to catch up on a ton of reading. One day can be allocated to some sort of touristy activity. But, just &lt;span class="caps"&gt;ONE&lt;/span&gt; day.&lt;/p&gt;
&lt;h2&gt;Seven&lt;/h2&gt;
&lt;p&gt;It is better to work for me than with me. At least, that&amp;#8217;s what my co-workers say. I fiercely protect my team so that they can focus on doing great things. And, I have trouble managing up but I am trying to get better at that. However, at the end of the day I am an engineer and logic rules my world. My measure of success is building (or helping people build) great products.&lt;/p&gt;
&lt;h2&gt;Tag! You&amp;#8217;re it!&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.happymasochist.com/"&gt;D. Keith Robinson&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://nickfinck.com/"&gt;Nick Finck&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://jeffcroft.com"&gt;Jeff Croft&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://navelgaze.org/"&gt;Jim Hong&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.kevingoldsmith.com/"&gt;Kevin Goldsmith&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://seantconrad.com"&gt;Sean Conrad&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://garrettmurray.net"&gt;Garrett Murray&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content>
 <feedburner:origLink>http://kstewart.name/2009/01/25/seven-things.html</feedburner:origLink></entry>
 
 <entry>
   <title>Is Agile or Lean Enough?</title>
   <link href="http://feedproxy.google.com/~r/working-code/~3/_f3Lbtfq6_o/is-agile-or-lean-enough.html" />
   <updated>2009-01-03T00:00:00-08:00</updated>
   <id>http://kstewart.name/2009/01/03/is-agile-or-lean-enough</id>
   <content type="html">&lt;p&gt;At the end of the year, I tend to reflect on the progress my team has made and what directions we should take in the new year. Actually, I think about this all the time. However, since the company shuts down I have extra time to be introspective. This year given the snowstorms in Seattle, I&amp;#8217;ve had even more time.&lt;/p&gt;
&lt;p&gt;Generally, I have been a proponent of agile techniques. They&amp;#8217;re basically codifications of common sense best practices. For the past few years, I&amp;#8217;ve been particularly attracted to Scrum for managing my development projects. While the basics are pretty easy, Scrum (like most agile methodologies) actually requires a lot of discipline. So, my team and I spent a lot of time increasing our discipline and paying attention to the issues that Scrum surfaced in our development process.&lt;/p&gt;
&lt;p&gt;While that approach definitely delivered some benefits, I constantly felt like there were huge gaps in what agile in general and Scrum in particular were bringing to the table. A recent blog post by James Shore, &lt;a href="http://jamesshore.com/Blog/The-Decline-and-Fall-of-Agile.html"&gt;The Decline and Fall of Agile&lt;/a&gt;, captured some of my concerns:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It says that the team should be cross-functional and recommends co-locating the team in a shared workspace. It says the team should deliver a valuable, shippable product at the end of every Sprint, and that the team should self-organize, discover impediments, and remove them.&lt;br /&gt;
Oh, and it also has a few mechanical things about a monthly Sprint and daily Scrum. Trivial stuff compared to the rest. But guess which part people adopt? That&amp;#8217;s right&amp;#8212;Sprints and Scrums. Rapid cycles, but none of the good stuff that makes rapid cycles sustainable.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Taking part in many agile discussions at work as well as practicing it on my project, I recognized this as one of the bigger problems. As much as my team and I may want to work in an agile fashion, there were other factors conspiring against us. Co-location was the biggest one and getting a fully cross-functional team in place is not always possible. Shore also states:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It&amp;#8217;s human nature to only do the stuff that&amp;#8217;s familiar and fun, and that&amp;#8217;s what has happened with Agile. People look at agile methods as a chinese menu of practices, choose the few that look cool, and ditch the rest. Unfortunately, the parts they leave out are the parts that make Agile work. Scrum makes it worse by ignoring important (but hard) agile engineering practices, and the Scrum Alliance makes it worse still with their armies of trainers some good, some not issuing dubious &amp;#8220;ScrumMaster&amp;#8221; certificates to people who demonstrated competence in connecting butt to chair for two days.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&amp;#8217;ll be honest, our company offered Scrum training with Ken Schwaber and I took it (Hey, it was &lt;span class="caps"&gt;FREE&lt;/span&gt;!) And yes, I am now a Certified Scrum Master. And what enlightenment did I receive from this training. Not a whole heckuva lot. In fact, at the conclusion of this training I painfully recalled an enjoyable post from Steve Yegge, &lt;a href="http://steve-yegge.blogspot.com/2006/09/good-agile-bad-agile_27.html"&gt;Good Agile, Bad Agile&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Up until maybe a year ago, I had a pretty one-dimensional view of so-called &amp;#8220;Agile&amp;#8221; programming, namely that it&amp;#8217;s an idiotic fad-diet of a marketing scam making the rounds as yet another technological virus implanting itself in naive programmers who&amp;#8217;ve never read &amp;#8220;No Silver Bullet&amp;#8221;, the kinds of programmers who buy extended warranties and self-help books and believe their bosses genuinely care about them as people, the kinds of programmers who attend conferences to make friends and who don&amp;#8217;t know how to avoid eye contact with leaflet-waving fanatics in airports and who believe writing shit on index cards will suddenly make software development easier.&lt;br /&gt;
You know. Chumps. That&amp;#8217;s the word I&amp;#8217;m looking for. My bad-cholesterol view was that Agile Methodologies are for chumps.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;And if you have taken this particular Scrum course and recall the &amp;#8220;secret handshake&amp;#8221; at the end, the &lt;strong&gt;chump&lt;/strong&gt; title probably seems like a better name for the certification you received. Sure, there were a few useful bits in terms of clarifying a few ambiguous parts of the standard Scrum literature. However, the course offered no practical help with day-to-day development issues. Specifically, the disconnect from one or more development practices that pair up well with Scrum as Shore notes.&lt;/p&gt;
&lt;p&gt;So, reflecting on the past year I see two fundamental issues with our adoption of agile practices. The first is the lack of top-down adoption of agile in our company. While there are many teams adopting agile (specifically Scrum), there is still the cross-functional gap. That leads to a lot of wasted time spent context switching between Scrum and the &amp;#8220;traditional&amp;#8221; development process. I&amp;#8217;ve witnessed a lot of teams say that they&amp;#8217;re &lt;em&gt;doing Scrum&lt;/em&gt; but they&amp;#8217;re just re-labeling portions of the legacy process with terms they learned from Scrum. More &lt;strong&gt;fragile&lt;/strong&gt; than agile. It seems as if there is not an organizational drive towards continuous improvement that is driven from the top, then it is easy to regress to past behavioral patterns. In &lt;a href="http://www.amazon.com/Scaling-Lean-Agile-Development-Organizational/dp/0321480961/ref=wl_it_dp?ie=UTF8&amp;amp;coliid=I2EDC0NTF1H01X&amp;amp;colid=1HKQWRT70OE52"&gt;Scaling Lean and Agile Development&lt;/a&gt;, Craig Larman summarizes this nicely:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;There are better ways to build large systems than with many developers in many places. Rather, build a small group of great developers and other talents that can work together in teams, pay them well, and keep them together in one place with product management or whoever acts as the voice of the customer.&lt;br /&gt;
But of course you are &lt;em&gt;still&lt;/em&gt; going to do large, multisite, or offshore development. This is because your existing system is already structured that way, or because in the case of large groups there is the mindset that &amp;#8220;big systems need lots of people.&amp;#8221;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;THAT&amp;#8217;S what our current situation feels like. And that&amp;#8217;s not something that can be addressed from the bottom up alone.&lt;/p&gt;
&lt;p&gt;And my second issue? Exactly what Shore mentioned:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Scrum makes it worse by ignoring important (but hard) agile engineering practices&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Scrum does not prescribe any development practice to use alongside it. That&amp;#8217;s OK, but one would think that by now the Scrum practitioners would have strong recommendations based on real-world experience. The common wisdom is Extreme Programming (XP), but I have several issues with XP. It seems to be even more of a take-it-all-or-leave-it-all religion than Scrum is. And XP doesn&amp;#8217;t work for all teams. And most agile processes over-focus on the development team, but gloss over the other cross-functional team members.&lt;/p&gt;
&lt;p&gt;Now that the Scrum backlash is in full swing, people are starting to embrace Lean. What they fail to realize is that Scrum is just the gateway drug to Lean. Scrum is not a pure pull system, which is what you would have once you Got Lean. After reading Corey Ladas&amp;#8217; &lt;a href="http://leansoftwareengineering.com/ksse/scrum-ban/"&gt;blog post&lt;/a&gt; and &lt;a href="http://www.lulu.com/content/3864767"&gt;book&lt;/a&gt; some of the ideas resonated with me. But, this was only because I had years before been a fan of the Theory of Constraints and Eliyahu Goldratt&amp;#8217;s books (sidebar: his books are great due to his ability to communicate dry, academic topics via engaging novels). And again, the pragmatic issues around cross-functional product development processes are still largely ignored.&lt;/p&gt;
&lt;p&gt;So, in 2009, how will I evolve my team&amp;#8217;s processes? We&amp;#8217;ll probably continue with Scrum or even &amp;#8220;evolve&amp;#8221; towards Lean. But our focus will be on sharpening our engineering practices. We&amp;#8217;ve been pretty good about constant communication and unit testing, but we can probably tighten up our feature designs and code reviews. It&amp;#8217;s all about balance.&lt;/p&gt;</content>
 <feedburner:origLink>http://kstewart.name/2009/01/03/is-agile-or-lean-enough.html</feedburner:origLink></entry>
 
 <entry>
   <title>Welcome!</title>
   <link href="http://feedproxy.google.com/~r/working-code/~3/d7ViEJOuvd0/first.html" />
   <updated>2008-12-29T00:00:00-08:00</updated>
   <id>http://kstewart.name/2008/12/29/first</id>
   <content type="html">&lt;p&gt;Welcome to [working code]&lt;/p&gt;</content>
 <feedburner:origLink>http://kstewart.name/2008/12/29/first.html</feedburner:origLink></entry>
 
 
</feed>
