programming languages and their influence in thinking
TRANSCRIPT
![Page 1: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/1.jpg)
agile software development & services
Los Lenguajes de Programación y su Impacto
en el Pensamiento
Hernán Wilkinson
Twitter: @HernanWilkinsonBlog: objectmodels.blogspot.com
www.10pines.com
![Page 2: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/2.jpg)
The world “we live” in … ?
![Page 3: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/3.jpg)
The world “we live” in … ?
![Page 4: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/4.jpg)
The world “we live” in … ?
![Page 5: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/5.jpg)
The world “we live” in … ?
![Page 6: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/6.jpg)
Bret Victor - Thinking the unthinkable
![Page 7: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/7.jpg)
Language <-> Thinking
![Page 8: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/8.jpg)
What we can not talk about…we can not think about
(or it is difficult...)
![Page 9: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/9.jpg)
Do not Insist on English
![Page 10: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/10.jpg)
Aimara: Pasado y Futuro (nayra) (qhipa)
![Page 11: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/11.jpg)
![Page 12: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/12.jpg)
What is the relationship with Programming Languages?
(K. Iverson: “Notation as a tool of thought”1979 ACM Turing Award)
![Page 13: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/13.jpg)
If a programming language does not allow me to “TALK”
(write) about certain things
…Then I can not THINK
about certain solutions
![Page 14: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/14.jpg)
Let’s seeLi st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;f or ( Cust omer cust omer : cust omer s)
i f ( cust omer . nameSt ar sWi t h( “ H” ) )sel ect edCust omer s. add ( cust omer ) ;
r et ur n sel ect edCust omer s;
![Page 15: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/15.jpg)
Let’s seeLi st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;f or ( Cust omer cust omer : cust omer s)
i f ( cust omer . nameSt ar sWi t h( “ H” ) )sel ect edCust omer s. add ( cust omer ) ;
r et ur n sel ect edCust omer s;
Li st <Account > sel ect edAccount s = new Ar r ayLi st <Account > ( ) ;f or ( Account account : account s)
i f ( account . i sOver dr aw( ) )sel ect edAccount s. add( account ) ;
r et ur n sel ect edAccount ;
![Page 16: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/16.jpg)
Let’s seeLi st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;f or ( Cust omer cust omer : cust omer s)
i f ( cust omer . nameSt ar sWi t h( “ H” ) )sel ect edCust omer s. add ( cust omer ) ;
r et ur n sel ect edCust omer s;
Li st <Account > sel ect edAccount s = new Ar r ayLi st <Account > ( ) ;f or ( Account account : account s)
i f ( account . i sOver dr aw( ) )sel ect edAccount s. add( account ) ;
r et ur n sel ect edAccount ;
What is the problem?
![Page 17: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/17.jpg)
We have repeated code!Li st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;f or ( Cust omer cust omer : cust omers )
i f ( cust omer. nameSt arsWi t h(“H”) )sel ect edCust omer s. add ( cust omer ) ;
r et ur n sel ect edCust omer s;
Li st <Account > sel ect edAccount s = new Ar r ayLi st <Account > ( ) ;f or ( Account account : account s )
i f ( account . i sOverdraw() )sel ect edAccount s. add( account ) ;
r et ur n sel ect edAccount ;
![Page 18: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/18.jpg)
Code != Text
![Page 19: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/19.jpg)
How do we remove it?
![Page 20: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/20.jpg)
Technique:1. “Contextualize-Copy” the repeated
code to some “place”2. Parameterize what changes3. NAME IT!!!4. Use it :-)
![Page 21: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/21.jpg)
c l ass Col l ect i on<T> {
publ i c Col l ect i on<T> <<NAME>> ( ? ) {
Li st <T> sel ect ed = new Ar r ayLi st <T> ( ) ;f or ( T anObj ect : t hi s )
i f ( )sel ect ed. add ( anObj ect ) ;
r et ur n sel ect ed: }
this
Copy the repeated code to some placeLi st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;
f or ( Cust omer cust omer : cust omers )
i f ( cust omer. nameSt arsWi t h(“H”) )
sel ect edCust omer s. add( cust omer ) ;
r et ur n sel ect edCust omer s;
Li st <Account > sel ect edAccount s = new Ar r ayLi st <Account > ( ) ;
f or ( Account account : account s )
i f ( account . i sOverdraw() )
sel ect edAccount s. add( account ) ;
r et ur n sel ect edAccount ;
![Page 22: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/22.jpg)
Parameterize what changes
Li st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;f or ( Cust omer cust omer : cust omer s)
i f ( cust omer. nameSt arsWi t h(“H”) )sel ect edCust omer s. add ( cust omer ) ;
r et ur n sel ect edCust omer s;
Li st <Account > sel ect edAccount s = new Ar r ayLi st <Account > ( ) ;f or ( Account account : account s)
i f ( account . i sOverdraw() )sel ect edAccount s. add( account ) ;
r et ur n sel ect edAccount ;
How do we do it?
![Page 23: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/23.jpg)
An object that represents “code”
![Page 24: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/24.jpg)
c l ass Col l ect i on<T> {
publ i c Col l ect i on<T> <<NAME>> ( Cl osure aCl osure) {
Li st <T> sel ect ed = new Ar r ayLi st <T> ( ) ;f or ( T anObj ect : t hi s )
i f ( )sel ect ed. add ( anObj ect ) ;
r et ur n sel ect ed: }
this
Copy the repeated code to some placeLi st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;
f or ( Cust omer cust omer : cust omers )
i f ( cust omer. nameSt arsWi t h(“H”) )
sel ect edCust omer s. add( cust omer ) ;
r et ur n sel ect edCust omer s;
Li st <Account > sel ect edAccount s = new Ar r ayLi st <Account > ( ) ;
f or ( Account account : account s )
i f ( account . i sOverdraw() )
sel ect edAccount s. add( account ) ;
r et ur n sel ect edAccount ;
aClosure.execute(anObject)
![Page 25: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/25.jpg)
c l ass Col l ect i on<T> {
publ i c Col l ect i on<T> sel ect ( Cl osure aCl osure) {
Li st <T> sel ect ed = new Ar r ayLi st <T> ( ) ;f or ( T anObj ect : t hi s )
i f ( )sel ect ed. add ( anObj ect ) ;
r et ur n sel ect ed: }
self
NAME IT!Li st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;
f or ( Cust omer cust omer : cust omers )
i f ( cust omer. nameSt arsWi t h(“H”) )
sel ect edCust omer s. add( cust omer ) ;
r et ur n sel ect edCust omer s;
Li st <Account > sel ect edAccount s = new Ar r ayLi st <Account > ( ) ;
f or ( Account account : account s )
i f ( account . i sOverdraw() )
sel ect edAccount s. add( account ) ;
r et ur n sel ect edAccount ;
aClosure.execute(anObject)
The most difficult part because it means that we understood the repeated code
meaning
![Page 26: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/26.jpg)
Li st <Cust omer > sel ect edCust omer s = new Ar r ayLi st <Cust omer > ( ) ;f or ( Cust omer cust omer : cust omer s)
i f ( cust omer . nameSt ar sWi t h( “ H” ) )sel ect edCust omer s. add ( cust omer ) ;
r et ur n sel ect edCust omer s;
Li st <Account > sel ect edAccount s = new Ar r ayLi st <Account > ( ) ;f or ( Account account : account s)
i f ( account . i sOver dr aw( ) )sel ect edAccount s. add( account ) ;
r et ur n sel ect edAccount ;
cut omer s. sel ect ( cust omer - > cust omer . nameSt ar t sWi t h( “ H” ) )
account s. sel ect ( account - > account . i sOver dr aw( ) )
![Page 27: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/27.jpg)
What did we gain?1. Few words Simplicity, Easier to
understand, read, remember, etc. Less bugs!
2. We created a new “abstraction”: select (filter in Java 8)
3. … and we removed duplicated code!!
![Page 28: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/28.jpg)
Now… let’s do some reflection
![Page 29: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/29.jpg)
1. Because we are use to that code (is the programming language the problem or us?)
2. Because there is no “concept” to remove it
Why didn’t we see the “duplicated code”
![Page 30: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/30.jpg)
Why didn’t we came with a solution?
1. Because the programming language does not provide us with a “concept” to think about a solution!
![Page 31: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/31.jpg)
…and much much more….
Imagine how your designs would be if
you could use closures
You can create your own control flow “sintax”
Further reading: LAMBDA The Ultimate…
![Page 32: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/32.jpg)
Hamming / Closure
If there are certain objects that can not be created in some languages …
… and given the solutions provided by some programming languages…
The statement: “There are design solutions that are unthinkable in some
programming languages” ¿Does it surprise you?
![Page 33: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/33.jpg)
Meta-Conclusion
Object = ¿Data + Code?
![Page 34: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/34.jpg)
Meta-Conclusion
Object = ¿Data + Code?
If you think so, you don´t understand OO yet
![Page 35: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/35.jpg)
Meta-Conclusion
Data is an ObjectCode is an Object
An Object is a “superior” concept that unifies data and
code
![Page 36: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/36.jpg)
What is the problem?
![Page 37: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/37.jpg)
No If!
![Page 38: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/38.jpg)
Now… let’s do some reflection
![Page 39: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/39.jpg)
Why did we not see the “polymorphic message”?
Because 'if' as a reserved word is a “primitive construction”, there is nothing behind it
Therefore it does not make us think in polymorphism
![Page 40: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/40.jpg)
If as a message
![Page 41: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/41.jpg)
![Page 42: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/42.jpg)
A programming language is its creator's state of
knowledge
![Page 43: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/43.jpg)
timeToRun
![Page 44: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/44.jpg)
timeToRun
![Page 45: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/45.jpg)
timeToRun
![Page 46: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/46.jpg)
timeToRun
![Page 47: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/47.jpg)
timeToRun
![Page 48: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/48.jpg)
timeToRun
![Page 49: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/49.jpg)
timeToRun
![Page 50: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/50.jpg)
timeToRun
![Page 51: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/51.jpg)
Extending a Language!
![Page 52: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/52.jpg)
How can we add specific behavior to an object?
Let's see an example
![Page 53: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/53.jpg)
Now… let’s do some reflection
1. What are the solutions we lack due to limited meta programming?
2. What do we loose if we do not have a meta-circular language?
![Page 54: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/54.jpg)
How do we learn a new word?
![Page 55: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/55.jpg)
Do we:1. Stop our brain2. “edit" a new definition in our
dictionary3. “Compile” the new definition4. Restart our brain?
![Page 56: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/56.jpg)
NO!!
Why do we have to do it with our programs?
![Page 57: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/57.jpg)
Can our programs “change while running”?
Can our programs “learn” as we learn?
![Page 58: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/58.jpg)
Yes, they can!... If they areMETACIRCULAR
Apply
Eval
![Page 59: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/59.jpg)
If we don’t have meta-circular languages, then we can not think about solutions that are natural in
our daily lives!!
![Page 60: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/60.jpg)
Let’s think again…
Are these concepts new?
![Page 61: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/61.jpg)
Lisp
John McCarthy
Alan Kay
“We must know our historyif we don’t want to reinvent… not only the tire, but a a flat tire”
![Page 62: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/62.jpg)
Conclusions Do not accept languages without
Closures Do not accept languages without
good meta-programming Create your own extensions! Liberate yourself from the
programming language and frameworks
![Page 63: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/63.jpg)
Conclusions Learn other programming
languagesLisp/SchemeSmalltalkForth and more...
Learn our history
![Page 64: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/64.jpg)
"The Humble Programmer”E. Dijkstra
“The tools we are trying to use and the language or notation we are using to express or record our thoughts, are the major factors determining what we can think or express at all!"
![Page 65: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/65.jpg)
Questions?
![Page 66: Programming Languages and their influence in Thinking](https://reader031.vdocument.in/reader031/viewer/2022020208/55a92b941a28ab7e3e8b4645/html5/thumbnails/66.jpg)
agile software development & services
Muchas gracias!
twitter: @10Pines
Argentina
Tel.: +54 (11) 6091-3125Alem 693, 5B(1001) Buenos Aires