Nov 9, 2002.

(OOPSLA 2002) Thursday


back to Wednesday

Note on Nov 11th 2002 this paged was moved to a Wiki so you can edit it there. Please read it over there, this copy is here for historical reasons. http://wiki.cs.uiuc.edu/CampSmalltalk/OOPSLA+2002+Trip+report+Thursday

Morning already, sigh.

The Scandinavian School of Object-Orientation
- in memory of Ole-Johan Dahl and Kristen Nygaard
by Ole Lehrmann Madsen

It's an honor to be here.

Lets look at 1967.
Computers where IBM, CDC, DEC (18,000), ILIAC IV
Apollo onboard computer was state of art for size & performance, less capable than calculators today.
1967 Simula-67
1972 Smalltalk-72
1986 OOPSLA Starts
2002 Profs Ole-Johan Dahl and Kristen Nygaard receive the Turning Award.

Alas on June 9th Professor Dahl passed away, followed by Nygaard on Aug 10th.

ACM Turning Award Winners
"For their role in the invention of object-oriented programming. The most widely used programming model today"

Let's reviews the historical development of object-orientation in Scandinavia

Ole-Johan Dahl
Significant contributions of OO
Simula
Structured programming
OO specification languages
Program proving
and much more

The start of the cooperation: 1973.

Kristen Nygaard
Simula I (1961-65)
Simula (1967-70)
The influence of Simula
Trade union activites 1967-88)
Delta (73-78)
Beta (75-?)
Mjoiner (86-90)
Other projects/work
Political work (19??-2002) (against joining the EU)
COOL (2002-)

Simual 67 was triggered by the invention of inheritance in January 1967.
Vehicle
Car, Truck, Bus
Ambulance is a Car
This example drove the discovery of inheritance.

The contributions of Simula
Active Objects, parallel systems, coroutines
Processes and schedulers
Still something to learn from Simula

Influence on Simula
Algol 60: a subset of Simula,
Hoare: record Handling
Lisp: memory managment

Influence of Simula
Abstract data types
Hore: Notes on the representation of data types
Hidden/protected added to Simula (Proposed by Jacob Palme)
Class invariants: Eiffel
Algebraic data types
Monitor concepts (Hoare & Brinch Hansen)
Concurrent Pascal (Brinch Hansen)

Smalltalk
Alan Kay got a tape with a Simula compiler
C++
Bjarne Stroustrup student for Arhus
Eiffel
Bertran Meyer (Chairman of Simula user group)

Discussion about Nygaards' trade union work.
Which led to people having a say in program design, which was not something that was done before

COOL
Comprehensive Object-Oriented Learning
OO an enormous success
negative side
Too many OO experts.
Too many (bad) books on OO.
The fundamental concepts of OO seem to disappear in technical details.

COOL was developed to address these needs.

We got to see some brilliant, detailed illustrations drawn by famous artists from Norway that detail OO concepts using real world examples, a very very full very odd restaurant for example in rich detail, that is used to teach OO and as a project the students build a OO program to simulate.

[Your scribe will point out that the slides had lots of detail, the speaker with excellent english ran thru them a bit too fast]

Informatics
Informatics is the science that has as its domain information processes and related ...

[mmm that must have been 30 seconds for that detailed slide, sigh].

What is OO programming
In OO programming an information process is regarded as a system developing through transformations of its state

OO perspective
The world is NOT OO
OO is a perspective on the world
A perspective is the means used by people to organize knowledge...

To program is to understand.

The world doesn't stop with Java and C#
It was said IBM PL/I will end all languages so don't do Simula.
http://www.ifi.uio.no/in_memoriam_kristen/

Question
Bad books? ok well good books?

