<?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>Thu, 03 Dec 2009 21:53:16 EST</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>2009-12-03T21:53:16-05:00</dc:date>
		<icbm:latitude>40.033333</icbm:latitude>
		<icbm:longitude>-88.283333</icbm:longitude>
		<item>
			<title>SEMAT</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=SEMAT&amp;entry=3437278628</link>
			<category>software engineering</category>
			<pubDate>Thu, 03 Dec 2009 07:37:08 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>There is a new call to action called <a href="http://www.semat.org/bin/view">Software Engineering Method and Theory</a> with a large number of signatories.&nbsp; Wednesdays are when Darko Marinov and I and a few of our students usually meet for lunch and talk about software engineering issues.&nbsp; Yesterday we decided to talk about SEMAT and we had about a dozen people come, much more than usual.</p>

<p>First, I think it is great that people are acknowledging there is a problem and want to do something about it.&nbsp; The state of the practice in software development is pretty dismal.&nbsp; Some groups do a great job, but most do not.&nbsp; As I tell the students in my software engineering course, if you manage requirements, make sure the developers talk to each other, release working code regularly, have some sort of a systematic testing process, use build and version control tools, and periodically stop and see how you are doing and how you can improve, you will be better than 90% of the groups out there.&nbsp; Of course, I could be exaggerating.&nbsp; Maybe it is only better than 75%.</p>

<p>The call to actions states:</p>

<p>Software engineering is gravely hampered today by immature practices. Specific problems include:</p>

<ul>

<li> The prevalence of fads more typical of fashion industry than of an engineering discipline. </li>

<li> The lack of a sound, widely accepted theoretical basis. </li>

<li> The huge number of methods and method variants, with differences little understood and artificially magnified. </li>

<li> The lack of credible experimental evaluation and validation. </li>

<li> The split between industry practice and academic research. </li>

</ul>

<p>I support completely the second, fourth and fifth points.&nbsp; I think the first and third are symptoms, not causes, and fairly unimportant symptoms.</p>

<p>One of the things that makes me worry is that when academics say "theory" they mean math, but that is not necessarily what people in industry mean.&nbsp; I was very happy to see that Alistair Cockburn was a signatory, because in my opinion he is one of the best theory-developers for software engineering.&nbsp; Even though he has a PhD, he definitely doesn't act like an academic.&nbsp; He is a consultant and firmly in the industry camp.&nbsp; His theories have no math in them, but are instead more like theories in sociology or anthropology.&nbsp; That is because he focuses on people more than product.&nbsp;</p>

<p>Part of the problem is defining software engineering.&nbsp; Do they mean all software development, or only software development practiced by people with software engineering degrees? Or with software engineering in their titles?&nbsp; What about the typical bank or insurance company, which has software development groups whose managers have little software development background, and where the average developer does not even have a CS degree, must less formal training in software engineering?&nbsp; I think the main problem with software development is that most groups do not do the things that we have known for 30 years to be important.&nbsp; Most people who manage software groups do not really understand software development, so they are incapable of doing a good job.</p>

<p>I think that the theory that all software developers need is the kind that Alistair teaches.&nbsp; In addition to the theory, we need a set of standard base-line practices.&nbsp; We need training programs to ensure that the theory and practices are known.&nbsp; I think we should take a broad view of software engineering.&nbsp; Anybody who is developing software for somebody else should have a certain set of minimal standards.&nbsp; Certainly what NASA and Microsoft does counts as software engineering, but they are doing a better than average job and are not the ones that most need s widely accepted theory.&nbsp; The biggest need is with the bottom half of development groups.</p>
</div>]]></description>
			<guid isPermaLink="false">3437278628</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3437278628</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3437278628</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>Refactorings in Eclipse</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Refactorings_in_Eclipse&amp;entry=3436791999</link>
			<category>refactoring</category>
			<pubDate>Fri, 27 Nov 2009 16:26:39 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>A nice description of <a href="http://www.ibm.com/developerworks/opensource/library/os-eclipse-refactoring/index.html?ca=dgr-lnxw07Refractoringdth-OS&amp;S_TACT=105AGX59&amp;S_CMP=grlnxw07">refactorings in Eclipse.</a>&nbsp; I'm putting it here so I can find it later when I want to give it to someone.</p>

<p>&nbsp;</p>
</div>]]></description>
			<guid isPermaLink="false">3436791999</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3436791999</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3436791999</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>interaction design</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=interaction_design&amp;entry=3436516749</link>
			<category>patterns</category>
			<pubDate>Tue, 24 Nov 2009 11:59:09 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>http://www.kickstarter.com/projects/nickd/cadence-and-slang-is-a-book-about-interaction-design</p>

