improving software languages: usage patterns to the rescue

26
Who needs languages when you have patterns? Jordi Cabot

Upload: jordi-cabot

Post on 14-Aug-2015

385 views

Category:

Software


1 download

TRANSCRIPT

Who needs languages when you have patterns?

Jordi Cabot

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

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

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

1.Measuring WordPress

Flickr/ SeanMacEntee

1.The problem with patterns

A very popular research topic

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

E.g. Conceptual Modelling Patterns for Roles

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

Aspect of all pattern-related stats

1.Measuring WordPress

Flickr/ SeanMacEntee

2.The problem with patterns

2.Top down vs bottom up patterns

“Top down patterns are

abstractions that supposedly solve a real problem.

“Bottom up (or usage) patterns

are generalizations of real solutions for a problem.

Bottom up vs top down patterns

3.Let’s use bottom-up patterns!

Flickr/JDHancock

Languages are complicated

“Patterns are NOT for

people. Patterns are for Languages

Imagine a Language

is like a cheese

Flickr/ RobertDavies

Let’s see what bottom-up patterns

can do for your cheese

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)

“Uncommon elements can be removed from the language

“Clusters suggest the existence

of sublanguages

“Complex structures could be

simplified with new primitives

4.Building languages people actually enjoy

Flickr/JamesCridland

“Power to

the people

© Apple Records

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

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)

Let’s work

[email protected]

@softmodeling

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