SlideShare ist ein Scribd-Unternehmen logo
1 von 24
"Find a bug in a program, and fix it, and the
program will work today. Show the program
how to find and fix a bug, and the program
will work forever."

                             -Oliver Selfridge
A Discussion on
Automatic Programming




      Corey A. Spitzer
      BarCamp Omaha
        August, 2008
Automatic Programming?
"What would you say...
   you do here?"
•Gather and document requirements
•Design and document the solution
•Code the framework, architecture, and/or
scaffolding/plumbing
•Set up storage, code data access layer (mundane
persistence and CRUD stuff)
•Code business logic
•UI design and development
•Refactor, refactor again, update docs
•Debug, debug again
•Tests (unit, integration, penetration, load, stress,
usability, etc.)
•Documentation
•Deploy, get feedback
•Monitor, support, perform maintenance
Scaffolding
Model Driven Architecture
Documentation Generation
Documentation Generation
Round-trip Engineering
Natural Language Programming
Metafor
To create the background:
                   Draw the screen's box with the white color.


osmosian.com's     Loop.
                   Pick a spot anywhere in the screen's box.


"Plain English"
                   Pick a color between the lightest gray color and the
                  white color.
                   Dab the color on the spot.
                   If a counter is past 80000, break.
                   If the counter is evenly divisible by 1000, refresh the
                  screen.
                   Repeat.
                   Extract the background given the screen's box. *dahd
                  or Create the background from the screen. Or
                  something.


                  To create a work given a URL:
                   Allocate memory for the work.
                   Put the URL into the work's URL.


                  To create some works given a buffer:
                   Destroy the works.
                   Put nil into the current work.
My Recipe
public abstract class Function
{
  handleActionFromUI(String action)
  {




        // run this function
        Collection returnCollection = performAction(action);




        return returnCollection;
    }

    public abstract Collection performAction(String action);
}
public abstract class Function
{
  handleActionFromUI(String action)
  {
    // create a unique test name




        // run this function
        Collection returnCollection = performAction(action);




        return returnCollection;
    }

    public abstract Collection performAction(String action);
}
public abstract class Function
{
  handleActionFromUI(String action)
  {
    // create a unique test name

        // save the present environment and state




        // run this function
        Collection returnCollection = performAction(action);




        return returnCollection;
    }

    public abstract Collection performAction(String action);
}
public abstract class Function
{
  handleActionFromUI(String action)
  {
    // create a unique test name

        // save the present environment and state

        // generate code to load the present environment and state




        // run this function
        Collection returnCollection = performAction(action);




        return returnCollection;
    }

    public abstract Collection performAction(String action);
}
public abstract class Function
{
  handleActionFromUI(String action)
  {
    // create a unique test name

        // save the present environment and state

        // generate code to load the present environment and state

        // generate code to instantiate and run this function with
        // current inputs

        // run this function
        Collection returnCollection = performAction(action);




        return returnCollection;
    }

    public abstract Collection performAction(String action);
}
public abstract class Function
{
  handleActionFromUI(String action)
  {
    // create a unique test name

        // save the present environment and state

        // generate code to load the present environment and state

        // generate code to instantiate and run this function with
        // current inputs

        // run this function
        Collection returnCollection = performAction(action);

        // generate code to assert the output from running the test code
        // will be the same output as it is now

        return returnCollection;
    }

    public abstract Collection performAction(String action);
}
public void testLoginController_login_cas_100
{
  loadState("login_cas_100.sql");

    HashMap<String, String> output = runFunction("foo", "bar", 123);

    assertEquals("blah", output.get("foo"));
    ...
}

public void testMyController_doSomething_cas_100
{
  ...
}

public void testMyController_doSomething_cas_101
{
  ...
}
But wait... There's more!
Sources and Useful Links
               Doxygen
 http://www.stack.nl/~dimitri/doxygen/

      Object Management Group
       http://www.omg.org/mda/

       Code Generation Network
    http://www.codegeneration.net

              Ruby on Rails
       http://www.rubyonrails.org

                Django
     http://www.djangoproject.com

                 Metafor Info
http://ll4.csail.mit.edu/slides/metafor.pdf

Weitere ähnliche Inhalte

Was ist angesagt?

Javascript 基础
Javascript 基础Javascript 基础
Javascript 基础
Alipay
 
Small eigen collider
Small eigen colliderSmall eigen collider
Small eigen collider
Andrew Grimm
 
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Roel Hartman
 

Was ist angesagt? (19)

Talk KVO with rac by Philippe Converset
Talk KVO with rac by Philippe ConversetTalk KVO with rac by Philippe Converset
Talk KVO with rac by Philippe Converset
 
