<?xml version='1.0' encoding='UTF-8' ?>
<rss version="2.0" xml:base="http://www.cincomsmalltalk.com/userblogs/ralph/" xmlns:admin="http://webns.net/mvcb/" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:icbm="http://postneo.com/icbm" xmlns:includedComments="http://www.laudably.com/rss2-comments" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>Ralph Johnson - Blog</title>
		<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView</link>
		<description>Design Patterns</description>
		<webMaster>johnson@cs.uiuc.edu</webMaster>
		<lastBuildDate>Sat, 17 Dec 2011 21:27:01 GMT</lastBuildDate>
		<image>
			<url>/images/why-small.png</url>
			<title>Ralph Johnson - Blog</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView</link>
			<height>50</height>
			<width>81</width>
		</image>
		<admin:generatorAgent rdf:resource="/CincomSmalltalkWiki/Silt"></admin:generatorAgent>
		<admin:errorReportsTo rdf:resource="mailto:johnson@cs.uiuc.edu"></admin:errorReportsTo>
		<dc:language>en-us</dc:language>
		<dc:creator>Ralph Johnson</dc:creator>
		<dc:rights>Copyright 2009 Ralph Johnson</dc:rights>
		<dc:date>2011-12-17T21:27:01-05:00</dc:date>
		<icbm:latitude>40.033333</icbm:latitude>
		<icbm:longitude>-88.283333</icbm:longitude>
		<item>
			<title>Iowa, the midwest, and the "typical state"</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Iowa,_the_midwest,_and_the_typical_state&amp;entry=3501604165</link>
			<category>general</category>
			<pubDate>Sat, 17 Dec 2011 19:49:25 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>I just ran across an article by <a href="http://www.theatlantic.com/politics/archive/2011/12/observations-from-20-years-of-iowa-life/249401/">Steven G. Bloom about Iowa and how it is ridiculous for it to play such an influencial part in picking a president</a>.&nbsp; There have been a lot of articles by Iowans saying how inaccurate the article is.&nbsp; But they don't actually address the main point in his article, that Iowa is very different from the rest of the country and that it should not be so influencial in choosing a president.&nbsp; So, what states are typical?&nbsp; Does he think that California is it?&nbsp; New York?&nbsp; I lived in upstate New York for seven years, but have never lived in California.&nbsp; However, it seems to me that most people outside of New York or California do not think of either of them as typical.</p>

<p>I live in Illinois.&nbsp; Illinois has two parts, Chicago and "down state".&nbsp; Down state has some decent sized cities; Peoria, Springfield, Champaign-Urbana (where I am from), Bloomington-Normal.&nbsp;&nbsp; But down state is pretty similar to Iowa.&nbsp; The biggest difference between the states other than Illinios having Chicago is that Iowa has way better politicians.&nbsp; Like nearly every other state.&nbsp; (Sigh!)</p>

<p>Indiana is to our east.&nbsp;&nbsp; In spite of Indianapolis, it is a lot like Iowa, too.&nbsp; Ohio has a bunch of big cities, but in between them it is a lot like Iowa.&nbsp; Wisconsin, Minnesota, North and South Dakota, Oklahoma, Nebrasks, Missouri.&nbsp; Even western Pennsylvania.&nbsp; My daughter lived in Kentucky for awhile, and it isn't that different.&nbsp;&nbsp; The rural south is different in some ways from the rural midwest.&nbsp; Rural Mississippi is heavily black, for example.&nbsp; But they like to hunt and are more religious than average for Americans, two of the prominent features of Bloom's Iowa.&nbsp; Rural people in Texas and Colorado are more likely to own horses than hunting dogs, but the spirit of rural people is pretty similar around the country.</p>

<p>The red vs. blue divide in the US is mostly rural versus urban.&nbsp; It is pretty evenly divided, which is why there is so much political struggle.</p>

