I Have Nothing to Declare But my Genius - PowerPoint PPT Presentation

About This Presentation
Title:

I Have Nothing to Declare But my Genius

Description:

Everything I know about OO I learned from the Image. Browsers / IDEs. Windows GUIs ... 42. Dynamic Class Construction. 43. 'Smart' Paths (see Part/Whole) ... – PowerPoint PPT presentation

Number of Views:88
Avg rating:3.0/5.0
Slides: 50
Provided by: brian95
Learn more at: http://www.laputan.org
Category:

less

Transcript and Presenter's Notes

Title: I Have Nothing to Declare But my Genius


1
I Have Nothing to Declare But my Genius
  • -or-
  • Late Binding as a Philosophy of Life
  • Brian Foote
  • foote_at_laputan.org
  • http//www.laputan.org

2
Why Im (Still) Here
  • The Dynamic Vision from James VI through George
    III
  • Architectural Balkanization in the
    Post-Linguistic Era
  • The Future of Objects in a Global Ultrascale
    Ecosphere

3
1 Dynamic Polymorphism
  • What other kind is there?
  • Easy as PIE
  • Great for Wrapping Stuff
  • Modularity
  • Application Level
  • Component Level

4
2 Callipygian Compilation
  • Deutsch and Shiffman
  • Self and Hotspot
  • A Cast of Thousands
  • The JITters
  • Complets

5
Smalltalk-80
  • Everything I know about OO I learned from the
    Image
  • Browsers / IDEs
  • Windows GUIs
  • Dynamic Translation (JITs)
  • Building Programs Out of Objects

6
A Language Built of First-Class Objects
  • Object
  • Behavior
  • ClassDescription
  • Class
  • Metaclass
  • Method
  • MethodDictionary
  • CompiledMethod
  • ByteArray
  • Context
  • MethodContext
  • BlockContext
  • Message
  • Process
  • ProcessScheduler
  • Semaphore
  • SharedQueue
  • Compiler
  • SystemDictionary

7
3 Reflection
  • Grew out of the Lisp Tradition
  • Programs able to access a causally connect
    representation of themselves
  • Self Representation
  • Introspection / Intercession

8
The Manifest
  • User Configuration
  • Evolution
  • A map
  • A manifest
  • User configurable code
  • Ad hoc reflection

9
Class Menagerie
  • 1. Monitors
  • 2. Encapsulators
  • 3. Message Forwarding
  • 4. Property List Manipulations
  • 5. Accessible Objects (DictsRecordsProps)
  • 6. Multiple Views (Database style)
  • 7. Capabilities (Access Control)/OS Style
    Protection
  • 8. Multiple Inheritance
  • 9. Tracing
  • 10. Debugging (Many Mentions)
  • 11. Futures
  • 12. Remote (Distributed) Objects
  • 13. Multitasking (transparent, perhaps)
  • 14. Constraints
  • 15. Reflection
  • 16. Part/Whole Relationships
  • 17. Active ValuesActive VariablesActive
    MessagesActive References
  • 18. "Smart" Variables
  • 19. Lightweight (Anonymous) Classes
  • 21. Actors/Daemons
  • 22. Lazy Evaluation
  • 23. Caching Schemes
  • 24. Memo Memory Functions (as in POP2 and
    friends)
  • 25. Read-Only Variables
  • 26. Logging
  • 27. Metering/Statistics/Performance Data
    Collection
  • 28. Component Delegation
  • 29. Atomic Objects/Actions
  • 30. Protocol Translators/Adaptors
  • 31. Open Systems (Protocol Negotiators?)
  • 32. Multiple Inheritance Schemes
  • 33. Delegated Inheritance (and other forms of
    sharing)
  • 34. Multimethods (and other generic dispatch
    schemes)
  • 35. Method Combination/Composition
  • 36. Prototypes (ala Borning)
  • 37. Modules (ala Wirfs-Brock)
  • 38. Continuations? Catch/Throw?
  • 39. Exception Handling of various sorts...

10
Class Menagerie
  • 41. Dynamic Class Changes
  • 42. Dynamic Class Construction
  • 43. "Smart" Paths (see Part/Whole)
  • 44. Flavors (now CLOS)-Style Method Combination
  • 45. Two Way Implicit Group Membership (like
    Part/Whole?)(Perhaps encompassing the idea of
    "Enrollment"
  • (Randall Smith))
  • 46. Implicit Coercion Schemes
  • 47. X-Style Substructure Redirection
  • 48. Event Dispatching (see Multimethods)
  • 49. Alternate Memory Allocation Schemes
  • 50. Multilevel (Virtual, in the OS sense) Object
    Allocation
  • 51. Sundry Dynamic and Other Optimizations
    (Cointe)
  • 52. Escape Operators (see Continuations) (B. C.
    Smith)
  • 53. "Deviant" Variable Passing Protocols (B. C.
    Smith)
  • 54. Planning/Supervisory Code (Genesereth,
    others)
  • 55. Behavior Based Programming
  • 56. Active Types
  • 57. Strategy Computation
  • 58. Truth Maintenance
  • 61. Active Values/Access Oriented Programming
  • 62. Self Analysis (Code Walking)
  • 63. Self description of a program's operational
    semantics
  • 64. Smart Comments
  • 65. Logic Variables/Unification
  • 66. Agents
  • 67. Virtual Time (Time Warp)
  • 68. Version Management
  • 69. Garbage Collection
  • 70. Persistent Objects
  • 71. Active Protocols
  • 72. Algorithm animation
  • 73. Language Level Viruses
  • 74. Program Transformation