<p>This is an interesting reference to Christopher Alexander, an interesting idea for fund-raising, and what could be an interesting book.&nbsp; I pledged $40 for the book and I hope to see a copy!</p>

<p>-Ralph</p>
</div>]]></description>
			<guid isPermaLink="false">3436516749</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3436516749</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3436516749</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>Article on parallelization</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Article_on_parallelization&amp;entry=3436497085</link>
			<category>general</category>
			<pubDate>Tue, 24 Nov 2009 06:31:25 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>Nick Chen, one of my grad students, wrote a very interesting <a href="http://softwareengineering.vazexqi.com/2009/11/23/lessons-from-parallelizing-matrix-multiplication">blog about parallelizing matrix multiplication</a>.&nbsp; His main point is that you can get better performance from low-level optimizations than you can from parallelization, and that a lot of people are parallelizing the naive, unoptimized version which means that their results are meaningless.&nbsp; In general, MM is a lousy example for parallelization, since people should not be writing MM routines but should be using one of the many libraries that has it already optimized.</p>
</div>]]></description>
			<guid isPermaLink="false">3436497085</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3436497085</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3436497085</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>More OOPSLA</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=More_OOPSLA&amp;entry=3435407232</link>
			<category>general</category>
			<pubDate>Wed, 11 Nov 2009 15:47:12 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>There are slides of <a href="http://web.mit.edu/newsoffice/2009/liskov-event.html">Barbara Liskov's talk</a> about work leading to her Turing Award.&nbsp; They give the complete references to the papers that she said had a big impact on her work.</p>

<p>A closely related talk was the Onward! essay by William Cook, <a href="http://wcook.blogspot.com/2009/11/on-understanding-data-absraction.html">On Understanding Data Abstraction</a>.&nbsp; His basic point is that abstract data types and objects are different ways to achieve data abstraction.&nbsp;&nbsp; An ADT has a set of functions that are able to access a data type.&nbsp; The details of the data type are hidden from the programmer, but the functions are well known and the compiler knows the representation of the data type.&nbsp;&nbsp; An object is a function that returns a set of functions that can access the data.&nbsp; The details of the functions are hidden from the programmer, and the compiler has no idea about the representation of the data.&nbsp; OO programs are much more extensible because you can replace one object with another at run-time, i.e. each time through a loop a call to an object's method can result in a different function being invoked.&nbsp; However, you can't do this with an ADT, because the functions of an ADT require a particular representation.</p>

<p>William's point is that this is more important that identity or inheritance.&nbsp; You can add identity and inheritance to ADTs and you do not get nearly as big a change as you get when you add "message sending"/"virtual functions"/"polymorphism by late-binding of function calls".</p>
</div>]]></description>
			<guid isPermaLink="false">3435407232</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3435407232</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3435407232</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>Building reliable applications in Erlang</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Building_reliable_applications_in_Erlang&amp;entry=3434883255</link>
			<category>general</category>
			<pubDate>Thu, 05 Nov 2009 14:14:15 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>My class has been reading through Joe Armstrong's PhD thesis, and today we are discussing chapter 6, "Building an Applclication".</p>

<p>One of the things that I learned from this thesis is that an average Erlang programmer working on a project built using OTP does NOT write code that sends and receives messages to other processes.&nbsp; Instead, they reuse "behaviors", which are components written by expert programmers that hide all the parallel programming.&nbsp; There are a fairly small number of behaviors, and a typical Erlang programmer will write a purely sequential "module" and then select a behavior and parameterize it with the module.&nbsp; Thus, if the behaviors are written correctly, some errors are impossible because the "modules" are restricted.</p>

<p>The chapter only describes five behaviors, but seems to indicate that there are more. Still, I think it is a small number.</p>

<p>The relationship between a module and a behavior is similar to that of a class and its abstract superclass.&nbsp; Each behavior requires that the module that it runs providea a particular set of operations, just like an abstract class defines abstract methods that its subclasses must implement.</p>

