This document summarizes Christos Tsakostas' presentation on automatic programming at the #1 Automatic Programming Meetup in Athens, Greece on June 19th, 2019. The presentation covered the goals of promoting automation in the software lifecycle and acquiring knowledge of modern practices. It provided an overview of the current state of code generation, including tools for websites, apps, business processes, and machine learning. PolyGenesis, a platform for automatic programming, was introduced along with future plans to stabilize the platform, expand generators, and explore machine learning. Attendees were encouraged to contribute ideas and participate in future meetups on testing, domain-driven design, and event-driven architectures.
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
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
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
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
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
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)
● ...
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
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.)
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)
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)
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
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