Presenting things in Swift
Presenting things in SwiftPresenting things in Swift
Presenting things in Swift
 
Letswift19-clean-architecture
Letswift19-clean-architectureLetswift19-clean-architecture
Letswift19-clean-architecture
 
Javascript 基础
Javascript 基础Javascript 基础
Javascript 基础
 
Map kit light
Map kit lightMap kit light
Map kit light
 
My Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API'sMy Top 5 APEX JavaScript API's
My Top 5 APEX JavaScript API's
 
Swift Sequences & Collections
Swift Sequences & CollectionsSwift Sequences & Collections
Swift Sequences & Collections
 
Reactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwiftReactive Programming Patterns with RxSwift
Reactive Programming Patterns with RxSwift
 
Playing With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.jsPlaying With Fire - An Introduction to Node.js
Playing With Fire - An Introduction to Node.js
 
Object-Oriented Javascript
Object-Oriented JavascriptObject-Oriented Javascript
Object-Oriented Javascript
 
Small eigen collider
Small eigen colliderSmall eigen collider
Small eigen collider
 
New Design of OneRing
New Design of OneRingNew Design of OneRing
New Design of OneRing
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
 
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
 
Artem Yavorsky "99 ways to take away your ugly polyfills"
Artem Yavorsky "99 ways to take away your ugly polyfills"Artem Yavorsky "99 ways to take away your ugly polyfills"
Artem Yavorsky "99 ways to take away your ugly polyfills"
 
Introduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoaIntroduction to reactive programming & ReactiveCocoa
Introduction to reactive programming & ReactiveCocoa
 
Creating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with googleCreating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with google
 
FunctionalJS - George Shevtsov
FunctionalJS - George ShevtsovFunctionalJS - George Shevtsov
FunctionalJS - George Shevtsov
 
Emerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the HorizonEmerging Languages: A Tour of the Horizon
Emerging Languages: A Tour of the Horizon
 

Ähnlich wie A Discussion on Automatic Programming

Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805
LearningTech
 
Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805
LearningTech
 

Ähnlich wie A Discussion on Automatic Programming (20)

JavaScript straight from the Oracle Database
JavaScript straight from the Oracle DatabaseJavaScript straight from the Oracle Database
JavaScript straight from the Oracle Database
 
An Introduction to Property Based Testing
An Introduction to Property Based TestingAn Introduction to Property Based Testing
An Introduction to Property Based Testing
 
A new execution model for Nashorn in Java 9
A new execution model for Nashorn in Java 9A new execution model for Nashorn in Java 9
A new execution model for Nashorn in Java 9
 
Singletons in PHP - Why they are bad and how you can eliminate them from your...
Singletons in PHP - Why they are bad and how you can eliminate them from your...Singletons in PHP - Why they are bad and how you can eliminate them from your...
Singletons in PHP - Why they are bad and how you can eliminate them from your...
 
Java design patterns
Java design patternsJava design patterns
Java design patterns
 
Java script for web developer
Java script for web developerJava script for web developer
Java script for web developer
 
Secrets of JavaScript Libraries
Secrets of JavaScript LibrariesSecrets of JavaScript Libraries
Secrets of JavaScript Libraries
 
2. Design patterns. part #2
2. Design patterns. part #22. Design patterns. part #2
2. Design patterns. part #2
 
[2015/2016] JavaScript
[2015/2016] JavaScript[2015/2016] JavaScript
[2015/2016] JavaScript
 
srgoc
srgocsrgoc
srgoc
 
Object Oriented Programming Concepts
Object Oriented Programming ConceptsObject Oriented Programming Concepts
Object Oriented Programming Concepts
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805
 
Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805Design pattern proxy介紹 20130805
Design pattern proxy介紹 20130805
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code baseSingle Sourcing RAP and RCP - Desktop and web clients from a single code base
Single Sourcing RAP and RCP - Desktop and web clients from a single code base
 
Bring the fun back to java
Bring the fun back to javaBring the fun back to java
Bring the fun back to java
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Patterns Are Good For Managers
Patterns Are Good For ManagersPatterns Are Good For Managers
Patterns Are Good For Managers
 
Aplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & JetpackAplicações assíncronas no Android com
Coroutines & Jetpack
Aplicações assíncronas no Android com
Coroutines & Jetpack
 

Mehr von techmonkey4u

Overview of Human and Computer Vision
Overview of Human and Computer VisionOverview of Human and Computer Vision
Overview of Human and Computer Vision
techmonkey4u
 
Robot Exploration with Combinatorial Auctions
Robot Exploration with Combinatorial AuctionsRobot Exploration with Combinatorial Auctions
Robot Exploration with Combinatorial Auctions
techmonkey4u
 