<p>The hard part of using this architecture is breaking a system down into behaviors that are in the library.&nbsp; The thesis acknowledges this, but says that with a little practice, people figure it out.&nbsp; Not very helpful, but probably true.</p>
</div>]]></description>
			<guid isPermaLink="false">3434883255</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3434883255</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3434883255</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>Parallel programming patterns</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Parallel_programming_patterns&amp;entry=3434719976</link>
			<category>general</category>
			<pubDate>Tue, 03 Nov 2009 16:52:56 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>Today we discussed three pattens from the pattern language that I'm working on with people from Berkeley.&nbsp; I think all three were written by Berkeley grad students.&nbsp; However, they are based on patterns from the book "Patterns for Parallel Programming".&nbsp; They all from the <a href="http://parlab.eecs.berkeley.edu/wiki/patterns/patterns">parallel programming strategies</a> section, Task Parallelism, Recursive Splitting, and Discrete Event.&nbsp; I started off writing this before class, and am finishing it afterwards.</p>

<p>I thought they were all badly written.&nbsp; They are too abstract.&nbsp; There are not enough examples.&nbsp; There are a lot of unnecessary words.&nbsp; It was hard to see the pattern.</p>

<p>Patterns should start with a good example.&nbsp; None of these did.&nbsp;</p>

<p>I thought Recursive Splitting was the best of the group.&nbsp; I knew the pattern beforehand, of course, but I knew all of them.&nbsp; It suffered from using a programming language that nobody understood for the first example, but it had lots of examples.&nbsp; The problem was well-stated, and it covered the important topics.&nbsp; From our class discussion, it was obvious that a lot of the points were not as clear as they should be, but that is typical.&nbsp;</p>

<p>Patterns should start with simple and obvious examples, and move on to more complex ones.&nbsp; The first example of a recursive data structure in this paper was "array".&nbsp; Only to a mathematician!&nbsp; Most programmers do not think of array as recursive, and the paper should have started with an obviously recursive data structure like trees.&nbsp; Even graphs are not naturally recursive.</p>

<p>Part of the problem with Task Parallelism is that the pattern in the book isn't very clear, either.&nbsp; This is a broad and fuzzy pattern.&nbsp; When most programmers say "Task Parallelism", they mean something different from this pattern.&nbsp; I'm starting to think it is just a bad pattern, and should be replaced.&nbsp; I'm sure that the grad students who worked on this tried valiantly to pull it off, but it just doesn't work.&nbsp; I liked the example of Monte Carlo Method, but the students didn't resonate with it.&nbsp; Several said they wanted code.&nbsp; But I know that even if they understood the example, they would not have understood the pattern.</p>

<p>I think the pattern should be replaced with "Embarrasingly Parallel".&nbsp; This is a well-known term with a well-defined meaning.&nbsp; The pattern could talk about how even the easy cases of parallelism are not easy.&nbsp; You have to choose grain size and figure out how to start processes.&nbsp; Usually the rsults have to be combined in some way.&nbsp; Currently, Task Parallelism is more than just embarassingly parallel, it slides off into systems with enough dependencies between tasks to put them in a different category, but that is why the pattern is so fuzzy.&nbsp; Make it crisp!&nbsp; Narrow the pattern!&nbsp; Patterns should not be all things to all people, they need to be specific and identifiable.</p>

<p>Discrete Event is schizophrenic.&nbsp; When I was reading the first part, I thought "actors / asynchronous message passing" but then when I read the example, they said "discrete event simulation".&nbsp; Discrete event simulation is not the most obvious application for an actor system.&nbsp; Usually discrete event simulation has a global clock, and replacing it with a distributed clock is highly non-trivial.&nbsp; The other people in the discussion thought that the pattern WAS about message passing, so I have decided that the problem with this pattern is that they chose a bad example.</p>

<p>There is hope for these patterns.&nbsp; Everyone in my class this semester is going to write a pattern (or a dozen patterns, in some cases) and the first drafts of many of them will be just as bad.&nbsp; It is important to keep at it, and to not stop until the pattern is done.&nbsp; These aren't done yet.</p>
</div>]]></description>
			<guid isPermaLink="false">3434719976</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3434719976</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3434719976</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
		<item>
			<title>Program as Language</title>
			<link>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?showComments=true&amp;printTitle=Program_as_Language&amp;entry=3434427832</link>
			<category>general</category>
			<pubDate>Sat, 31 Oct 2009 07:43:52 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p>Thursday was the last day of OOPSLA.&nbsp; I spent the entire day in Onward!&nbsp; I had said at the beginning of the week that I would spend most of my time in Onward!, but in fact I only went to one keynote in the track before Thursday. There are just too many things to do at OOPSLA!</p>

<p>Also, the more observant among you might realize that I'm posting this on Saturday.&nbsp; It is obvious I am not a natural twitterer.&nbsp; I have so much to say about Thursday that it will take me days to post it all.</p>