11
CLOS and the MOP
  • T
  • STANDARD-OBJECT
  • CONSTRUCTOR
  • METHOD-COMBINATION
  • STANDARD-METHOD-COMBINATION
  • LONG-METHOD-COMBINATION
  • SHORT-METHOD-COMBINATION
  • PLIST-MIXIN
  • lt...gt
  • DEFINITION-SOURCE-MIXIN
  • lt...gt
  • METAOBJECT
  • GENERIC-FUNCTION
  • STANDARD-GENERIC-FUNCTION
  • METHOD
  • TRACED-METHOD
  • STANDARD-METHOD
  • STANDARD-ACCESSOR-METHOD
  • STANDARD-WRITER-METHOD

12
Objects We Built
  • MultiMethod
  • Specializer
  • ClassSpecializer
  • EqualSpeciealizer
  • GenericMessage
  • MethodCombination
  • DiscriminatingMethod
  • Qualifiers (Before After, etc.)
  • SubStandardMethodCombination
  • SimpleMethodCombination
  • BetaMethodCombination
  • DispatchingMethodCombination

13
Actors
  • Asynchrony is only now coming into vogue
  • A Glamorous World Models Actors
  • A strategic architecture reserve

14
(No Transcript)
15
One of These is True
  • Meta considered harmful
  • Meta considered harmful

16
The Vision
  • Languages Built out of Objects
  • Open Languages
  • Open JITTERS
  • A Framework For Languages
  • Compile Time is any Time
  • Linguistic Imperialism

17
The Reality
  • Utopian Monocultures were wonderful idea
    incubators
  • More pragmatic languages prevailed
  • We live in a heterogeneous polyglot world
  • We need to play well with others
  • The Rise of Worse is Better

18
The Great Schism of 97
  • Objectivists
  • Aspectivists
  • Pragmatists
  • Formalists

19
The Medusa
  • An apparition so hideous that all who gaze upon
    her are turned to stone
  • "This thing you call language, though...most
    remarkable. You depend on it for so very much,
    but is any one of you really its master?"
  • -- Spock/Kollos, Is There in Truth No Beauty?

20
XSLT Example
  • ltxslstylesheet xmlnsxsl"http//www.w3.org/1999/
    XSL/Transform" version"1.0"gt
  • ltxslkey match"/publisher/books/book"
    use"author-ref/_at_ref"name"books-by-author"/gt
  • ltxsltemplate match"/"gtltbestsellers-listgt 
    ltxslapply-templates select"/publisher/authors/au
    thor"gt    ltxslsort select"sum(key('books-by-aut
    hor', _at_id)/sold)"/gt    ltxslsort
    select"last_name"/gt  lt/xslapply-templatesgtlt/be
    stsellers-listgtlt/xsltemplategt
  • ltxsltemplate match"author"gt  ltcopygt   
    ltnamegt      ltxslvalue-of select"last_name"/gt, 
         ltxslvalue-of select"first_name"/gt   
    lt/namegt    lttotal_publicationsgt     
    ltxslvalue-of select"count(key('books-by-author',
    _at_id))"/gt    lt/total_publicationsgt   
    lttotal_soldgt      ltxslvalue-of
    select"sum(key('books-by-author',
    _at_id)/sold)"/gt    lt/total_soldgt    ltrankgt     
    ltxslvalue-of select"position()"/gt    lt/rankgt 
    lt/copygtlt/xsltemplategt
  • lt/xslstylesheetgt

21
Of Slugs and Bugs
  • How Star-Crossed Software Lost the Mars Climate
    Orbiter

The fault, dear Brutus, is not in our stars, But
in ourselves, that we are underlings
22
A Comic Book Tragedy?
  • Perfectly good spaceship
  • Perfectly good software onboard
  • Support software working as intended
  • Dived into Martian atmosphere, just as it was
    told to
  • The culprit a simple unit conversion

23
The Carpetbaggers
  • Type Theorists
  • Methodologists
  • Languages Designers
  • Testers
  • Management Consultants
  • System Integrators
  • Interface Design Engineers?

24
The Root Cause
  • The failure to use metric units in the coding of
    a ground software file, Small Forces used in
    trajectory models. Specifically, thruster
    performance data in English units rather than
    metric units was used in the software application
    code titled SM_FORCES (small forces).

