Top Banner
Who needs languages when you have patterns? Jordi Cabot
26
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Improving Software Languages: usage patterns to the rescue

Who needs languages when you have patterns?

Jordi Cabot

Page 2: Improving Software Languages: usage patterns to the rescue

http://pixgood.com/mr-hyde-sketch.html

Page 3: Improving Software Languages: usage patterns to the rescue

http://pixgood.com/mr-hyde-sketch.html

source: http://blog.codinghorror.com/head-first-design-patterns/

Page 4: Improving Software Languages: usage patterns to the rescue

1.Measuring WordPress

Flickr/ SeanMacEntee

1.The problem with patterns

Page 5: Improving Software Languages: usage patterns to the rescue

A very popular research topic

4.930.000 results in Google Scholar when searching for papers on design patternsI’m guilty myself!!!

Page 6: Improving Software Languages: usage patterns to the rescue

E.g. Conceptual Modelling Patterns for Roles

Page 7: Improving Software Languages: usage patterns to the rescue

“Number of patterns is >>> number of pattern users

Page 8: Improving Software Languages: usage patterns to the rescue

Aspect of all pattern-related stats

Page 9: Improving Software Languages: usage patterns to the rescue

1.Measuring WordPress

Flickr/ SeanMacEntee

2.The problem with patterns

2.Top down vs bottom up patterns

Page 10: Improving Software Languages: usage patterns to the rescue

“Top down patterns are

abstractions that supposedly solve a real problem.

Page 11: Improving Software Languages: usage patterns to the rescue

“Bottom up (or usage) patterns

are generalizations of real solutions for a problem.

Page 12: Improving Software Languages: usage patterns to the rescue

Bottom up vs top down patterns

Page 13: Improving Software Languages: usage patterns to the rescue

3.Let’s use bottom-up patterns!

Flickr/JDHancock

Page 14: Improving Software Languages: usage patterns to the rescue

Languages are complicated

Page 15: Improving Software Languages: usage patterns to the rescue

“Patterns are NOT for

people. Patterns are for Languages

Page 16: Improving Software Languages: usage patterns to the rescue

Imagine a Language

is like a cheese

Flickr/ RobertDavies

Let’s see what bottom-up patterns

can do for your cheese

Page 17: Improving Software Languages: usage patterns to the rescue

Extracting patterns : Corpus-based analysis of languages

Tells you what elements of a language are used in

practice, how those elements are typically combined together and

possible clusters Robert Tairas, Jordi Cabot:Corpus-based analysis of domain-specific languages. Software and System Modeling 14(2): 889-904 (2015)

Page 18: Improving Software Languages: usage patterns to the rescue

“Uncommon elements can be removed from the language

Page 19: Improving Software Languages: usage patterns to the rescue

“Clusters suggest the existence

of sublanguages

Page 20: Improving Software Languages: usage patterns to the rescue

“Complex structures could be

simplified with new primitives

Page 21: Improving Software Languages: usage patterns to the rescue

4.Building languages people actually enjoy

Flickr/JamesCridland

Page 22: Improving Software Languages: usage patterns to the rescue

“Power to

the people

© Apple Records

Page 23: Improving Software Languages: usage patterns to the rescue

You’re not as good as you think: Let patterns take over the design of your GL / DSL

Current Language Version

Let people use it

Uncover usage patterns

Propose modifications

* Keeping a trace of all language changes (and discussion) is also a good idea. Use Collaboro for that https://github.com/SOM-Research/collaboro

Pattern-basedLanguageDefinitionProcess

Page 24: Improving Software Languages: usage patterns to the rescue

In a distant future: Conceptual Modeling Assistant

To automate the evolution of the

language

-To recomnend people how to use it

-(call them refactorings, but always based on dynamic usage

patterns)

Page 25: Improving Software Languages: usage patterns to the rescue

Let’s work

[email protected]

@softmodeling

Page 26: Improving Software Languages: usage patterns to the rescue

List of credits for the images◎ Sad drain: https://www.flickr.com/photos/yewenyi/343846954/

◎ Canadian geese: https://www.flickr.com/photos/bobcatnorth/

◎ Punch : https://www.flickr.com/photos/timcaynes/

◎ Cheese: http://www.gianteagle.com/Grocery-Store/Cheese-Shop/

◎ Asimo: https://en.wikipedia.org/wiki/ASIMO