<p>I claim that Bloom's main point is wrong.&nbsp; Iowa is typical.&nbsp; The fact that Bloom can say that means he hasn't much of an idea of what the US is like.&nbsp; I'd still like to know what he thinks is typical.&nbsp; I think it would be illuminating.</p>
</div>]]></description>
			<guid isPermaLink="false">3501604165</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3501604165</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3501604165</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>A talk on the development of VistA</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=A_talk_on_the_development_of_VistA&amp;entry=3501560629</link>
			<category>software engineering</category>
			<pubDate>Sat, 17 Dec 2011 07:43:49 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>A story of open source before open source was cool.&nbsp;&nbsp;&nbsp; Agile development in the 70s.&nbsp; How VistA helped the <a href="http://www.youtube.com/watch?v=Dyci4cTTfwY&amp;feature=results_main&amp;playnext=1&amp;list=PL37C941C938361DFA" title="talk about VA at OSCON">VA provide the "best health care anywhere"</a>. That is a talk at OSCON, by the way.&nbsp;</p>

<p>&nbsp;</p>
</div>]]></description>
			<guid isPermaLink="false">3501560629</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3501560629</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3501560629</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>Pattern sequences for creational patterns</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Pattern_sequences_for_creational_patterns&amp;entry=3501154450</link>
			<category>patterns</category>
			<pubDate>Mon, 12 Dec 2011 14:54:10 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>One of Christopher Alexanders underappreciated ideas is that of a pattern sequence.&nbsp;&nbsp; A pattern sequence is a set of patterns that are often applied in a particular sequence, a "pattern of patterns", as it were.&nbsp;</p>

<p>James Coplien has been trying to promote the idea of pattern sequences for some time.&nbsp; He and Neil Harrison wrote a <a href="http://hillside.net/europlop/HillsideEurope/Papers/EuroPLoP2001/2001_HarrisonEtAl_PatternSequences.pdf" title="pattern sequences  by Harrison and Coplien">very short paper about them</a> and he wrote a <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.101.477" title="Sequences as a basis for pattern language composition">longer paper with Ronald Porter and Tiffany Winn</a>.&nbsp; Although I haven't written much about sequences, I agree that they are important.&nbsp; Kent Beck and I wrote a paper on the patterns behind HotDraw some years ago that was called <a href="http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.46.8603" title="Patterns generate architectures">Patterns Generate Architectures</a>.&nbsp; It shows a pattern sequence that produces a graphical drawing editor.&nbsp; We had hoped at the time that other people would describe their designs as sequences of patterns, and a few people did, but not as many people as I wish.</p>

<p>I have been thinking about pattern sequences recently as a way of organizing design patterns.&nbsp;&nbsp; In particular, I think the "creational patterns" from Design Patterns show several simple pattern sequences.&nbsp; The first step of these is always <a href="http://en.wikipedia.org/wiki/Factory_method_pattern" title="factory method pattern">Factory Method</a>, which can then be followed by either <a href="http://en.wikipedia.org/wiki/Abstract_factory_pattern" title="abstract factory pattern">Abstract Factory,</a> <a href="http://en.wikipedia.org/wiki/Builder_pattern" title="Builder pattern">Builder</a> or <a href="http://en.wikipedia.org/wiki/Prototype_pattern" title="Prototype pattern">Prototype</a>.&nbsp;&nbsp; Abstract Factory and Builder can be combined; either a design with Abstract Factory can be replaced with one with Builder, or (as the book says) a Builder can be implemented with an Abstract Factory.&nbsp; The book says a builder can be implemented with Prototype, which is plausible, but I don't remember ever seeing one in the wild.&nbsp; So, the standard sequences are Factory Method followed by Abtract Factory and then Builder,&nbsp; Factory Method followed by Builder, and Factory Method followed by Prototype.</p>

<p>Factory Method is such a trivial pattern that sometimes I wonder why we put it in the book.&nbsp; It is basically the same as Template Method, but seen from the point of view of the method that the template method calls.&nbsp; However, the fact that it is the start of these (very short) pattern sequences makes it much more interesting.&nbsp; So, I have decided that I am happy including it with the others.</p>