25
Angular Momentum Desaturation
  • MCO uses both reaction wheels and thrusters
  • RWs allow more precise attitude control
  • In an ideal world, they never saturate
  • On an ideal spacecraft, there is no residual
  • On an ideal mission, residuals cancel out
  • In an ideal model, these are properly accounted
    for

26
How MCO was Lost
27
Dollars and Francs
28
Mass, Weight, Force and Impulse
  • F ma
  • 1 N (1 kg)(1 m/s2)
  • 1 lbf (1 slug)(1 ft/s2)
  • 1 lbf 32.174 lbm (1 ft/s2)
  • 1 lbf 1 lbm (32.174 ft/s2)
  • 1 lbm .4536 kg
  • 1 ft .3048 m
  • 1 N 4.448 lbf
  • 1 N-sec 4.448 lbf-sec
  • 4.448 (32.174)(.3048)(.4536)
  • 1 N-sec 1 kg-m/s
  • N kg (9.81 m/s2)
  • Weight 32.174 lbf
  • Mass 1 slug
  • Mass 32.174 lbm
  • Mass 14.6 kg
  • Weight 143 N

29
SM_FORCES
  • Although starting from MGS-heritage software, the
    coded thruster equations had to be changed
    because of the different size RCS thruster that
    MCO employed. As luck would have it, the 4.45
    conversion factor, although correctly included in
    the MGS equation by the previous development
    team, was not immediately identifiable by
    inspection (being buried in the equation) or
    commented code in an obvious way that the MCO
    team recognized it.

30
A Typeless Tragedy?
  • Metric units were in the SIS
  • Paper is not executable
  • SIS was complied with under MGS
  • LMA is an English Unit shop
  • Unclear whether Whole Values would have helped
    catch this problem
  • Programmers are not executable

31
A Hatchet Job
  • MCO Faster Better Cheaper (pick two)
  • Reused instruments
  • Reused software
  • Just one more cut-n-paste horror story
  • All that paper, but yet the right information
    wasnt before the right person when it was sorely
    needed

32
If it aint been tested
  • Full end-to-end test never performed
  • Programs were late
  • Olfactory Method not followed
  • Paper is not always the your weapon of choice
  • Managers dont win games, players do

33
The Olfactory Method
  • Kent Beck May be Best Remembered as the Man Who
    brought Scatology and Software Engineering
    together
  • If it stinks, change it!
  • --Grandma Beck
  • Code Smells are (not so) subtle indications a
    piece of code is in need of attention and is a
    likely candidate for refactoring

34
My Journey
  • Units?
  • Types?
  • Metadata?
  • Process?
  • Testing?
  • Mud!

35
A 327 Million Fireworks Display
in the night time Martian sky, watched by no
one -- 23 September, 1999
36
The End-to-End Principle
  • Applies to programming languages too
  • Why dote if you have to do it over?
  • Types build of real first class runtime objects
    can be customized

37
The Post Linguistic Era
  • The is a five hundred pound gorilla in the room
  • The Program Model is Central
  • The ASCII is fungible, round- trippable
  • Representations are freely convertible
  • Programs built of objects can be changed
  • Anything can be swapped out

38
Building Program Out of Objects
  • Monitoring, Debugging, Tracing, etc.
  • Patterns are all in Play
  • Dynamic Objects Models and Frameworks Grow into
    Programming Languages
  • You can debug, edit, browse, you name it

39
Megafauna
  • Global Namespace
  • The Manifest
  • Polymorphism, Reflection, Jitting
  • Vegetable, not Animal
  • Runtime Testing, Communication, Metering

40
Engineering Tolerances
  • We cant type each line tree times
  • We can leave in the goalies
  • What are we thinking taking them out?
  • We can engineer our objects to self test

41
The Gang of Four
  • Design Patterns Elements of Reusable
    Object-Oriented Software
  • Erich Gamma, Richard Helm, Ralph Johnson, and
    John Vlissides
  • A landmark book that changed the way programmers
    think about building object-oriented programs

42
The Cornucopia
  • Moores Law has bought three, four orders of
    magnitude in performance
  • Weve squandered it on eyewash
  • Cant we afford to leave the goal tender in?
  • Testing shows the value
  • Those runtime type errors? Welcome to the 21st
    century
  • Network, DB, are slower than reflection

43
The Frugal Fussbudgets of Formalism
  • Static languages throw away all the information
    we need at runtime. Why???
  • This made some sense in 1982
  • Its peanuts to keep this stuff now
  • Its almost malpractice not to

44
Dynamic Types are Strong Types
  • Weak vs. Strong and Static vs. Dynamic are
    distinct dimensions
  • I dont care about mere declarations, I want to
    know what enforces them

45
Embrace Stuff
  • Embrace Failure
  • Embrace Diversity
  • Embrace Runtime
  • Embrace Heterogeneity
  • Embrace Change

46
Soft Machines
  • Are made of objects
  • Are easy to change
  • Are easy to harden
  • Are virtual machines
  • Are configurable machines

47
The Holocene Explosion
  • Integration
  • Brokers and Reflection
  • CORBA?
  • SOM!

48
The Cobblers Children
49
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com