SlideShare uma empresa Scribd logo
1 de 93
Baixar para ler offline
Shaping the Future of
Automatic Programming
Christos Tsakostas
ct@polygenesis.io
#1 Automatic Programming Meetup, June 19th 2019, Athens GR
https://arxiv.org/pdf/1712.00676.pdf
https://jaxenter.com/coding-in-2014-interview-billings-140066.html
“Good code generators will be the most helpful
and useful tools for coding by 2040”
Jay Jay Billings, Alexander J. McCaskey, Geoffroy Vallee, and Greg Watson
Oak Ridge National Laboratory
Agenda
- Goals of the “Automatic Programming” meetup
- Introduction
- Brief overview of the current state for generation
- PolyGenesis
- Future plans and resources
If you have any question, interrupt me!
Meetup Sponsor
ViaBill A/S (https://viabill.com/) is a FinTech company providing
seamless financing. Currently available in Denmark, Norway, the
United States of America and available soon in more countries.
For job openings contact the CTO Allan Noer
an@viabill.com
Goals of the
“Automatic Programming”
meetup
Mindset: Can you handle the responsibility?
● Embracing automatic programming is about handling the responsibility
● Code generators are not magic
● No code generator is good enough for your case
● Efficient generators require efficient modeling
● Be ready to model your case
Promote automation in software lifecycle
● Requirements
● Analysis
● Design
● Coding
● Testing
● Deployment
Acquire deep knowledge about modern best practices
● Microservices
● Event-driven architectures
● Event Sourcing / CQRS
● Automated Testing
● Infrastructure as code
● Domain-driven design
● Behavior-driven design
● ...etc.
Explore current and future technologies in automation
● Artificial Intelligence
● Machine Learning
● Deep Learning
● Computer Vision
● … etc.
Learn about PolyGenesis
● Present and enhance PolyGenesis
● An everyday companion tool for development
Promote Collaboration
● Bring people together, interested in automatic programming
● Hands-on workshops
● Open to new ideas, discussions and presentations
Introduction
What is Automatic Programming?
In computer science, the term automatic programming identifies a type of
computer programming in which some mechanism generates a computer
program to allow human programmers to write the code at a higher abstraction
level.
Wikipedia
Brief History of Automatic Programming
● 1940s: Automation of punching paper tape
● 1950s: Translation of high-level programming languages (i.e. Fortran)
● 1960s: Autocode: "simplified coding systems"
● 1960s/1970s: Generative Programming
● 1980s: Source-to-source compiler
● 1980s/1990s: Source-code generation
● 1990s/2000s: Low-code development
● 2010s: No-code development
● 2010s: Machine Learning & Programming / Code Generation
Why Automatic Programming?
● Productivity
● Quality
● Consistency
● Less coding (in Higher Abstraction Level)
Concerns with automatic programming
● Doing too much
● Not working with existing code bases
● Quality of output code
● Replace developers
● Complexity
● Technology support
● Maintenance
● Cost
Valid unless… you can handle the responsibility
If you “own” a generator
● It can do exactly what you need
● You can make it work with your existing code bases
● You can control the quality of output code
● It will definitely not replace you!
● You can tackle complexity
● You can support any technology
● You will maintain it
● With no extra cost
Who is concerned?
Brief overview of the current state
for generation
Current State
1. Apps / Websites - for end / business users & IT
2. Apps / Business Processes - for business users & IT
3. Machine Learning - for researchers & IT
4. Tools and methodologies - for IT
Current State
Apps / Websites
Samples of Website Generation
● Static website generation (e.g. Jekyll: https://jekyllrb.com)
● emyspot (https://www.emyspot.com)
● Wix (https://www.wix.com)
● ...
Samples of Apps Generation
● Appsbar (http://www.appsbar.com/)
● AppInstitute (https://appinstitute.com/)
● Appypie (https://www.appypie.com/)
● BuildFire (https://buildfire.com/)
● iBuildApp (https://ibuildapp.com/)
● Kinetize* (https://www.kinetise.com/)
● MIT App Inventor (http://appinventor.mit.edu/explore/)
● MobinCube (https://www.mobincube.com/)
● …
* Source code
Current State
Apps / Business Processes
Samples of Rapid App Development
● OpenXava (https://www.openxava.org/)
● Spring Roo (https://projects.spring.io/spring-roo/)
● Xojo (https://xojo.com)
● …
Samples of Business Processes, Workflows
● Activiti (https://www.activiti.org/)
● Camunda (https://camunda.com/)
● ...
Current State
Machine Learning & Code Generation
Machine Learning & Code Generation (UI)
● AirBnb Sketching Interfaces (https://airbnb.design/sketching-interfaces/,
https://www.youtube.com/watch?v=3MPc3PZ6dc4)
● Microsoft Sketch2Code (https://sketch2code.azurewebsites.net/,
https://www.youtube.com/watch?v=V6pqqPPHyYM)
● Pix2code (https://uizard.io/research/#pix2code,
https://www.youtube.com/watch?v=pqKeXkhFA3I)
● TeleportHQ (https://teleporthq.io/,
https://www.youtube.com/watch?v=_oet4GOzcRQ)
● ...
TeleportHQ
Machine Learning & Code Generation (Research)
● Awesome Machine Learning On Source Code
(https://github.com/src-d/awesome-machine-learning-on-source-code)
● Artificial Intelligence and auto-generation of code
(https://www.theseus.fi/bitstream/handle/10024/149252/report_v2.pdf?sequen
ce=1&isAllowed=y)
● DeepCoder: Learning to write programs
(https://openreview.net/pdf?id=ByldLrqlx)
● Using Machine Learning to Explore Neural Network Architecture
(https://ai.googleblog.com/2017/05/using-machine-learning-to-explore.html)
● ...
Machine Learning & Code Generation (Research)
● BAYOU - Neural sketch learning for conditional program generation
(http://www.askbayou.com/, https://arxiv.org/pdf/1703.05698.pdf)
● Prophet: Automatic Patch Generation by Learning Correct Code
(http://people.csail.mit.edu/rinard/paper/popl16.pdf)
● Intelligent code reviews using deep learning
(https://www.kdd.org/kdd2018/files/deep-learning-day/DLDay18_paper_40.pdf)
● Using Domain Specific Languages for Deep Learning Code Generation
(http://www.digital.hull.ac.uk/posters/DEFine-DSL-Poster-A0.pdf)
● ...
askbayou
Current State
Tools and methodologies for IT
Categorizations of Generators
● License
● Implementation Language
● Platform (windows, mac, linux, cross-platform)
● Active (generate always) / Passive (generate once)
● Input (UI, UML, XML, code, templates, text, shell commands, etc.)
● Output (Coding language, CSS, HTML, Documentation, Spreadsheet, etc.)
● Model
Categorization of Generators Models
● Code Munger (e.g. XDoclet)
● Inline code expander (e.g. ProC)
● Mixed code generator (e.g. Wizards)
● Partial class generator (works with abstract definitions)
● Tier generator (to be used as-is)
Generation Options
● Ad hoc
● Scaffolders
● Build-test-package
● Infrastructure
● DSL (Domain-specific language)
● Metaprogramming
● Model-Driven Architecture
Ad hoc
● IDE
● Build time (i.e. QueryDSL, Lombok, etc.)
● Quick and dirty solution (script, code)
● ...
Scaffolders
● Maven archetypes (https://maven.apache.org/archetypes/)
● Spring Initializr (https://start.spring.io/)
● Trinity for Java (https://github.com/oregor-projects/trinity-scaffolder-java)
● Yeoman (http://yeoman.io/)
● ...
Build-test-package
● CMake (https://cmake.org/)
● Gradle (https://gradle.org/)
● ...
Infrastructure
● Ansible (https://www.ansible.com/)
● Chef (https://www.chef.io/products/chef-infra/)
● Puppet (https://puppet.com/)
● Terraform (https://www.terraform.io/)
● ...
Samples of DSL Generation
● Jetbrains MPS (https://www.jetbrains.com/mps/)
● Xtext (https://www.eclipse.org/Xtext/)
● ...
Metaprogramming Languages
● Roslyn (https://github.com/dotnet/roslyn)
● Racket (https://racket-lang.org/)
● Julia (https://www.julialang.org/)
● ...
Model-Driven Architecture (MDA)
An Object Management Group (OMG) Standard
MDA Models
● Computation Independent Model (CIM)
● Platform Independent Model (PIM)
● Platform Specific Model (PSM)
The general pattern
Samples of Model-Driven code generation
● Acceleo (https://www.eclipse.org/acceleo)
● Celerio (https://www.jaxio.com/en/celerio.html)
● LLBLGen (https://www.llblgen.com)
● Telosys (http://www.telosys.org)
● Umple (https://cruise.eecs.uottawa.ca/umple/)
● ...
Comparison of code generation tools
https://en.wikipedia.org/wiki/Comparison_of_code_generation_tools
Common drawbacks of most Model-Driven tools
● Data-centric (focused on CRUD)
● Intrusive
● Lack of support for modern technologies such as microservices and
event-driven architectures
● Functional within specific IDEs
● Functional for specific platforms
The ideal solution
● Free & Open Source
● Cross-platform tool
● Cross-language source code generation
● No constraints (template engine, technology, IDE, etc.)
● Generation from single files to full apps
● Clean generated source code agnostic of generation tool
● Support of modern architectures and microservices
● Extensible (models, generators, etc.)
● Able to support Machine Learning and future technologies
The Software Lifecycle
The Software Lifecycle Rephrased
PolyGenesis Platform Core: High-Level Architecture
Why “Platform”?
Allows to use and develop any:
● Abstraction: High level specifications
● Metamodel: Model of concept / technology (e.g. REST, Domain, etc.)
● Deducer: Populates metamodels based on abstractions
● Generator: Transforms metamodels into specific output (e.g. source-code,
spreadsheet, etc.)
Data Model
Behavior-Driven Abstractions.
A novel approach
Why “Behavior-Driven”?
● Behavior-Driven Design
● Behavior-Driven Testing
● Task-based UIs
● Object-oriented programing done right
● Domain-driven design
● ...
What are “Behaviors” in technical terms?
Functions
What is a “function”?
Function is an activity that is natural to or the
purpose of a person or thing.
Google
What is a “function” closer to programming?
Function is an activity to or the purpose of a thing.
The anatomy of a function in programming
Optional<Data> functionName(Optional<Data> Arg 1, ...., N){
function body (Activity)
Optional<Data> ReturnValue
}
What is a “function” in programming?
Function is an activity to or the purpose of a thing,
which consists of a name, optional arguments (input
data) and optional return value (output data)
The elements of a function in programming
● Activity
● Purpose
● Thing
● Name
● Arguments (Input Data)
● Return Value (Output Data)
The Function Model
The “Purpose”
The “Activity”
Key-values metadata supporting the generation process
What is a “Thing”?
● Business feature
● Technical feature
● Concept / Idea
● Anything
Thing: A Behavior-Driven Abstraction
Thing Properties
● Automatically derived by function arguments (and purpose)
● Extra properties can manually be added
Thing Context
● Groups things together
● Useful for splitting a big model into smaller ones (a.k.a bounded contexts,
microservices)
● Useful for supporting domain messages (events / commands)
The “Abstraction Scope”
Deducers: Driving the Metamodels
Generators Architecture
Template Data
Activity Generators Architecture
What comes out of the box?
Current Metamodels (and 1:1 Deducers)
Generators
● Angular Material
● Trinity Backend for Java
The Trinity Architecture
The Trinity Architecture
How can i start using Polygenesis?
By handling the responsibility
How to handle the responsibility
● First, address the problem by hand
● Understand the concepts (abstractions, deducers, metamodels, generators)
● Most likely existing concepts will not fit 100% to your needs
● Be ready to develop your own implementations of the concepts
● Make it first-class citizen in your development efforts
● Generate only what you need when you need it
● Adjust the generation process as the project evolves
Generation accuracy reflects the
modeling accuracy
Pair-programming with PolyGenesis
Future Plans
Short-term Plans
● Stabilize the Platform
● Stabilize the Trinity Java Generator
● Angular Generator, UI & Page Objects Metamodels
● Documentation
● Explore alternative inputs instead of DSL
Mid-term Plans
● Rules
● Processes / Workflows
● Selenium
● Postman
● Migration Scripts (tracking changes)
● Merge functionality
● Infrastructure as code
● Explore / POC with Machine Learning
(https://blog.floydhub.com/turning-design-mockups-into-code-with-deep-learni
ng/)
Long-term Plans
Upcoming meetups
● Demos
● Testing & Page Object Metamodel
● Domain-Driven Design Metamodel and Microservices
● Event-Driven Architectures and Orchestration vs Choreography Metamodels
● The Trinity Architecture
● ...
Suggestions / Requests / Contribute?
https://www.linkedin.com/in/tsakostas/
ct@polygenesis.io
Resources
● Polygenesis Website: https://polygenesis.io/
● PolyGenesis Platform:
https://github.com/polygenesis-projects/polygenesis-platform
● The Trinity Architecture:
https://medium.com/oregor/the-trinity-architecture-c89ed5743c1e
● Trinity Scaffolder for Java:
https://github.com/oregor-projects/trinity-scaffolder-java
● Trinity4J: https://github.com/oregor-projects/trinity4j
● Example of Code Generated by PolyGenesis:
https://github.com/oregor-projects/trinity-demo-java
“For the things we have to learn before we
can do them, we learn by doing them.”
-Aristotle, The Nicomachean Ethics
Thank you!

Mais conteúdo relacionado

Mais procurados

Drowsiness Detection using machine learning (1).pptx
Drowsiness Detection using machine learning (1).pptxDrowsiness Detection using machine learning (1).pptx
Drowsiness Detection using machine learning (1).pptx
sathiyasowmi
 
AUTOMATIC LICENSE PLATE RECOGNITION SYSTEM FOR INDIAN VEHICLE IDENTIFICATION ...
AUTOMATIC LICENSE PLATE RECOGNITION SYSTEM FOR INDIAN VEHICLE IDENTIFICATION ...AUTOMATIC LICENSE PLATE RECOGNITION SYSTEM FOR INDIAN VEHICLE IDENTIFICATION ...
AUTOMATIC LICENSE PLATE RECOGNITION SYSTEM FOR INDIAN VEHICLE IDENTIFICATION ...
Kuntal Bhowmick
 
“Responsible AI: Tools and Frameworks for Developing AI Solutions,” a Present...
“Responsible AI: Tools and Frameworks for Developing AI Solutions,” a Present...“Responsible AI: Tools and Frameworks for Developing AI Solutions,” a Present...
“Responsible AI: Tools and Frameworks for Developing AI Solutions,” a Present...
Edge AI and Vision Alliance
 

Mais procurados (20)

Skin Cancer Detection Using Deep Learning Techniques
Skin Cancer Detection Using Deep Learning TechniquesSkin Cancer Detection Using Deep Learning Techniques
Skin Cancer Detection Using Deep Learning Techniques
 
Future of AI - 2023 07 25.pptx
Future of AI - 2023 07 25.pptxFuture of AI - 2023 07 25.pptx
Future of AI - 2023 07 25.pptx
 
Machine learning
Machine learningMachine learning
Machine learning
 
Soft computing
Soft computing Soft computing
Soft computing
 
Drowsiness Detection using machine learning (1).pptx
Drowsiness Detection using machine learning (1).pptxDrowsiness Detection using machine learning (1).pptx
Drowsiness Detection using machine learning (1).pptx
 
Number plate recogition
Number plate recogitionNumber plate recogition
Number plate recogition
 
AUTOMATIC LICENSE PLATE RECOGNITION SYSTEM FOR INDIAN VEHICLE IDENTIFICATION ...
AUTOMATIC LICENSE PLATE RECOGNITION SYSTEM FOR INDIAN VEHICLE IDENTIFICATION ...AUTOMATIC LICENSE PLATE RECOGNITION SYSTEM FOR INDIAN VEHICLE IDENTIFICATION ...
AUTOMATIC LICENSE PLATE RECOGNITION SYSTEM FOR INDIAN VEHICLE IDENTIFICATION ...
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Intro/Overview on Machine Learning Presentation
Intro/Overview on Machine Learning PresentationIntro/Overview on Machine Learning Presentation
Intro/Overview on Machine Learning Presentation
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Deep Learning for Natural Language Processing
Deep Learning for Natural Language ProcessingDeep Learning for Natural Language Processing
Deep Learning for Natural Language Processing
 
Machine learning
Machine learningMachine learning
Machine learning
 
Facial recognition system
Facial recognition systemFacial recognition system
Facial recognition system
 
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
Introduction Artificial Intelligence a modern approach by Russel and Norvig 1
 
“Responsible AI: Tools and Frameworks for Developing AI Solutions,” a Present...
“Responsible AI: Tools and Frameworks for Developing AI Solutions,” a Present...“Responsible AI: Tools and Frameworks for Developing AI Solutions,” a Present...
“Responsible AI: Tools and Frameworks for Developing AI Solutions,” a Present...
 
Generative AI for the rest of us
Generative AI for the rest of usGenerative AI for the rest of us
Generative AI for the rest of us
 
Spell checker using Natural language processing
Spell checker using Natural language processing Spell checker using Natural language processing
Spell checker using Natural language processing
 
Housing price prediction
Housing price predictionHousing price prediction
Housing price prediction
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Saksham seminar report
Saksham seminar reportSaksham seminar report
Saksham seminar report
 

Semelhante a Shaping the Future of Automatic Programming

Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
Rodrigo Gil
 
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
Ron Munitz
 
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and MockitoQCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
Szczepan Faber
 

Semelhante a Shaping the Future of Automatic Programming (20)

Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
 
DrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low CodeDrupalCon Europe 2020 Low Code
DrupalCon Europe 2020 Low Code
 
Os hardware meets os software
Os hardware meets os softwareOs hardware meets os software
Os hardware meets os software
 
Combining Machine Learning with Physical Computing - June 2023
Combining Machine Learning with Physical Computing - June 2023Combining Machine Learning with Physical Computing - June 2023
Combining Machine Learning with Physical Computing - June 2023
 
SWAD-24-years.pdf
SWAD-24-years.pdfSWAD-24-years.pdf
SWAD-24-years.pdf
 
Cutting edge of web technology
Cutting edge of web technologyCutting edge of web technology
Cutting edge of web technology
 
Elm at large (companies)
Elm at large (companies)Elm at large (companies)
Elm at large (companies)
 
Interconnection Automation For All - Extended - MPS 2023
Interconnection Automation For All - Extended - MPS 2023Interconnection Automation For All - Extended - MPS 2023
Interconnection Automation For All - Extended - MPS 2023
 
Introduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OKIntroduction to DevOps and the Practical Use Cases at Credit OK
Introduction to DevOps and the Practical Use Cases at Credit OK
 
Tolunay Mengi CV - English - 07.07.2022.pdf
Tolunay Mengi CV - English - 07.07.2022.pdfTolunay Mengi CV - English - 07.07.2022.pdf
Tolunay Mengi CV - English - 07.07.2022.pdf
 
Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016Not Your Fathers C - C Application Development In 2016
Not Your Fathers C - C Application Development In 2016
 
GWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO ToolsGWT - Building Rich Internet Applications Using OO Tools
GWT - Building Rich Internet Applications Using OO Tools
 
LAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoTLAS16-108: JerryScript and other scripting languages for IoT
LAS16-108: JerryScript and other scripting languages for IoT
 
Build and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsBuild and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 Mins
 
Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019Workshop About Software Engineering Skills 2019
Workshop About Software Engineering Skills 2019
 
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
 
IT Career Planning v2
IT Career Planning v2IT Career Planning v2
IT Career Planning v2
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and MockitoQCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
QCon'17 talk: CI/CD at scale - lessons from LinkedIn and Mockito
 
Making machine learning model deployment boring - Big Data Expo 2019
Making machine learning model deployment boring - Big Data Expo 2019Making machine learning model deployment boring - Big Data Expo 2019
Making machine learning model deployment boring - Big Data Expo 2019
 

Último

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Último (20)

8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 

Shaping the Future of Automatic Programming

  • 1. Shaping the Future of Automatic Programming Christos Tsakostas ct@polygenesis.io #1 Automatic Programming Meetup, June 19th 2019, Athens GR
  • 2. https://arxiv.org/pdf/1712.00676.pdf https://jaxenter.com/coding-in-2014-interview-billings-140066.html “Good code generators will be the most helpful and useful tools for coding by 2040” Jay Jay Billings, Alexander J. McCaskey, Geoffroy Vallee, and Greg Watson Oak Ridge National Laboratory
  • 3. Agenda - Goals of the “Automatic Programming” meetup - Introduction - Brief overview of the current state for generation - PolyGenesis - Future plans and resources If you have any question, interrupt me!
  • 4. Meetup Sponsor ViaBill A/S (https://viabill.com/) is a FinTech company providing seamless financing. Currently available in Denmark, Norway, the United States of America and available soon in more countries. For job openings contact the CTO Allan Noer an@viabill.com
  • 5. Goals of the “Automatic Programming” meetup
  • 6. Mindset: Can you handle the responsibility? ● Embracing automatic programming is about handling the responsibility ● Code generators are not magic ● No code generator is good enough for your case ● Efficient generators require efficient modeling ● Be ready to model your case
  • 7. Promote automation in software lifecycle ● Requirements ● Analysis ● Design ● Coding ● Testing ● Deployment
  • 8. Acquire deep knowledge about modern best practices ● Microservices ● Event-driven architectures ● Event Sourcing / CQRS ● Automated Testing ● Infrastructure as code ● Domain-driven design ● Behavior-driven design ● ...etc.
  • 9. Explore current and future technologies in automation ● Artificial Intelligence ● Machine Learning ● Deep Learning ● Computer Vision ● … etc.
  • 10. Learn about PolyGenesis ● Present and enhance PolyGenesis ● An everyday companion tool for development
  • 11. Promote Collaboration ● Bring people together, interested in automatic programming ● Hands-on workshops ● Open to new ideas, discussions and presentations
  • 13. What is Automatic Programming? In computer science, the term automatic programming identifies a type of computer programming in which some mechanism generates a computer program to allow human programmers to write the code at a higher abstraction level. Wikipedia
  • 14. Brief History of Automatic Programming ● 1940s: Automation of punching paper tape ● 1950s: Translation of high-level programming languages (i.e. Fortran) ● 1960s: Autocode: "simplified coding systems" ● 1960s/1970s: Generative Programming ● 1980s: Source-to-source compiler ● 1980s/1990s: Source-code generation ● 1990s/2000s: Low-code development ● 2010s: No-code development ● 2010s: Machine Learning & Programming / Code Generation
  • 15. Why Automatic Programming? ● Productivity ● Quality ● Consistency ● Less coding (in Higher Abstraction Level)
  • 16. Concerns with automatic programming ● Doing too much ● Not working with existing code bases ● Quality of output code ● Replace developers ● Complexity ● Technology support ● Maintenance ● Cost Valid unless… you can handle the responsibility
  • 17. If you “own” a generator ● It can do exactly what you need ● You can make it work with your existing code bases ● You can control the quality of output code ● It will definitely not replace you! ● You can tackle complexity ● You can support any technology ● You will maintain it ● With no extra cost
  • 19. Brief overview of the current state for generation
  • 20. Current State 1. Apps / Websites - for end / business users & IT 2. Apps / Business Processes - for business users & IT 3. Machine Learning - for researchers & IT 4. Tools and methodologies - for IT
  • 22. Samples of Website Generation ● Static website generation (e.g. Jekyll: https://jekyllrb.com) ● emyspot (https://www.emyspot.com) ● Wix (https://www.wix.com) ● ...
  • 23. Samples of Apps Generation ● Appsbar (http://www.appsbar.com/) ● AppInstitute (https://appinstitute.com/) ● Appypie (https://www.appypie.com/) ● BuildFire (https://buildfire.com/) ● iBuildApp (https://ibuildapp.com/) ● Kinetize* (https://www.kinetise.com/) ● MIT App Inventor (http://appinventor.mit.edu/explore/) ● MobinCube (https://www.mobincube.com/) ● … * Source code
  • 24. Current State Apps / Business Processes
  • 25. Samples of Rapid App Development ● OpenXava (https://www.openxava.org/) ● Spring Roo (https://projects.spring.io/spring-roo/) ● Xojo (https://xojo.com) ● …
  • 26. Samples of Business Processes, Workflows ● Activiti (https://www.activiti.org/) ● Camunda (https://camunda.com/) ● ...
  • 27. Current State Machine Learning & Code Generation
  • 28. Machine Learning & Code Generation (UI) ● AirBnb Sketching Interfaces (https://airbnb.design/sketching-interfaces/, https://www.youtube.com/watch?v=3MPc3PZ6dc4) ● Microsoft Sketch2Code (https://sketch2code.azurewebsites.net/, https://www.youtube.com/watch?v=V6pqqPPHyYM) ● Pix2code (https://uizard.io/research/#pix2code, https://www.youtube.com/watch?v=pqKeXkhFA3I) ● TeleportHQ (https://teleporthq.io/, https://www.youtube.com/watch?v=_oet4GOzcRQ) ● ...
  • 30. Machine Learning & Code Generation (Research) ● Awesome Machine Learning On Source Code (https://github.com/src-d/awesome-machine-learning-on-source-code) ● Artificial Intelligence and auto-generation of code (https://www.theseus.fi/bitstream/handle/10024/149252/report_v2.pdf?sequen ce=1&isAllowed=y) ● DeepCoder: Learning to write programs (https://openreview.net/pdf?id=ByldLrqlx) ● Using Machine Learning to Explore Neural Network Architecture (https://ai.googleblog.com/2017/05/using-machine-learning-to-explore.html) ● ...
  • 31. Machine Learning & Code Generation (Research) ● BAYOU - Neural sketch learning for conditional program generation (http://www.askbayou.com/, https://arxiv.org/pdf/1703.05698.pdf) ● Prophet: Automatic Patch Generation by Learning Correct Code (http://people.csail.mit.edu/rinard/paper/popl16.pdf) ● Intelligent code reviews using deep learning (https://www.kdd.org/kdd2018/files/deep-learning-day/DLDay18_paper_40.pdf) ● Using Domain Specific Languages for Deep Learning Code Generation (http://www.digital.hull.ac.uk/posters/DEFine-DSL-Poster-A0.pdf) ● ...
  • 33. Current State Tools and methodologies for IT
  • 34. Categorizations of Generators ● License ● Implementation Language ● Platform (windows, mac, linux, cross-platform) ● Active (generate always) / Passive (generate once) ● Input (UI, UML, XML, code, templates, text, shell commands, etc.) ● Output (Coding language, CSS, HTML, Documentation, Spreadsheet, etc.) ● Model
  • 35. Categorization of Generators Models ● Code Munger (e.g. XDoclet) ● Inline code expander (e.g. ProC) ● Mixed code generator (e.g. Wizards) ● Partial class generator (works with abstract definitions) ● Tier generator (to be used as-is)
  • 36. Generation Options ● Ad hoc ● Scaffolders ● Build-test-package ● Infrastructure ● DSL (Domain-specific language) ● Metaprogramming ● Model-Driven Architecture
  • 37. Ad hoc ● IDE ● Build time (i.e. QueryDSL, Lombok, etc.) ● Quick and dirty solution (script, code) ● ...
  • 38. Scaffolders ● Maven archetypes (https://maven.apache.org/archetypes/) ● Spring Initializr (https://start.spring.io/) ● Trinity for Java (https://github.com/oregor-projects/trinity-scaffolder-java) ● Yeoman (http://yeoman.io/) ● ...
  • 39. Build-test-package ● CMake (https://cmake.org/) ● Gradle (https://gradle.org/) ● ...
  • 40. Infrastructure ● Ansible (https://www.ansible.com/) ● Chef (https://www.chef.io/products/chef-infra/) ● Puppet (https://puppet.com/) ● Terraform (https://www.terraform.io/) ● ...
  • 41. Samples of DSL Generation ● Jetbrains MPS (https://www.jetbrains.com/mps/) ● Xtext (https://www.eclipse.org/Xtext/) ● ...
  • 42. Metaprogramming Languages ● Roslyn (https://github.com/dotnet/roslyn) ● Racket (https://racket-lang.org/) ● Julia (https://www.julialang.org/) ● ...
  • 43. Model-Driven Architecture (MDA) An Object Management Group (OMG) Standard
  • 44. MDA Models ● Computation Independent Model (CIM) ● Platform Independent Model (PIM) ● Platform Specific Model (PSM)
  • 46. Samples of Model-Driven code generation ● Acceleo (https://www.eclipse.org/acceleo) ● Celerio (https://www.jaxio.com/en/celerio.html) ● LLBLGen (https://www.llblgen.com) ● Telosys (http://www.telosys.org) ● Umple (https://cruise.eecs.uottawa.ca/umple/) ● ...
  • 47. Comparison of code generation tools https://en.wikipedia.org/wiki/Comparison_of_code_generation_tools
  • 48. Common drawbacks of most Model-Driven tools ● Data-centric (focused on CRUD) ● Intrusive ● Lack of support for modern technologies such as microservices and event-driven architectures ● Functional within specific IDEs ● Functional for specific platforms
  • 49. The ideal solution ● Free & Open Source ● Cross-platform tool ● Cross-language source code generation ● No constraints (template engine, technology, IDE, etc.) ● Generation from single files to full apps ● Clean generated source code agnostic of generation tool ● Support of modern architectures and microservices ● Extensible (models, generators, etc.) ● Able to support Machine Learning and future technologies
  • 50.
  • 53. PolyGenesis Platform Core: High-Level Architecture
  • 54. Why “Platform”? Allows to use and develop any: ● Abstraction: High level specifications ● Metamodel: Model of concept / technology (e.g. REST, Domain, etc.) ● Deducer: Populates metamodels based on abstractions ● Generator: Transforms metamodels into specific output (e.g. source-code, spreadsheet, etc.)
  • 57. Why “Behavior-Driven”? ● Behavior-Driven Design ● Behavior-Driven Testing ● Task-based UIs ● Object-oriented programing done right ● Domain-driven design ● ...
  • 58. What are “Behaviors” in technical terms? Functions
  • 59. What is a “function”? Function is an activity that is natural to or the purpose of a person or thing. Google
  • 60. What is a “function” closer to programming? Function is an activity to or the purpose of a thing.
  • 61. The anatomy of a function in programming Optional<Data> functionName(Optional<Data> Arg 1, ...., N){ function body (Activity) Optional<Data> ReturnValue }
  • 62. What is a “function” in programming? Function is an activity to or the purpose of a thing, which consists of a name, optional arguments (input data) and optional return value (output data)
  • 63. The elements of a function in programming ● Activity ● Purpose ● Thing ● Name ● Arguments (Input Data) ● Return Value (Output Data)
  • 66. The “Activity” Key-values metadata supporting the generation process
  • 67. What is a “Thing”? ● Business feature ● Technical feature ● Concept / Idea ● Anything
  • 69. Thing Properties ● Automatically derived by function arguments (and purpose) ● Extra properties can manually be added
  • 70. Thing Context ● Groups things together ● Useful for splitting a big model into smaller ones (a.k.a bounded contexts, microservices) ● Useful for supporting domain messages (events / commands)
  • 72. Deducers: Driving the Metamodels
  • 76. What comes out of the box?
  • 77. Current Metamodels (and 1:1 Deducers)
  • 78. Generators ● Angular Material ● Trinity Backend for Java
  • 81. How can i start using Polygenesis?
  • 82. By handling the responsibility
  • 83. How to handle the responsibility ● First, address the problem by hand ● Understand the concepts (abstractions, deducers, metamodels, generators) ● Most likely existing concepts will not fit 100% to your needs ● Be ready to develop your own implementations of the concepts ● Make it first-class citizen in your development efforts ● Generate only what you need when you need it ● Adjust the generation process as the project evolves
  • 84. Generation accuracy reflects the modeling accuracy
  • 87. Short-term Plans ● Stabilize the Platform ● Stabilize the Trinity Java Generator ● Angular Generator, UI & Page Objects Metamodels ● Documentation ● Explore alternative inputs instead of DSL
  • 88. Mid-term Plans ● Rules ● Processes / Workflows ● Selenium ● Postman ● Migration Scripts (tracking changes) ● Merge functionality ● Infrastructure as code ● Explore / POC with Machine Learning (https://blog.floydhub.com/turning-design-mockups-into-code-with-deep-learni ng/)
  • 90. Upcoming meetups ● Demos ● Testing & Page Object Metamodel ● Domain-Driven Design Metamodel and Microservices ● Event-Driven Architectures and Orchestration vs Choreography Metamodels ● The Trinity Architecture ● ...
  • 91. Suggestions / Requests / Contribute? https://www.linkedin.com/in/tsakostas/ ct@polygenesis.io
  • 92. Resources ● Polygenesis Website: https://polygenesis.io/ ● PolyGenesis Platform: https://github.com/polygenesis-projects/polygenesis-platform ● The Trinity Architecture: https://medium.com/oregor/the-trinity-architecture-c89ed5743c1e ● Trinity Scaffolder for Java: https://github.com/oregor-projects/trinity-scaffolder-java ● Trinity4J: https://github.com/oregor-projects/trinity4j ● Example of Code Generated by PolyGenesis: https://github.com/oregor-projects/trinity-demo-java
  • 93. “For the things we have to learn before we can do them, we learn by doing them.” -Aristotle, The Nicomachean Ethics Thank you!