In this presentation at PAME 2015 (STAF co-located workshop) I argue that most patterns are useless and the only ones I´m interested in are usage patterns showing how people really use a language. Then I go on to claim that these usage patterns are the key to evolve a language in order to improve its usability
Read more on: http://modeling-languages.com and http://jordicabot.com
23. 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-based
Language
Definition
Process
24. In a distant future: Conceptual ModelingAssistant
To automatetheevolutionofthe
language
-To recomnendpeoplehow touseit
-(call themrefactorings,butalways
basedondynamicusagepatterns)
26. List of creditsfor 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
Editor's Notes
To be honest this is more of a catchy title to get your attention. Still, I´ll try to say something on this topic
I have a love-hate relationships with patterns
Patterns are not always what they seem to be. They lead a double life. And I´m not the only one to realize this. You see patterns have clearly a double life and may fool you
“There are no further restrictions in your talk” <- you may regreat this
(probably my research on this
Beautiful conceptual modeling pattern that nobody uses. Even myself I´ve never used that pattern in any model I’ve ever drawn
I don´t think anybody that explicitly asks himself/herself what patterns could be applied to improve the design of what is doing. Maybe he may apply some patterns implicitly. But to me patterns are a big bubble in the community
There are tools that by analyzing the Git mirror we can measure the development progress of WordPress
“There are no further restrictions in your talk” <- you may regreat this
In theory these abstractions should come from real experiences but this is not guaranteed. And we know that introducing patterns is not free. Unfortunately, I do believe that many patterns fall in the first category
Only bottom up patterns have some interest!!!!
We have seen that only a few patterns (the bottom-up ones) are useful. Let´s see what they are useful for
The more languages you know the funnier you will find this image (taken on a French TGV)
The goal of patterns is not so much to help people write better programs/models but to help language designers to write better languages (which of course then this makes writing programs easier)
Comparison probably due to Stockholm syndrome after spending a few years in france
For that, we need to see first what kind of usage patterns we can extract for your corpus of language examples. We use techniques for clone detection to get some insights on how languages are used in practice
If nobody uses an element, hide it or move it to an advanced syntax module. Casual users do not need to get distracted by elements they are unlikely to use (e.g. iterate operator in OCL)
Several simpler langauges are easier to use than one single complex one specially given that many users will only need to learn one of the sublanguages
If many users are forced to write again and again a complex sequence of instructions, create a new primitive that covers that need in a much simpler way. For me a classical example is the complex (for me) set of Java instructions I´ve to write to read a file. I need to look it up every time on StackOverflow
To end, let’s see how all this can easily be integrated in a “people-driven” language improvement process
The more the community is involved, the better the language will be.
Example of pattern-based language definition process. Works for both GML and DSLs
e.g. when the assistant sees what you’re trying to do he could suggest refactorings for your code but again not top-down refactorings but bottom-up ones
So even if you don’t have money, please let’s talk! thanks