<p>The point of Factory Method is to avoid hard-coding class names when you are constructing objects.&nbsp;&nbsp; Instead of saying "upButton := Button new" you should say "upButton := self createButton" and hide the reference to the Button class in the createButton method.&nbsp;&nbsp; The advantage of Factory Method comes when you want to change the class of buttons.&nbsp; You can make a subclass of whatever is making the buttons and override the createButton method.&nbsp; On the other hand, if you never need to change the class of your buttons then it is pointless to use Factory Method.&nbsp; Moreover, if you have to change the class of your buttons too often then Factory Method is also a bad idea, because it leads you to make too many subclasses.&nbsp;&nbsp; So, I tend to start with a design in which class names for constructing objects are hard-coded.&nbsp; The first time I want to change them, I change the design to use Factory Method.&nbsp; If I see that I am building a lot of subclasses, I switch to one of the other patterns.</p>

<p>One of the other patterns that I often use in Smalltalk is to use a class as a factory and to pass it in to the object that is creating instances.&nbsp;&nbsp; I call this a "Factory Object" pattern, with the class as a factory.&nbsp;&nbsp;&nbsp; But if I want a single object to create a lot of different kinds of objects (as would happen if my application needed not only to change the class of Button but also of TextField and DropDownSelection and RadioButton and ...) then I'd use Abtract Factory, which I think of as another special case of Factory Object.&nbsp;&nbsp; It is easy to convert a design that uses Factory Method into a design that used Abstract Factory; just move all the individual "create" methods into an instance of a new factory class, and then pass the factory into the object that needs objects to be created.&nbsp;&nbsp; If you use Abstract Factory then the object doing the creating will work with a factory and an object to be created.&nbsp;&nbsp; But if you shift that design to Builder then the object doing the creating will work only with a builder; the builder will hide the object being created until the object is finished. Builder is another kind of "factory object". &nbsp; And Prototype is a fourth kind of factory object, one in which you can use any instance as a factory for more instances by asking it to clone itself.&nbsp;&nbsp;&nbsp; But in all cases, a factory object is a little more complex and powerful than factory method, and you should only suffer the extra complexity if you really need the power.</p>

<p>What other pattern sequences do you use a lot?&nbsp; Do you know of papers that describe systems as a sequence of patterns?</p>

<p>&nbsp;</p>

<p>&nbsp;</p>
</div>]]></description>
			<guid isPermaLink="false">3501154450</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3501154450</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3501154450</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>Conversation with Tom Munnecke</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Conversation_with_Tom_Munnecke&amp;entry=3497673651</link>
			<category>software engineering</category>
			<pubDate>Wed, 02 Nov 2011 08:00:51 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>Tom Munnecke posted <a href="http://munnecke.com/blog/?p=1270" title="video of conversation about refactoring and vista">a video of conversation we had about refactoring, design, and VistA</a>. &nbsp;I agreed with most of what he had to say, but at the time of the conversation I was uncomfortable about what he said about decomposition and how he used the story of the blind men and the elephant. &nbsp;If you don't know that story, see the <a href="http://www.noogenesis.com/pineapple/blind_men_elephant.html">poem that introduced it to the west</a>, or <a href="http://en.wikipedia.org/wiki/Blind_men_and_an_elephant">the Wikipedia article</a>. I use the story when I teach OO programming. &nbsp; I give three different views of OO programming, and say that they are all true, but each view is limited. &nbsp;OO is a culture, and no description of a culture can be complete.</p>

<p>Science (and western thought in general) is based on reductionism, on making models, on abstracting. &nbsp;It is a very powerful tool. &nbsp;But patterns are very much about balancing forces, about appreciating the disadvantages of a technique as well as the advantages. &nbsp;The story of the blind men and the elephant is useful because it warns us of the dangers of reductionism. &nbsp;The story seems to have been told originally to warn against religious claims to exclusive truth. &nbsp;But Tom used it (and I do too) against a more broader narrow-mindedness.</p>