Timothy Budd , see his good books [Web Page>http://www.cs.orst.edu/~budd/]
[books>http://www.amazon.com/exec/obidos/search-handle-url/index=books&field-author=Budd%2C%20Timothy/002-5927770-5815216]

[Your scribe notes I managed to talk to Dr. Budd yesterday evening at the OOPSLA social even and found out he is working on yet another book]

Some other questions.

Question from
Timothy Budd (of all people)
Thanks for the book promotion.
This werid syntax for BETA where did it come from?

Answer
Well we didn't like long keywords, we thought people could use symbols.
3 plus 4 is really 3 + 4 for example.
Also no curly brackets in the seventies, those came later.

Question from Ungar.
I'd like to follow up on curly brackets.
What do you think about this square bracket versus curly issue.

If you have simple syntax, and users with no programming experience this works well.
Experienced people have lots of problems because they don't slow down and listen.

Ungar
Ah, so if you do the next language you shouldn't use curly brackets.

Answer
Yes, I only use curly brackets for tutorials.

Linda then presented an award. OOPSLA isn't big on this, and we were bless with Nygaard decision to come, alas that didn't occur. We asked his wife who also couldn't make it. So we give it to Ole Lehrmann Madsen because of our appreciation for Nygaard to get it right, he is our BB King and we need to remember his work and contribution to us.

So off to Camp where I spent most of the day, talking to various old friends and watching a few folks do some coding, with some discussion about version control systems. But lurking was the rumbling interest in [Croquet>www.opencroquet.org], and there was one presentation I had to attend.

David Griswold
A demo of the [StrongTalk system>http://www.cs.ucsb.edu/projects/strongtalk/pages/index.html]
A bit strange, this was the result of two different lines of research. The Self system, and the strong type system, and the merge is the StrongTalk system. This came from startup in the 90's a high performance VM for Smalltalk. Makes things very fast, removes message sending overhead, and adds strong typing to the language. We were bought by Sun, and much of the logic went into the current Java VM. Very recently Sun was convinced to release this old shelved Smalltalk research project.

The VM is binary only. For non-commerical use. Alas..
However you can see how fast things are, and you can see a Smalltalk blue book strong-typed language released under a BSD license. So we hope that people can see Smalltalk can go much faster. A proof of concept. Please look at the Smalltalk code and borrow from it. Self did show this, but StrongTalk is the proof of concept.

The UI.
A flyweight glyph based user interface that nonetheless allows integration of native widgets, and which provides automatic layout using Tex-sytle "shrinking/stretch" semantics. Native threads with both synchronous and asynchronous (non-blocking) C callouts, and an advanced outliner-based programming environments use of mixins to provide a simple elegant alternative to multiple inheritance.

Design Philosophy
Don't mess with the language (This is tricky hard)
Get the foundation right, rather than adding all sorts of extensions

How does Strongtalk relate to Smalltalk-80
Strongtalk is a true Smalltalk that also provides an optional static typing system.
Standard method syntax is supported with optional type annotations
Full block closure semantics
The normal mixed-mode arithmetic semantics are supported, as well an infinite precision integer arithmetic.
Normal class/metaclass semantics are supported.. However inside the VM, all classes are actually constructed from mixins, which adds flexibility.

Typed "Blue Book" model libraries
Still supports the kind of interactive program creation and modification that helps make Smalltalk so unique.

In nonmodel areas of the library
UI: flyweight widgets with full support for embedded native widgets
Reflection done with the mirrors concept.
Images declarative storage, rebuilt from scratch at startup using declarative Smalltalk.

Example
Hierarchy browser, in the HTML, it's a Smalltalk widget, yet has win32 scroll bar. Can spawn to a window etc.

mmm quite a different code browser, think the [Whisker browser by Doug Way> http://www.mindspring.com/~dway/smalltalk/whisker.html].
On instance variables you have the optional types for each variable. It's real, not some sort of faked add on. Can also annotate with type, but then it's untyped. Remember you are adding a typed system on top of an untyped language so it enables an amazing degree of freedom.

Questions?

VM uses typed for performance?
Answer
NO typed system is only used for annotation and checking, NOT for performance. Typed and untyped run at the same speed. If you use types for that you are binding interface to implementation that is wrong. Also can enforce private/public.

Now note how the browser autofits the screen when we open a new method.

forwardURLs ^<OrdCtnURL> /*That a construct to indicate this method returns an object of type OrdCtnURL */
methods follow

next block of code
popNextURLOrIfAbsent: blk <[^X def]> ^<URL | X >

So this means we return the type you defined by entering the method, say pass in a string, then you would return a string , or it could return a URL type.

Mmm Question why X def or X.

The def inference that this X is the definition. You could find this out by examining the static code, but it becomes very very hard to figure out and might be ambiguous. Now the guy who creates this has to think what to type here, but the programmer using the code doesn't have to think. Write once, read many.

Now lets add a new method, that's ok, but now we didn't actually type check it. You can type check at accept time, or defer until later.

Ok this code has an error, we show using a set of bracketing arrows to point out the issue. Then we can ask the tool to tell us what the returned type of the object is that has the type checking error. Ok make a correction. Mm that's an error
it suggesting that we return self. No we want to do ^failedBlock value, oops need self, so it's really failedBlock value; ^self

Another example.
I do the type checking on accept. That helps remove those types of errors that might be found in debugging.

Ok it's interesting to do the type-checking in real time, change in real-time.

Technology under the covers.

A fast interpreted VM combined with a unique dynamically-adaptive inlining compiler that produces native code. The compiler uses type feedback, an approach developed by Urs Hoelzel for this thesis as part of research done in the self group at Sun Microsystems inc.

A very fast generational garbage collector
Direct pointers for objects, eliminating object table indirections.

The Effect
Can inline and optimize away over 90% of dynamically occuring message sends and block closures.
This totally changes the "cost" model for programming in Smalltalk

So the machine does optimistic optimization, say the math is all small integer. We inline that, but it could in the future return a large, then we need to back this out. At this point we magically backout the optimization and reconstitute the stacks, We have lightweight checks that have little or no costs. Then we might need to reconstruct 20 different methods. This happens in milliseconds. Usually things change, reach a steady state for a while, things change. (Later he explained we could cache the optimized version with small integer, and also the large integer version to allow you to switch back and forth during execution and avoid the optimization costs).

Can inline and optimize away over 90% of dynamically occurring message sends and block closures.
This totally changes the "cost" model for programming in Smalltalk. The interpreted frames for method changes are done in a lazy manner.

Discussion about steady state is adaptive, so it changes all the time.

Question
Thresholds is that a counter?, and how do change the thresholds?
Well it's a constant, but the Java VM has an adaptive thresholds.
MMm say you want to spend more than 90% of your time in optimized code.
IE 90% of the time in 10% of the code, so you only need to find out and optimize that code, not the other 90% of the code base.

Question where does this come from?

Well the VM isn't realized. But remember Self does this and the Self VM is available. Papers that discuss the theory are available. Gee Smalltalk doesn't need to be slow. At the time we got 3.5x faster than VW. It allow you to removed silly thoughts about full blocks, sends etc it just removes this baggage. So you can write highly refactored code. Like we use accessors for everything. Even in array at: which calls other methods!. The code is NOT hand optimized to fit the VM. Say in Dictionary there is huge reflection in the code, we have multple blocks fed to blocks etc. After all this it runs 4x faster than VW. We ported the code back to VW, it is Smalltalk after all and it ran 35x slower!!!!

Mmm afterwards we reflected that he said, ya I built this typed smalltalk system, (which some folks feel is needed for performance), then I don't use any of the typed information you provide in the optimizer because it doesn't make any difference.

After the StrongTalk demo I check in what was happening in the main room, and listened to the XP Panel, I was late to the show and missed some of the early conversations.

Kent
If you define XP by a set of practices, say a 5 pack beer, or a three leg horse. Is that wrong, can we have one miss one? Well I have a dumb dog, really 4 dumb dogs. If you throw the ball, and they miss it, then pointing at the ball doesn't improve things.

Let introduce Ron,
The oldest programmer I know, there at the XP creation myth project. He has a varied background. etc etc.

Ron
Best to use XP all the way out. But I get "Oh" on my project I need to change to XP here. My response is huh? Of course you need to change things. Now I diagree with Kent the practices are important because it defines what XP is. If you practice enough then you live XP.

Garry
It's interesting, are the twelve practices necessary to succeed? No we've built things without them all it. What's more inportant is deciding what practices are good for your team. Each team needs to internalize those practices for the team. So here is the metaphor. The practices are like drugs, they can help you, or kill you.
Now not everyone can be druggist.

Kent
Person complaint to me about their XP experience, it seems every three month the score card would be done, and everyone involved got blame. So everyone had lost sight that the goal was to produce better value. That is a tragedy

some discussion I didn't capture.

Questions
Philip
I don't like this try it you'll like this stuff. Why do this stuff without explain things up front. Why this give me two months and we'll see? Not giving people the ability to rationally to undestand implies people are limited when they are not?
Answer
It is and it is not. Stop by the book store, there is no shortage of books explaining XP.

Question
Why this trust thing?
Answer
You can't say going in this will work, try it. You can't say that, you can tell stories tell experiences, give metrics. But the responsibility is yours, the first law is you are reponsibile for your own practices.

Mary
We've all grown to hate the process police. So how do you sound? You sound like the process policy. Why this don't trust the team?
Answer
(Jeff) We try hard not to give a command, and try to make the process police not exist. It's a form of study not a form of command.

(Eric) Sometimes I fade into the background and I observe the team working, so my place becomes irrelevant.

Change.
We are going to have that. XP handles that quite well. But need additional effort before/after change

Doug
Using XP at a large company, that works ok for a small company or startup. But what about in a large company, what about the interface points, say between groups for an api to a group not using XP. Or the managers interface points. How do I grease the wheels here at these interface points.

Jeff why is this a problem

Garry, XP can be part of the larger process, and the individual groups can do more XP and the interfaces have different levels of XP applied. Really if they say we apply process X for everyone that will fail!

Ok say you've got a DB group that takes 6 weeks, and if you could get rid of that it will make 20% faster.
[MMM I didn't think this answered the question?]

[I'll note I didn't capture all questions]

Jeff was talking about if you know all twelve of the practices by heart, then went you look at things you can break problem situations down into smaller manageable chunks.

It's about learning these skills, internalize, use your judgment.

Friday