To save content items to your account,
please confirm that you agree to abide by our usage policies.
If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account.
Find out more about saving content to .
To save content items to your Kindle, first ensure no-reply@cambridge.org
is added to your Approved Personal Document E-mail List under your Personal Document Settings
on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part
of your Kindle email address below.
Find out more about saving to your Kindle.
Note you can select to save to either the @free.kindle.com or @kindle.com variations.
‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi.
‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.
When, and when not, to use the following wrapping technologies: C APIs, dynamic shared libraries, screen scraping, peer-to-peer, and the Common Object Request Broker Architecture (CORBA).
The trade-offs of wrapping.
Information technology shops of today have a huge investment in information technology; unfortunately, the vast majority of it isn't object oriented (OO). In the 1980's it is estimated that over $ 1 trillion was invested in information technology in the United States alone. Needless to say organizations are motivated to retain as much of this investment as possible. Wrapping is a technique in which you make non-OO technology appear to be OO by putting a layer of OO code around it, which is often a critical part of any significant OO project.
A wrapper is a collection of one or more classes that encapsulates access to technology that isn't object-oriented to make it appear as if it is. A wrapper class is any class that is part of a wrapper. Wrapping, as shown in Figure 11.1, is used to provide OO applications access to hardware, operating system features, procedure libraries, function libraries, and even legacy applications. Wrapping allows you to retain your investment in older, non-OO technology by allowing you to reuse it in the new OO applications that you develop.
Oooooh, my first process pattern. All of the patterns I had written to date talked about programming things. This column introduced the first pattern that talks explicitly about people activities.
Jim Coplien was one of the first people to start writing lots of good patterns. Even though he is a good programmer, he chose to write his patterns out of his experience analyzing software development organizations. I was skeptical at first—what do these patterns of how people behave have to do with programming? It was around the time of this article that I began to realize that his perspective was as important as mine. It doesn't matter how good a job you do if you're doing the wrong job.
To make up for all the icky squishy stuff, I made sure I included plenty of code in the column. As aggressive as I think I am, looking at these columns reminds me that I go in the water half a toe at a time.
Now, where was I? Oh, yes. Last issue I talked about my philosophy of testing and presented a framework that supported writing unit and integration tests. But before that, I was talking about how to use patterns. I have spent a couple of issues designing the software to run a television and remote control, using patterns to guide every design decision.
This paper describes an interactive software system, developed at the Robotics and Automation Laboratory at UCLA to demonstrate innovative approaches to off-line robot programming and work-cell layout design. The software computes the time-optimal motions along specified paths, local optimal paths around an initial guess, and the global optimal path between given end-points. It considers the full robot dynamics, actuator constraints, on the payload acceleration or the gripping force, and any number of polygonal obstacles of any shape. The graphic displays provide a useful tool for interactive motion planning and workcell design.
The purpose of this paper is to demonstrate that first-order functional programs can be transformed into intensional programs of nullary variables, in a semantics preserving way. On the foundational side, the goal of our study is to bring new insights and a better understanding of the nature of functional languages. From a practical point of view, our investigation provides a formal basis for the tagging mechanism that is used in the implementation of first-order functional languages on dataflow machines.
After the brief pause in the previous column to discuss philosophy, this column descends again into the depths of techno-minutiae. At least I talked about why you'd want to use instance-specific behavior, and didn't just present it as:“Here's a cool thing you can do with Smalltalk.”
The pattern Scriptable Objects still looks pretty good to me. In fact, I like it better as a pattern than many of the patterns that follow.
This and the next column will discuss technical and philosophical matters. The technical material covers implementing and using instance-specific behavior, the idea that you can attach methods to individual instances rather than to a class. You might use it in animation or in building a Hypercard-like system. It is not a new idea. Lisp-based object systems have had it for years, and languages like Self rely on it exclusively. It is not well known in the Smalltalk community, though, and deserves a place in the mature Smalltalker's bag of tricks.
The philosophical material illuminates the differences between Digitalk's and ParcPlace's view of good Smalltalk style. ParcPlace grew out of a research atmosphere where truth and beauty were admired. Although established in business now, ParcPlace continues to favor elegant solutions. Digitalk has always been driven by the desire to build commercial software and has often been staffed with engineers whose experience comes from other languages. Digitalk's solutions tend to be more pragmatic and the workings easier to follow operationally, even if they don't have the most elegant high-level models.
This was a very important article for me. I had been writing solo for some time. I needed to collaborate more, especially since I had been independent for almost a year and I was getting lonely for technical collaboration.
Bruce Anderson organized this fantastic workshop for IBM at its educational site in Thornwood, New York. Ralph Johnson was another one of the teachers. Late one night, I grabbed him and said, “I bet we can describe HotDraw using patterns.” He didn't know quite what I meant, but he has learned to humor me (probably because he's big enough to just bop me if I get out hand). There in a spartan little room in IBM's training facility in up state New York, we tried to recreate HotDraw using only patterns—this pattern tells us to create this object, then this pattern splits it in two, then…
The result was one of those crackling moments when you know you have something. Early the next morning, I described HotDraw to Desmond D'Souza, first using CRC cards the way I always had, then using the patterns. He confirmed that the pattern description communicated the “why” of the design much more clearly.
Ralph and I were confident enough of our findings that we wrote up the paper with a sweeping conclusion—any object architecture can be derived by applying a set of patterns.
My programming partner Ward Cunningham taught me to avoid complexity. In spite of my blue-chip, Silicon Valley brat credentials, I was never a very good programmer. Ward has more programming talent than I do, but he still programs simpler stuff, not because he must, but because he chooses. That is a big part of my success to date—picking development priorities and ignoring interesting side issues.
This was my first technical article. I was lucky to write it with Ward, because he had a pretty good handle on how to focus an article. That was the lesson of this paper for me—focus. I can remember discussing for days what the one single point was we wanted a reader to take away. That was a powerful lesson, and a bit painful, too. Ward and I had been working on lots of exciting stuff. I wanted to talk about all of it. Ward leaned and leaned on finding the one point that stood above all others. Finally we hit on this one.
The article introduces the Cunningham Diagram, a diagram with much the same information in it as Jacobson's Interaction Diagram, but (to my eyes, anyway) much more artistically rendered. As far as impact goes, this paper was a dud. The two good ideas here—the diagram itself and a tool for constructing it from running code—both disappeared without a trace.
You can't write a review without breaking some eggs. That was my conclusion after writing this article. I pretty much trashed the Enfin product as it stood, backed by my review research and a nasty experience at a potentially big client.
I was worried what my friends at Enfin would say after this came out. I was pleasantly surprised to find them supportive— “We know we have these problems. Let us show you how we are addressing them.”
I learned that readers appreciate it when you speak your mind plainly, but you'd better have some numbers to back up your opinions.
A funny thing happened on the way to objects. There was this C++ juggernaut that was supposed to trample all in its path. I can remember hearing all the talk at OOPSLA '86 in Portland about how C++ was the language for objects. “Too much momentum.” “Too many C programmers.” “The alternatives are too flaky.” Everything else was going to be trampled. Period. In spite of this, a thriving market has grown around Smalltalk, the granddadly of pure object languages. It may be a fraction of the C++ market, but it is currently the scene of enormous technical and business energy. I make my living with Smalltalk, so my opinions on the matter are suspect, but I'll present the facts of the products in the market and let you draw your own conclusions.
MDSF is a generic manipulator development and simulation facility developed by Spar Aerospace Limited, as a prime contractor to the Canadian Space Agency. It is an integral part of Canada's contribution to the International Space Station (ISS) program. MDSF is capable of simulating general robotic systems with complex and flexible structures undergoing all kinds of tasks including payload hand-over and contact with the environment. Rigorous validation and configuration control have been imposed throughout the development course of the simulation facility. Examples of current applications in the ISS program are included.
This was about where I started losing interest in writing the column. I had written this nice bit of code for a client, and I ran into a publishing deadline, so I turned it into a literate program and sent it off.
You'll notice that there are eight more columns after this one. Once again, my reluctance to change shows through. My lesson: once you decide not to do something, do not pass go, do not collect $200 (yep, that's the going rate). Quit and get on with something else.
In my case, I was distracted by trying to keep my business going (which in itself was too big a job for one person) and trying to get my patterns book done.
Not that this is a terrible column, or that it gives bad advice. The technique is useful, and belongs in every wizard's black bag. When I don't feel like writing the column, though, I shouldn't write the column.
Before I jump into this month's column, I'd like to tell you a little about what I learned at Digitalk's DevCon this year.
RANT
One thing I learned is that Digitalk is finally coming around to the idea that third-party support is important to their success. The slow growth of the third-party parts market has hurt them, I think, and they want to fix that. Their Partners Program, the third-party catalog to be shipped with their product, and their public and private statements at DevCon give me hope that they are coming around.
This column takes a little bit bigger chance. I never worked out the instance variable taxonomy to the degree I did with temps, but I went ahead and published what I had anyway (as a column, it's not in the book), because I thought it was interesting and potentially useful. Looking at it now, I can't see how terribly useful it is. Sigh. Anyway, I was about to quit as columnist, and this and the previous column were just about rock bottom.
In the last issue, I presented the four ways temporary variables are commonly used. This time, I'll talk about how instance variables are used. The results for instance variables are nowhere near as tidy as those for temps. I'll speculate as to why after I've presented the information.
SOAPBOX
But first, I'd like to whine and complain a little. Here's the essence of my beef—it's getting harder, not easier, to write Smalltalk applications. This is not what I expected. Smalltalk had already raised the level of programming so much from what I was used to that I figured the trend would continue. Today's clichés would become tomorrow's abstractions and the day after that we would forget we ever had to program that stuff. Onward and upward.
There are two notable points to make about this paper. First, it is one of the first times Ward and I published any pattern-related material (we presented some stuff at OOPSLA 87 in Orlando, I in Norm Kerth's “Where Do Objects Come From” workshop, Ward on a panel). Second, it argues that the worst problem of reuse is one of communication, not technology or economics.
The paper started out life as a Tektronix technical report. Ward and I had the habit of writing up just about everything we did as a TR. After we had written this, I think we submitted it as a position paper for some conference or workshop. Somehow, JOOP got hold of a copy and contacted us about publishing it.
The paper can be summed up as: “We created two sets of abstractions. The first was communicated as literate source code. The second was communicated as patterns for its reuse. The first set of objects was misused; the second was used correctly. We conclude that the problem of reuse is one of effectively communicating the intent of the code.”
Hold on a sec.…
Before I finish bashing case statements, I'd like to return to the scene of an earlier crime, my perfidious assault on that bastion of Smalltalk orthodoxy, the ubiquitous accessor method. (Whew! That's a tenbuck sentence if I ever seen one.) I argued that the violation of encapsulation provided by accessor methods more than offset any benefit of inheritance reuse.
This column is really just an application of Composed Method to deal with inheritance. Now I always try to make my code fragments be real code, no As, Bs, and Cs. You can see why from the example here that is written the other way.
The column is interesting in that it contains some of the first explicit links between patterns. Down at the end it says, “Use Composed Method if necessary to set this pattern up.” I paid considerably more attention to pattern linking when I wrote the pattern book, and I'll probably pay a lot more attention with my next set of patterns.
Patterns in isolation are all very interesting, but it is when they are linked together that they become powerful. It is only then that you can explain a simple solution to a problem, because you know that the rest of the solution was handled by previous patterns or will be handled by future patterns.
The topic of this issue's column on Smalltalk idioms, following the general theme of inheritance, is how to manage the use of super. Several issues back I wrote a column entitled “The Dreaded Super,” in which I catalogued all the legitimate (and otherwise) uses of super in the existing Smalltalk/V and VisualWorks images. I'm still very proud of that column, but a couple of days ago I discovered I had left out one very important technique in dealing with super.
As if one crusade wasn't enough, I had to take on the sacred cow of inheritance as well. This must have been my “caped crusader” phase. I still think inheritance is overrated, but I don't generally get in anyone's face about it anymore. Too many windmills under the bridge, I guess. There I go, sounding old and worn out again.
I like the way the pattern form makes concrete and clear the technique of separating state-related and service-related code. The how of it is clear, as is the why.
This is one of many attempts I have made to explain the pattern I now call Composed Method. I must have written this pattern six or eight times. Persistence (my wife calls it “stubbornness” for some reason) can make up for lack of raw talent.
The two patterns here are written as transformations and named as a transformation—you have a method and you split it apart or you have a class and you split it apart. I was very big on “patterns as transformations” for a while. All the patterns in the pattern book are written differently—as descriptions of the things created, not the process of creating them.
Of the three tenets of objects—encapsulation, polymorphism, and inheritance—inheritance generates by far the most controversy. Is it for categorizing analysis objects? Is it for defining common protocols (sets of messages)? Is it for sharing implementation? Is it really the computed goto of the nineties?
This column is the site of my greatest disaster as a column writer—I promised something I didn't deliver. This was another one of those “write the first half now and the rest later” columns. Unlike the column about applying patterns to design, however, I didn't know the second half of the material when I started. I stil feel bad about this, but I still don't know the material for the second half, so I still can't write it
I really like this column as a piece of pedagogy. It is an excellent example of lie management. I describe garbage collection simply one way, then simply another, then combine the two for a truer picture of garbage collection. And hey, I even included a bunch of pictures.
This month I'll talk about garbage collection. To paraphrase Mark Twain, everybody talks about the garbage collector, but nobody does anything about it. All of the commercial Smalltalks provide some ability to tune the garbage collector, but without knowing what's going on and why, you are unlikely to be able to know when these features are applicable or how to use them. This article discusses the common vocabulary of modern garbage collection. Later, we'll explore what you can do to tune the garbage collector in the various Smalltalks.
Section A of the special issue consisting of 13 papers covering a wide field is devoted to the topic of languages and software in robotics, with an emphasis on practical applications. Diverse themes are analysed and discussed, such as neural networks, fuzzy approaches, object-oriented programming, simulation and modelling, graphical robot languages and other pertinent topics. Authors from a number of countries have contributed papers describing recent research and different approaches to this important field, particularly in view of the potential applications in various areas.