<p>One of the Onward! essays was "An Exploration of Program as language" by Elisa Baniassad and Clayton Myers.&nbsp; Elisa gave a memorable talk on it.&nbsp; The key idea is that programs are languages.&nbsp; In fact, they are more like natural languages than programming languages are, because programming languages are formal but the language of programs is not.&nbsp; The talk gave examples of poetry and jokes in programs.</p>

<p>Afterwards, Dave Ungar said "This is all obvious to anyone who has programmed a long time.&nbsp; What is new?"</p>

<p>What is new is that people have not studied programs as languages.&nbsp; It might be an obvious idea, but it has not really been explored.&nbsp; When researchers study programming, they think of it as theorem proving or theory building, but not as constructing a new language.&nbsp; They have not taken ideas from linguistics and applied them to programs.&nbsp; The talk didn't give much insight into how linguistics shines a light on programming, except by using the analogy that learning a large program is a lot like moving to Hong Kong and learning Chinese.</p>

<p>I liked that analogy, because I tell students every year that learning a large system is like moving to New York.&nbsp; At first you just remember a few landmarks and carry a map.&nbsp; If you are like me, you might sketch a simplified version of the map and try to memorize it.&nbsp; You start to learn neighborhoods, and how to get from one place to another.&nbsp; Eventually you are comfortable with going to a new place.&nbsp; After half your life, you might even tall people you have "mastered" New York, but of course nobody knows everything about New York.&nbsp; it is just too big.</p>

<p>I've been reading a book called "The Power of Bable" by John McWhorter, which is a book on how languages develop by a top-notch linguist.&nbsp; I bet he quotes from a hundred languages in this book.&nbsp; I can't believe one person could know so many languages!&nbsp; It is very well written.&nbsp; Literate, modern, insightful.&nbsp;</p>

<p>"After all these years, the true roots of my fascination with language remain the same as on that day on a Philadelphia sidewalk when I lost my innocence: that anything I write or say in this language can be said in about six thousand other ways, with completely different words and with grammars so different that they can almost strain the credulity of the outsider."&nbsp; Page 3.</p>

<p>The book is about how languages develop, grow, and change.&nbsp; One of the main points is that all languages change all the time.&nbsp; Change is normal for languages.&nbsp; He talks about pidgeons, which are languages that nobody speaks natively but that two or more groups use to speak to each other, and creoles, which often start as pidgeons but that people now speak natively.&nbsp; He gives rules for how language borrow from each other, and how they change by simplifying or by differentiating.&nbsp; It sounds a lot like refactoring!</p>

<p>One of his main points is that there is no different between dialect and language.&nbsp; To put it very strongly, the differences between British English and American English differ only in degree, not in kind, to the differences between American English and Mandarin.&nbsp; I know how unbelievable this is.&nbsp; I will not try to convince you.&nbsp; I will only say that if you are the least bit intrigued, you should get the book, and you will probably be convinced.</p>

<p>When I first heard about the idea that programs were languages, I said to myself "that is certainly true for big programs, but it isn't true for small programs".&nbsp; But that is just like saying that Mandarin and English are certainly different languages, but British and American are not.&nbsp; McWhorter would agree that it makes sense to say that every program is its own language, though some program languages are very similar to others.</p>

<p>There are so many thoughts swirling through my head that if I keep chasing them, I will not finish this today.&nbsp; So, I will close with the chapter titles of "The Power of Bable".&nbsp; I love these titles!&nbsp; They show that John McWharter is creative and thoughtful even about chapter titles.</p>

<p>The First Language Morphs into Six Thousand New Ones</p>

<p>The Six Thousand Languages Develop into Clusters of Sublanguages</p>

<p>The Thousands of Dialects Mix with One Another</p>

<p>Some Languages are Crushed to Powder but Rise Again</p>

<p>The Thousands of Dialects of Thousands of Languages All Developed Far Beyond the Call of Duty</p>

<p>Some Languages Get Genetically Altered and Frozen</p>

<p>Most of the World's Languages Went Extinct</p>

<p>Next semester, I am going to run a seminar studying this book and trying to apply it to programming.&nbsp; If you want to participate in some way, please send me e-mail.&nbsp; This applies especially to people not students at Illinois, since they will get other announcements of it.</p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p>&nbsp;</p>
</div>]]></description>
			<guid isPermaLink="false">3434427832</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/ralph/servlet/CommentAPIPBServlet?guid=3434427832</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/ralph/blogView?guid=3434427832</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
		</item>
	</channel>
</rss>