<p>Most people do not want to be narrow-minded. &nbsp;We want to be "right-minded", i.e. to see things correctly. &nbsp;When you tell someone they are narrow minded, they tend to get mad at you. &nbsp; But if you say "you are forgetting this part of the problem" then they are more likely to actually think about it. &nbsp;They might end up agreeing or disagreeing, but they will at least talk about it with you. &nbsp;We all know it is easy to miss things, that we only see part of the situation. &nbsp;</p>

<p>One of Tom's metaphores is a cat; once you disect a cat then you can't put it together again. &nbsp;It is not a good metaphore for understanding, because we could draw blood samples from a cat or take X-rays of it without killing it. &nbsp;Blood samples are only a tiny part of a cat, and only show us a fraction of what it is, but sometimes a veterinarian can learn something important that way. &nbsp;However, it is a great metaphore about making changes to a system.</p>

<p>I think that Tom uses the cat metaphore because he is concerned that the VA has made large changes to VistA without understanding it, and these changes involve cutting out parts of it without realizing that the parts that are cut out are deeply connected to the others. &nbsp; From talking with him, I can see three things that he thinks people have ignored.</p>

<p>1) Tom sees VistA as much more than just a piece of software. &nbsp;VistA is a community, a process for working with the software, a knowledge base. &nbsp;One of his original purposes of building VistA was to create a community, and he not only succeeded but is proud of how he succeeded. &nbsp;So, it pains him to see people try to reuse the software but at the same time ignore the community, and perhaps even supress it. &nbsp;</p>

<p>2) VistA was developed in a bottom-up fashion. &nbsp;Each hospital had a few programmers, and each programmer worked closely with doctors. &nbsp;There was no overall architect or plan, other than improving the health of veterans. &nbsp;This process undoubtedly had some weaknesses, but it had tremendous benefits, as well. &nbsp;It resulted in a system that fits the needs of doctors. &nbsp;It is a major reason why VistA has been so successful, and the VA has worked hard for 15 years to try to have a more top-down development style, and has been impressively unsuccessful.</p>

<p>3) VistA is driven by metadata. &nbsp;Metadata means different things to different people, and VistA has a variety of kinds of metadata. &nbsp;Sometimes it means the data that indicates the provenance of the real data, and VistA has that. &nbsp;But the kind that interests me the most and that I think interests Tom the most is configuration data that controls the behavior of the system. &nbsp;Most hospitals that use VistA have a cadre of medical experts (usually trained as doctors or nurses) who configure VistA. &nbsp;Most of the work of configuring VistA to a hospital does not require programming in Mumps, but just changing the metadata. &nbsp; This means that the details of VistA are under the control of medical experts (who have to become VistA experts before they can exert this control) and not programmers. &nbsp; Tom thinks that VistA should have a lot more metadata, and that there are a variety of things in VistA that now require programming that ought to be done by the experts who configure metadata.</p>

<p>These three aspects of VistA (and I expect there are more; these are just the three I can recognize) contribute to making VistA such a good fit for healthcare. &nbsp;Healthcare varies enormously, and it is hard for one piece of software to fit everywhere. &nbsp;The second and third aspects are part of what makes VistA so configurable; the first aspect helps people to learn how to configure it.</p>

<p>This description of VistA is just the parts of the elephant that I have felt. &nbsp;It is a complex system and perhaps is not knowable by any single person, no more than a city can be completely known or the internet can be known. &nbsp;Nevertheless, I know Champaign pretty well and I know Chicago better than I know New York City, though I know New York City better now than I did a year ago. &nbsp;I look forward to getting to know VistA better.</p>

