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.
Although I first got interested in Smalltalk when I read the 1981 Byte issue, I didn't get an opportunity to start using it until 1995. I was hooked right away. OOPSLA '96 was exciting because it was the first time I got to meet practicing Smalltalkers. I was thrilled to find people who were crazier than I was. One of them was Kent. Kent was working at the Tektronix labs at the time, and I spent a day there after OOPSLA was over, meeting Kent and Ward and lots of other Smalltalkers. They were bold, adventurous, experienced; they were pushing Smalltalk to its limits. I wanted to be like them.
Over the years, I've gotten to know Kent better than I ever expected. He has made me eat sushi, jump out of a redwood, and write about patterns. I've always felt that I was following where he had broken the trail. It's been a good path to follow.
Kent has always epitomized the spirit of Smalltalk to me. He is an intellectual and a nonconformist, yet he is an intensely practical person. He is concerned with making the world a better place for others, and not just for himself. He is open and sharing. Smalltalk is like that, too.
This was the first article I wrote after the big splash. I was asked to write the article for a special issue on objects, “something about CRC cards.” I remember re-reading the “Laboratory…” article and thinking, “I can't do anything better than that. That article says it all.”
After a brief pause for a personal crisis, I thought, “What the hell. I'll just write the same stuff with different words.” What came out, though, was very different. The original CRC article convinced bright people that CRC was a good idea. This one convinces regular engineers that they, too, can get started with objects.
Ward's goal when we wrote together was to write prose that fairly dripped with meaning. You could read the same sentence every six months and get new meaning out of it. The result is complex, dense, evocative, and sometimes hard to read.
This article is the first time I found my own voice. My writing voice is much plainer than Ward's. I write like I speak: plain and direct (although I generally use fewer expletives when I write). Both Ward's style and mine are directly at odds with my academic training, which was to layer any possible meaning behind layers of jargon, notation, and convoluted sentence structure. I suppose it's no wonder it took me a while to get over that.
What OO patterns, including both analysis patterns and design patterns, are.
How to use OO patterns effectively in the applications that you create.
How to create new OO patterns.
How to apply OO patterns throughout the life cycle.
What the advantages and disadvantages of OO patterns are.
Considering the number of combinations of operating systems, hardware platforms, and network protocols can you reasonably expect to be able to purchase business objects off the shelf? I'm not so sure. But what I do know is that developers are constantly solving the same problems over and over again. How many of you have been involved with developing inventory-control software? Or human-resource-management software? Or billing software? These problems keep repeating themselves over and over again. Although everyone's inventory-control system is different, the fact is that there is a lot of similarity between the designs of these systems. Wouldn't it be nice to be able to pick a design up off the shelf that has 80—90% of the thinking done for you already and all you have to do is develop the differences that are unique to your organization? That's what object-oriented (OO) patterns are all about, they're blueprints of generic designs that you can apply to the systems that you develop.
Doesn't it always seem as if you're solving the same problems over and over again? If you personally haven't solved a given problem before, then chances are pretty good you could hunt somebody down who had tackled the same, or at least a similar problem in the past.
You may have noticed me putting more and more personal comments at the beginning of columns. I think this resulted from getting more and more comfortable with my role as a columnist (even as I was losing interest—I didn't say I was straightforward).
I beat on the “inheritance, feh” horse a bit more in this column, but as before, I try to explain what to do about it, rather than just bash.
The other thing I noticed while rereading this column is the extra pattern thrown in at the end. I didn't do it to pad. I did it because I was honestly embarrassed to have missed it at the client and I didn't want other people to make the same mistake. This violates the “what one thing do you want to say” rule, but it doesn't bother me here. I'm very clear that there are two things to talk about, from the title on down. The power of any rule is when you understand it well enough to break it.
Once again, no garbage collectors. I've been busy paying the bills, so I haven't had a change to look in detail at the garbage collectors in the various Smalltalks. I'll get to it, but those college educations have to come first.
Kent comes clean. I'd never tried to explain patterns in print before, not at any length. This was a bit of an experiment for me. Looking at it now I'm a bit disappointed, because the presentation violates one of my cardinal rules of teaching—always go from concrete to abstract. Were I writing this again, I would take some disguised pattern I had presented earlier and present it both in idiom format and pattern format. Oh well…
One thing I like about the column is the emphasis on communication. Looking at the earlier columns, I'm surprised at how little I said about the importance of communicating through code. I'm sure I understood how important communication is, but I hadn't written about it since the early HOOPLA! articles.
This will be a departure from my code-oriented columns.
For the last six months I've been surreptitiously presenting my material using a technique that I've been working with for the past six years or so. This technique was derived from work done in architecture (buildings, not chips) to help people design comfortable spaces for themselves. The time has come to tell you what I've been leading up to, so that I can directly refer to these concepts in the future.
Why the right attitude is everything when coding object-oriented (OO) applications.
How to work with attributes effectively to make your applications easier to maintain and enhance.
How to develop high-quality methods and classes.
What tools you can use to enhance the development process.
How to organize your development efforts around the class-type architecture in an effective manner.
One of the most important lessons that you can learn about building applications is that there is more to it than coding. In this chapter we will discover a multitude of techniques that you can use to improve your application construction efforts. Everything covered in this chapter is applicable to any object-oriented (OO) language that you work in. This is important because it will help to give you skills that you can apply when you are working in any OO development environment, and not just in the one that you have today. The best skills are the ones that you can transfer to your next project.
Programming, or more accurately construction, is an important part of the development process. We'll discuss solutions for several common coding problems as well as how to organize your development efforts around the class-type architecture presented in chapter 3. The most important lesson that you can learn in this chapter is that good programmers realize that there is more to development than programming and that great programmers realize that there is more to development than development.
How to overcome the object-oriented (OO) learning curve.
What we've learned in this book.
By reading this book you've made a really good start at overcoming the OO learning curve, but that's all you've done, made a really good start. There's still a lot of work ahead of you. More reading, courses, mentoring, and lots of development work. There is a light at the end of the OO tunnel, and this chapter tells you how to get there.
As we saw in this book, there's a lot to object-oriented development. On the one hand, the object-oriented learning process can be long and difficult. Furthermore, there is no guarantee for success. On the other hand, you've gotten a really good start at it by reading this book. Now it's time to move on, however, down the never-ending road of continuous learning.
Advice for Overcoming the OO Learning Curve
Pick up some other books. Throughout this book I referred to some really good books. Although each of them takes a different approach to OO development, you'll find that there are several similarities between them. You should seriously consider reading at least one or two of them.
Subscribe to some magazines and/or journals. There are several object-oriented analysis-and-design magazines and journals, as well as numerous OO programming magazines. They provide leading-edge advice regarding OO development techniques. It's really worth your while to start reading some of them.
What metrics are and why they're important for object-oriented (OO) development.
Which metrics work for OO and which ones don't.
What metrics to use for estimating projects, improving your development efforts, selecting the right tools, and improving your development process.
How to use metrics effectively on your OO development projects.
Project managers are constantly inundated with questions about the status of their project. How good is our design? Can we start coding now? How long will the project take? How big is the project? How much will it cost? How many people do we need? Questions that are difficult, if not impossible, to answer with any certainty without taking measurements of specific factors that address these issues. But what should you measure? A good question.
One of the reasons, very often the main reason, that firms move into object orientation is that they want to improve the quality of the applications that they develop. They want systems that are easier to maintain. They want systems that are easier to extend. They want to develop systems better, faster, and cheaper. The question is “How do you know that you've succeeded?” In this chapter we'll see that metrics are used to answer this question.
There are a lot of object-oriented (OO) development environments and techniques available to you. Although this sounds good, the problem is that it isn't always clear which ones are the best ones for you.
While a program expresses intent, it is the computer, the hardware, that brings that intent to life. In order to have full control over your program's expression you must control the computer that runs it. Therefore, write your program for a computer with a plug. Should you be dissatisfied with the behavior of the computer, unplug it.
I'm working from memory here. This idea, the idea that you could unplug a computer, is an idea that has run in and out of our culture for about as long as there have been computers. I've expressed the idea as a pattern: a problem and its solution. I'm thinking about this pattern because it reminds me of programming with Kent.
I haven't got the words to this pattern quite right. It gives the impression that I fear computers run amuck. Does anybody remember that old film, The Forbin Project, where the U.S. defense computer gets to talking to the Soviet defense computer and they get the idea that they can run the world better than us? Well, that's not the problem. I first wrote the “don't program a computer you can't unplug” pattern because Kent and I needed a pattern at a large scale. We were looking for big advice for a new kind of developer. We imagined ordinary people taking their computing needs into their own hands. These people would use powerful languages to express themselves.
I was really stuck trying to write the second half of the garbage collection column. By this time, I felt like I had the column thing wired- sit down, bang out, email. Ka-ching. Not this time. Nothing I tried worked. The column started out late. It kept getting later.
My solution, as you can see, was to rework material from my by-now-jelling patterns book. I didn't feel particularly good about it, because I knew it wouldn't change anyone's life dramatically, and I always wanted to have an impact. However, it got the column done.
I'll tell you what happened to garbage collection. I sat down three times to write the next column about garbage collection, and nothing came out. Between that, my wife's ten-game winning streak at Cribbage, and 46 inches of rain so far this year (and it's still January), I'm pretty frustrated.
I've been reading Edward DeBono's book Thinking Course (highly recommended). One of the techniques he suggests, and also one I've seen in art, is when you're stuck, do the opposite. In art, if you're having trouble drawing a thing, try to draw something that is completely the opposite. Of course, it's impossible to draw “not a flower,” so you end up with something which gets at “flowerness” backwards. I'm writing a column about “not garbage collection.” I'm not sure where I'll end up, but at least the column will be done.
I was kind of running out of gas for the column by this time. “Objects from the Interface” is a five-paragraph description of a topic that really deserves a book, namely how to factor user interface code. However, I really wanted to present “Objects from the User's World,” and I had to pair it with something to make it long enough.
I always worry when I'm writing if what I'm doing will be long enough. Long after it was clear that the patterns book was way, way too big, I was worried if I could produce enough pages. I think this comes from early writing experiences where I had minimum word counts. I got an “F” on a paper in fourth grade for submitting a 50-word paper, 43 words of which were “very.” That should have told me something about me and about the schooling system I was experiencing.
This is the fourth and final installment in my series on where objects come from. I deliberately started with the unusual and difficult ways of finding objects. There are lots of books that will tell you how easy it is to find objects. Just underline the nouns! The fatuous phrase that keeps popping up is, “…there for the picking.” Or maybe it's “plucking.” In any case, none of the objects you'll find with “Objects from States,” “Objects from Variables,” “Objects from Collections,” or “Objects from Methods” is there for the picking.
This paper proposes a novel design method of a shared controller for telerobot systems. A shared controller can enlarge a reflected force by combining force reflection and compliance control. However, the maximum boundary of the force reflection gain guaranteeing the stability greatly depends upon characteristics of the elements in the system such as; a master arm which is combined with the human operator's hand, the environments where the slave arm contacts and the compliance controller. In normal practice, it is therefore, very difficult to determine such a maximum boundary of the gain. To overcome this difficulty, the paper proposes a force reflection gain-selecting algorithm based on neural network and fuzzy logic features. The method estimates characteristic of the master arm and the environments by using neural networks, and then, determines the force reflection gain from the estimated characteristics by using fuzzy logic. The algorithm can work in an on-line manner, and can be easily applied to any telerobot system because it requires no a priori knowledge on the system. The effectiveness of the proposed control scheme is verified through a series of experiments using a laboratory-made telerobot system.
I got my name on this paper kind of by accident. I was a late arrival on the Vivarium project. Jay Fenton had been doing some very interesting work on programming languages for kids. He wanted to write something up for OOPSLA. I offered to help him.
I ended up reorganizing the paper enough that he offered to put my name on as an author. I felt a little funny, especially since the paper had been accepted with only Jay's name and I was the program chair and besides, I already had another paper in the conference, but I accepted anyway.
The next year, I was on the ECOOP program committee. We had our meeting in Paris. I remember eating lunch in the Xerox cafeteria. Next to me sat a bright, eager Ph.D. student. He began grilling me about the paper and the research behind it. Turns out his class had been given the assignment of figuring out how they would extend existing research, and the Playground paper was one of the three they could pick to extend. This was a shock, because I don't consider myself a scholar. Really I'm more of a talkative engineer. However, it was fun to be noticed.
Technically, I'm amazed at the prescience of Playground. Alan Kay was absolutely convinced that direct control structures, like Smalltalk's message send, would run out of gas and that “pulling” -style would come into vogue (even though the Internet apps call it “pushing”).
Why we need a class-type architecture, and more to the point, why we need a five-layer class-type architecture.
The implications of the architecture for both system development and for project management.
What each layer is really all about and how it fits in with the other layers.
Users want systems that are better, faster, and cheaper. Not only do they want new systems that conform to these requirements, they also want systems that are adaptable and modifiable. You might get lucky and get new requirements that are easy to meet, but I wouldn't want to count on it. Without a well-thought-out architecture in place you will probably not be able to develop applications in a timely and efficient manner that meet the demands of your users.
The class-type architecture presented in this chapter meets these goals.
As an object-oriented developer you need to have an overall game plan as to how you intend to design your system. The class-type architecture described in this chapter provides you with an excellent strategy for organizing the classes of your application to increase both its extensibility and maintainability. I don't claim that this architecture is detailed enough for the needs of your organization. I do claim, however, that it does provide an approach to partitioning your applications that leads to a significantly better design.
This article gives the longer version of the story I told above in introducing the original CRC article. I was glad Marie Lenzi gave me the chance to write it, because I was able to make an explicit public statement that Ward invented CRC, even though my name came first on the original article.
This isn't another introduction to objects with CRC. It is a philosophical look back at CRC's place in the grand scheme of things. It presents what CRC is under the hood, where it came from, and what it is good for.
NOT A METHODOLOGY
What is an article on CRC doing in an issue on methodologies? CRC isn't a methodology. What? Your consultants told you otherwise? Well, as the narrator at the beginning of any number of Disney movies would say: I was there at the beginning, so let me tell you what really happened.
PERSPECTIVE
Before I get rolling, let me say that CRC was really Ward Cunningham's idea. As you'll see later in the article, his was the insight that really tied together several strands we had been pursuing together. You'll also see how I got my name first on the paper that introduced it to the public eye. Really, though—Ward did it, I helped. I hope that sets the record straight. Now, back to your regularly scheduled article.
The paper presents an object-oriented approach to the implementation of a software library (MRROC+) which contains building blocks for the construction of multi-robot system controllers tailored to meet specific demands of a task at hand. Moreover, the paper supplies a brief overview of robot programming methods.
This is clearly recycled material from the patterns book. Not much more to say here.
The topic of this and the next column is how to use instance and temporary variables. I came upon the information (some of it is patterns, some isn't yet) in the course of writing my forthcoming book of Smalltalk coding patterns. I looked at temporary variables first, and found patterns for four ways temps are used:
Reuse the value of a side-effecting expression (like ∧SStream≫next∧T).
Cache the value of an expensive expression.
Explain the meaning of a complex expression.
Collect the results of several expressions.
Success in hand, I went to look for a similar set of canonical uses of instance variables. No dice. I came up with a taxonomy of the uses of instance variables, but no patterns. Many of the uses are bound up in other patterns (like the instance variable that holds the current State object). Others are too vague to make good patterns. I'll present what I have so far, because I have found it useful even in its unpolished state.
Ward Cunningham and I had a good long talk about this. We decided that the reason I was having so much trouble was scope. In the first book I am looking for coding patterns, the tactics of successful Smalltalk. Choosing to use a temporary variable is a tactical decision.