Brain Architecture
Brain ArchitectureBrain Architecture
Brain Architecture
techmonkey4u
 
Fundamental HTML and CSS
Fundamental HTML and CSSFundamental HTML and CSS
Fundamental HTML and CSS
techmonkey4u
 
A Brief Overview of OpenCV
A Brief Overview of OpenCVA Brief Overview of OpenCV
A Brief Overview of OpenCV
techmonkey4u
 

Mehr von techmonkey4u (6)

Overview of Human and Computer Vision
Overview of Human and Computer VisionOverview of Human and Computer Vision
Overview of Human and Computer Vision
 
Robot Exploration with Combinatorial Auctions
Robot Exploration with Combinatorial AuctionsRobot Exploration with Combinatorial Auctions
Robot Exploration with Combinatorial Auctions
 
Brain Architecture
Brain ArchitectureBrain Architecture
Brain Architecture
 
Fundamental HTML and CSS
Fundamental HTML and CSSFundamental HTML and CSS
Fundamental HTML and CSS
 
iBATIS
iBATISiBATIS
iBATIS
 
A Brief Overview of OpenCV
A Brief Overview of OpenCVA Brief Overview of OpenCV
A Brief Overview of OpenCV
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

A Discussion on Automatic Programming

  • 1. "Find a bug in a program, and fix it, and the program will work today. Show the program how to find and fix a bug, and the program will work forever." -Oliver Selfridge
  • 2. A Discussion on Automatic Programming Corey A. Spitzer BarCamp Omaha August, 2008
  • 4. "What would you say... you do here?"
  • 5. •Gather and document requirements •Design and document the solution •Code the framework, architecture, and/or scaffolding/plumbing •Set up storage, code data access layer (mundane persistence and CRUD stuff) •Code business logic •UI design and development •Refactor, refactor again, update docs •Debug, debug again •Tests (unit, integration, penetration, load, stress, usability, etc.) •Documentation •Deploy, get feedback •Monitor, support, perform maintenance
  • 13. To create the background: Draw the screen's box with the white color. osmosian.com's Loop. Pick a spot anywhere in the screen's box. "Plain English" Pick a color between the lightest gray color and the white color. Dab the color on the spot. If a counter is past 80000, break. If the counter is evenly divisible by 1000, refresh the screen. Repeat. Extract the background given the screen's box. *dahd or Create the background from the screen. Or something. To create a work given a URL: Allocate memory for the work. Put the URL into the work's URL. To create some works given a buffer: Destroy the works. Put nil into the current work.
  • 15. public abstract class Function { handleActionFromUI(String action) { // run this function Collection returnCollection = performAction(action); return returnCollection; } public abstract Collection performAction(String action); }
  • 16. public abstract class Function { handleActionFromUI(String action) { // create a unique test name // run this function Collection returnCollection = performAction(action); return returnCollection; } public abstract Collection performAction(String action); }
  • 17. public abstract class Function { handleActionFromUI(String action) { // create a unique test name // save the present environment and state // run this function Collection returnCollection = performAction(action); return returnCollection; } public abstract Collection performAction(String action); }
  • 18. public abstract class Function { handleActionFromUI(String action) { // create a unique test name // save the present environment and state // generate code to load the present environment and state // run this function Collection returnCollection = performAction(action); return returnCollection; } public abstract Collection performAction(String action); }
  • 19. public abstract class Function { handleActionFromUI(String action) { // create a unique test name // save the present environment and state // generate code to load the present environment and state // generate code to instantiate and run this function with // current inputs // run this function Collection returnCollection = performAction(action); return returnCollection; } public abstract Collection performAction(String action); }
  • 20. public abstract class Function { handleActionFromUI(String action) { // create a unique test name // save the present environment and state // generate code to load the present environment and state // generate code to instantiate and run this function with // current inputs // run this function Collection returnCollection = performAction(action); // generate code to assert the output from running the test code // will be the same output as it is now return returnCollection; } public abstract Collection performAction(String action); }
  • 21. public void testLoginController_login_cas_100 { loadState("login_cas_100.sql"); HashMap<String, String> output = runFunction("foo", "bar", 123); assertEquals("blah", output.get("foo")); ... } public void testMyController_doSomething_cas_100 { ... } public void testMyController_doSomething_cas_101 { ... }
  • 23.
  • 24. Sources and Useful Links Doxygen http://www.stack.nl/~dimitri/doxygen/ Object Management Group http://www.omg.org/mda/ Code Generation Network http://www.codegeneration.net Ruby on Rails http://www.rubyonrails.org Django http://www.djangoproject.com Metafor Info http://ll4.csail.mit.edu/slides/metafor.pdf