Unlocking the Future of AI Agents with Large Language Models
Programming Languages and their influence in Thinking
1. agile software development & services
Los Lenguajes de
Programación y su Impacto
en el Pensamiento
Hernán Wilkinson
Twitter: @HernanWilkinson
Blog: objectmodels.blogspot.com
www.10pines.com
12. What is the relationship with
Programming Languages?
(K. Iverson: “Notation as a tool of thought”
1979 ACM Turing Award)
13. If a programming
language does not
allow me to “TALK”
(write) about certain
things
…
Then I can not THINK
about certain
solutions
14. Let’s see
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;
15. Let’s see
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 ;
16. Let’s see
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 ;
What is the problem?
17. 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 ;
21. cl 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 place
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 ;
22. 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?
24. cl 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 place
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)
25. cl 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
26. 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( ) )
27. 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!!
29. 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”
30. 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!
31. …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…
32. 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?
39. 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
52. How can we add specific
behavior to an object?
Let's see an example
53. 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?
62. 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
63. Conclusions
Learn other programming
languages
Lisp/Scheme
Smalltalk
Forth and more...
Learn our history
64. "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!"