1 / 49

I Have Nothing to Declare But my Genius

I Have Nothing to Declare But my Genius. -or- Late Binding as a Philosophy of Life Brian Foote foote@laputan.org http://www.laputan.org. Why I’m (Still) Here. The Dynamic Vision from James VI through George III Architectural Balkanization in the Post-Linguistic Era

denis
Download Presentation

I Have Nothing to Declare But my Genius

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. Why I’m (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 I Have Nothing to Declare but my Genius -- 2

  3. #1: Dynamic Polymorphism • What other kind is there? • Easy as PIE • Great for Wrapping Stuff • Modularity • Application Level • Component Level I Have Nothing to Declare but my Genius -- 3

  4. #2: Callipygian Compilation • Deutsch and Shiffman • Self and Hotspot • A Cast of Thousands • The JITters • Complets I Have Nothing to Declare but my Genius -- 4

  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 I Have Nothing to Declare but my Genius -- 5

  6. Object Behavior ClassDescription Class Metaclass Method MethodDictionary CompiledMethod ByteArray Context MethodContext BlockContext Message Process ProcessScheduler Semaphore SharedQueue Compiler SystemDictionary A Language Built of First-Class Objects I Have Nothing to Declare but my Genius -- 6

  7. #3: Reflection • Grew out of the Lisp Tradition • Programs able to access a “causally connect” representation of themselves • Self Representation • Introspection / Intercession I Have Nothing to Declare but my Genius -- 7

  8. The Manifest • User Configuration • Evolution • A map • A manifest • User configurable code • Ad hoc reflection I Have Nothing to Declare but my Genius -- 8

  9. 1. Monitors 2. Encapsulators 3. Message Forwarding 4. Property List Manipulations 5. Accessible Objects (Dicts=Records=Props) 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 20. Melds (Garlan & Kaiser) 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... 40. Dynamic Behavior Changes Class Menagerie I Have Nothing to Declare but my Genius -- 9

  10. 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 59. Program Supervision 60. Multiprocessor Load Balancing 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 Class Menagerie I Have Nothing to Declare but my Genius -- 10

  11. CLOS and the MOP T | STANDARD-OBJECT | | CONSTRUCTOR | | METHOD-COMBINATION | | | STANDARD-METHOD-COMBINATION | | | | LONG-METHOD-COMBINATION | | | | SHORT-METHOD-COMBINATION | | PLIST-MIXIN | | | <...> | | DEFINITION-SOURCE-MIXIN | | | <...> | | METAOBJECT | | | GENERIC-FUNCTION | | | | STANDARD-GENERIC-FUNCTION | | | METHOD | | | | TRACED-METHOD | | | | STANDARD-METHOD | | | | | STANDARD-ACCESSOR-METHOD | | | | | | STANDARD-WRITER-METHOD | | | | | | STANDARD-READER-METHOD | | | SLOT-DEFINITION | | | | STANDARD-SLOT-DEFINITION | | | | | STANDARD-EFFECTIVE-SLOT-DEFINITION | | | | | STANDARD-DIRECT-SLOT-DEFINITION | | | | EFFECTIVE-SLOT-DEFINITION | | | | | STANDARD-EFFECTIVE-SLOT-DEFINITION | | | | DIRECT-SLOT-DEFINITION | | | | | STANDARD-DIRECT-SLOT-DEFINITION | | | SPECIALIZER | | | | EQL-SPECIALIZER | | | | CLASS | | | | | PCL-CLASS | | | | | | BUILT-IN-CLASS | | | | | | FORWARD-REFERENCED-CLASS | | | | | | STD-CLASS | | | | | | | FUNCALLABLE-STANDARD-CLASS | | | | | | | STANDARD-CLASS <That's all...> May Day PCL Hierarchy I Have Nothing to Declare but my Genius -- 11

  12. MultiMethod Specializer ClassSpecializer EqualSpeciealizer GenericMessage MethodCombination DiscriminatingMethod Qualifiers (#Before #After, etc.) SubStandardMethodCombination SimpleMethodCombination BetaMethodCombination DispatchingMethodCombination Objects We Built I Have Nothing to Declare but my Genius -- 12

  13. Actors • Asynchrony is only now coming into vogue • A Glamorous World: Models … Actors • A strategic architecture reserve… I Have Nothing to Declare but my Genius -- 13

  14. I Have Nothing to Declare but my Genius -- 14

  15. One of These is True Meta considered harmful “Meta” considered harmful I Have Nothing to Declare but my Genius -- 15

  16. The Vision • Languages Built out of Objects • Open Languages • Open JITTERS • A Framework For Languages • Compile Time is any Time • Linguistic Imperialism I Have Nothing to Declare but my Genius -- 16

  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 I Have Nothing to Declare but my Genius -- 17

  18. The Great Schism of ‘97 • Objectivists • Aspectivists • Pragmatists • Formalists I Have Nothing to Declare but my Genius -- 18

  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? I Have Nothing to Declare but my Genius -- 19

  20. XSLT Example <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:key match="/publisher/books/book" use="author-ref/@ref"name="books-by-author"/> <xsl:template match="/"><bestsellers-list>  <xsl:apply-templates select="/publisher/authors/author">    <xsl:sort select="sum(key('books-by-author', @id)/sold)"/>    <xsl:sort select="last_name"/>  </xsl:apply-templates></bestsellers-list></xsl:template> <xsl:template match="author">  <copy>    <name>      <xsl:value-of select="last_name"/>,      <xsl:value-of select="first_name"/>    </name>    <total_publications>      <xsl:value-of select="count(key('books-by-author', @id))"/>    </total_publications>    <total_sold>      <xsl:value-of select="sum(key('books-by-author', @id)/sold)"/>    </total_sold>    <rank>      <xsl:value-of select="position()"/>    </rank>  </copy></xsl:template> </xsl:stylesheet> I Have Nothing to Declare but my Genius -- 20

  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 I Have Nothing to Declare but my Genius -- 21

  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” unitconversion I Have Nothing to Declare but my Genius -- 22

  23. The Carpetbaggers • Type Theorists • Methodologists • Languages Designers • Testers • Management Consultants • System Integrators • Interface Design Engineers? I Have Nothing to Declare but my Genius -- 23

  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). I Have Nothing to Declare but my Genius -- 24

  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 I Have Nothing to Declare but my Genius -- 25

  26. How MCO was “Lost” I Have Nothing to Declare but my Genius -- 26

  27. Dollars and Francs I Have Nothing to Declare but my Genius -- 27

  28. Mass, Weight, Force and Impulse • Weight = 32.174 lbf • Mass = 1 slug • Mass = 32.174 lbm • Mass = 14.6 kg • Weight = 143 N • 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) I Have Nothing to Declare but my Genius -- 28

  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. I Have Nothing to Declare but my Genius -- 29

  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 I Have Nothing to Declare but my Genius -- 30

  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 wasn’t before the right person when it was sorely needed… I Have Nothing to Declare but my Genius -- 31

  32. If it ain’t 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 don’t win games, players do I Have Nothing to Declare but my Genius -- 32

  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… I Have Nothing to Declare but my Genius -- 33

  34. My Journey • Units? • Types? • Metadata? • Process? • Testing? • …Mud! I Have Nothing to Declare but my Genius -- 34

  35. A $327 Million Fireworks Display …in the night time Martian sky, watched by no one… -- 23 September, 1999 I Have Nothing to Declare but my Genius -- 35

  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 I Have Nothing to Declare but my Genius -- 36

  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… I Have Nothing to Declare but my Genius -- 37

  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… I Have Nothing to Declare but my Genius -- 38

  39. Megafauna • Global Namespace • The Manifest • Polymorphism, Reflection, Jitting • Vegetable, not Animal • Runtime Testing, Communication, Metering I Have Nothing to Declare but my Genius -- 39

  40. Engineering Tolerances • We can’t 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… I Have Nothing to Declare but my Genius -- 40

  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 I Have Nothing to Declare but my Genius -- 41

  42. The Cornucopia • Moore’s Law has bought three, four orders of magnitude in performance • We’ve squandered it on eyewash • Can’t 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 I Have Nothing to Declare but my Genius -- 42

  43. The Frugal Fussbudgets of Formalism • Static languages throw away all the information we need at runtime. Why??? • This made some sense … in 1982 • It’s peanuts to keep this stuff now… • It’s almost malpractice not to… I Have Nothing to Declare but my Genius -- 43

  44. Dynamic Types are Strong Types • Weak vs. Strong and Static vs. Dynamic are distinct dimensions… • I don’t care about mere declarations, I want to know what enforces them… I Have Nothing to Declare but my Genius -- 44

  45. Embrace Stuff • Embrace Failure • Embrace Diversity • Embrace Runtime • Embrace Heterogeneity • Embrace Change I Have Nothing to Declare but my Genius -- 45

  46. Soft Machines • Are made of objects • Are easy to change • Are easy to harden • Are virtual machines • Are configurable machines I Have Nothing to Declare but my Genius -- 46

  47. The Holocene Explosion • Integration • Brokers and Reflection … • CORBA? • SOM! I Have Nothing to Declare but my Genius -- 47

  48. The Cobbler’s Children I Have Nothing to Declare but my Genius -- 48

  49. I Have Nothing to Declare but my Genius -- 49

More Related