<p>&nbsp;</p>
</div>]]></description>
			<guid isPermaLink="false">3497673651</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3497673651</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3497673651</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>A Design Approach to Research in Technology Enhanced Mathematics Education</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=A_Design_Approach_to_Research_in_Technology_Enhanced_Mathematics_Education&amp;entry=3490028531</link>
			<category>patterns</category>
			<pubDate>Fri, 05 Aug 2011 20:22:11 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>This is a PhD thesis on applying design patterns (among other things) to building Technology Enhanced Mathematics Education, i.e. computer systems for helping teach mathematics. &nbsp;These patterns are more closely related to "pedagogical patterns" than to software design patterns, but the thesis is probably interesting to others doing research in patterns.</p>

<p>http://www.yishaymor.org/phd</p>
</div>]]></description>
			<guid isPermaLink="false">3490028531</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3490028531</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3490028531</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>Naked Objects</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Naked_Objects&amp;entry=3487492199</link>
			<category>general</category>
			<pubDate>Thu, 07 Jul 2011 11:49:59 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>I remember a bit of excitement about Naked Objects a few years ago, and I thought it was a promising approach. &nbsp;I haven't heard much recently, and wondered what had happened to it.</p>

<p>Check out the <a href="http://incubator.apache.org/isis/Pawson-Naked-Objects-thesis.pdf">2004 PhD thesis by Richard Pawson</a>, which is easier to read than most theses. &nbsp;I think it is an important idea. &nbsp;The goal is making it easier to get to the heart of the users problem domain, and to be less distracted by technical frameworks.</p>

<p>And now the <a href="http://incubator.apache.org/isis/index.html">Naked Objects has become an Apache project</a>!</p>

<p>It will be good to see people use this more.</p>

<p>&nbsp;</p>

<p>&nbsp;</p>
</div>]]></description>
			<guid isPermaLink="false">3487492199</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3487492199</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3487492199</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>The power of working with users</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=The_power_of_working_with_users&amp;entry=3486781549</link>
			<category>software engineering</category>
			<pubDate>Wed, 29 Jun 2011 06:25:49 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>I just found a good article on <a href="http://www.fredtrotter.com/2007/11/10/why-is-vista-good-the-vista-open-source-development-model/">what makes VistA good</a>. &nbsp;<a href="http://en.wikipedia.org/wiki/VistA">VistA</a> was developed in the 70s and 80s using an open source development model. &nbsp; In the last two decades, the VA has often tried to develop it using a more commercial top-down model, and has repeatedly failed. &nbsp;What makes VistA good is that programmers pair-program with clinicians. &nbsp;They work closely to make sure that the system does exactly what the hospital needs. &nbsp;That is the process that led to a system that has won all kinds of awards, and it is not an accident.</p>
</div>]]></description>
			<guid isPermaLink="false">3486781549</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3486781549</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3486781549</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>New York</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=New_York&amp;entry=3486087257</link>
			<category>general</category>
			<pubDate>Tue, 21 Jun 2011 05:34:17 GMT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>I'm spending the summer in New York (Westchester county) working on a framework for business transaction processing. &nbsp;Well, I'm really working to help bring "Liquidity Manager" to the point where we can try it out on the first customer, but that is the same thing. &nbsp;The company is called "Metaficient" and it is a typical startup with a few smart and dedicated people working hard to bring their first product to market. &nbsp;It is fun. &nbsp;The hardest part for me is being away from home for so long, but my son Caleb is out here with me, sort of bringing a piece of home with me.</p>

<p>The point of this note is to let people in NY know that I am here. &nbsp;About a year ago I exchanged e-mail with someone about contacting him if I came out this way, but I can't find it now. &nbsp;I recall he read my blog. &nbsp;And there are probably lots of people out here that I know. &nbsp;I've got a lot to do this summer, but I wouldn't mind getting away every now and then to talk to interesting people.</p>
</div>]]></description>
			<guid isPermaLink="false">3486087257</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3486087257</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3486087257</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
	</channel>
</rss>
