Programming Language Technical debt and their influence in Thinking and Desgin
-
Upload
hernan-wilkinson -
Category
Software
-
view
268 -
download
1
description
Transcript of Programming Language Technical debt and their influence in Thinking and Desgin
![Page 1: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/1.jpg)
agile software development & services
The Technical Debt of the Programming Languages
…and the influence in our thinking
and designs
Hernán WilkinsonMedellin 2014
![Page 2: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/2.jpg)
The world “we live” in … ?
![Page 3: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/3.jpg)
The world “we live” in … ?
![Page 4: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/4.jpg)
The world “we live” in … ?
![Page 5: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/5.jpg)
The world “we live” in … ?
![Page 6: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/6.jpg)
Bret Victor - Thinking the unthinkable
![Page 7: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/7.jpg)
Language implies Thinking
![Page 8: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/8.jpg)
Language implies Thinking
Thinking implies Language
![Page 9: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/9.jpg)
What we can not talk about…we can not think about
(or it is difficult...)
![Page 10: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/10.jpg)
Do not Insist on English
![Page 11: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/11.jpg)
Aimara: Pasado y Futuro (nayra) (qhipa)
![Page 12: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/12.jpg)
Languages without a concept for the future — "It rain tomorrow," instead of "It will rain tomorrow" — correlate
strongly with high savings rates.
![Page 13: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/13.jpg)
Now, a design problemLet’s think about this:
How do we call the whole thing?
![Page 14: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/14.jpg)
Let’s say Traffic Light (Semáforo)
How do we call each part?
![Page 15: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/15.jpg)
Let’s say Traffic Regulator(guess why not 'Traffic Controller'?)
How do we call each Traffic Regulator in the Traffic Light context?
![Page 16: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/16.jpg)
aTrafficLight
northSouthRegulator
eastWestRegulator
![Page 17: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/17.jpg)
aTrafficLight
rightRegulator
leftRegulator
![Page 18: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/18.jpg)
aTrafficLight
regulator1
regulator2
![Page 19: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/19.jpg)
Not easy way to name them…Relative vs. Fix Coordinate System
B. Lee Whorf(Linguistic Relativity)
![Page 20: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/20.jpg)
What is the relationship with Programming Languages?
(K. Iverson: “Notation as a tool of thought”)
![Page 21: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/21.jpg)
If a programming language does not allow me to “TALK” (write) about certain
things…
Then I can not THINK about certain
solutions
![Page 22: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/22.jpg)
ABSTRACTION
![Page 23: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/23.jpg)
How do we refer to that “thing that has four wheels and moves?”
![Page 24: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/24.jpg)
and to “that thing that moves and has four wheels?”
![Page 25: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/25.jpg)
and to “that one that moves because it has
four wheels?”
![Page 26: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/26.jpg)
To avoid REPETITIONTo provide MEANING to that
REPETITION
![Page 27: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/27.jpg)
If we have repetition we are lacking and abstraction… (an object in OO)
Meta Note: I repeated the picture… I’m lacking an abstraction or a better image!
![Page 28: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/28.jpg)
Let’s seeList<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (customer.nameStarsWith(“H”))
selectedCustomers.add (customer);
return selectedCustomers;
List<Account> selectedAccounts = new ArrayList<Account> ();
for (Account account: accounts)
if (account.isOverdraw())
selectedAccounts.add(account);
return selectedAccount;
What is the problem?
![Page 29: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/29.jpg)
We have repeated code!List<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (customer.nameStarsWith(“H”))
selectedCustomers.add (customer);
return selectedCustomers;
List<Account> selectedAccounts = new ArrayList<Account> ();
for (Account account: accounts)
if (account.isOverdraw())
selectedAccounts.add(account);
return selectedAccount;
![Page 30: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/30.jpg)
“Repeated code” does not mean “repeated text”.
It means “repeated patterns of collaboration”
![Page 31: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/31.jpg)
What is the problem?
![Page 32: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/32.jpg)
We are lacking an ABSTRACTION!
Repeated code means we are forgetting an object!
![Page 33: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/33.jpg)
How do we remove it?
![Page 34: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/34.jpg)
Technique:1. Copy the repeated code to some
“place”2. Parameterize what changes3. NAME IT!!!4. Use it :-)
![Page 35: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/35.jpg)
Copy the repeated code to some placeList<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (customer.nameStarsWith(“H”))
selectedCustomers.add(customer);
return selectedCustomers;
List<Account> selectedAccounts = new ArrayList<Account> ();
for (Account account: accounts)
if (account.isOverdraw())
selectedAccounts.add(account);
return selectedAccount;
class Collection<T> {
public Collection<T> <<NAME>> {
List<T> selected = new ArrayList<T> ();
for (T anObject: this )
if ( )
selected.add (anObject);
return selected: }
![Page 36: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/36.jpg)
Parameterize what changes
List<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (customer.nameStarsWith(“H”))
selectedCustomers.add (customer);
return selectedCustomers;
List<Account> selectedAccounts = new ArrayList<Account> ();
for (Account account: accounts)
if (account.isOverdraw())
selectedAccounts.add(account);
return selectedAccount;
How do we do it?
![Page 37: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/37.jpg)
We need an abstraction to represent “code”
We need a BLOCK or a CLOSURE…… an object that represents “code”
![Page 38: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/38.jpg)
Parameterize what changes
class Collection<T> {public Collection<T> <<NAME>> (Closure aClosure) {
List<T> selected = new ArrayList<T> ();
for (T anObject: this)
if (aClosure.value(anObject) )
selected.add (anObject);
return selected:}
List<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (customer.nameStarsWith(“H”))
selectedCustomers.add(customer);
return selectedCustomers;
List<Account> selectedAccounts = new ArrayList<Account> ();
for (Account account: accounts)
if (account.isOverdraw())
selectedAccounts.add(account);
return selectedAccount;
![Page 39: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/39.jpg)
NAME IT!!
class Collection<T> {public Collection<T> select (Closure aClosure) {
List<T> selected = new ArrayList<T> ();
for (T anObject: this)
if (aClosure.value(anObject) )
selected.add (anObject);
return selected:}
The most difficult part because it means that we understood the repeated code
meaning
List<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (customer.nameStarsWith(“H”))
selectedCustomers.add(customer);
return selectedCustomers;
List<Account> selectedAccounts = new ArrayList<Account> ();
for (Account account: accounts)
if (account.isOverdraw())
selectedAccounts.add(account);
return selectedAccount;
![Page 40: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/40.jpg)
List<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (customer.nameStarsWith(“H”))
selectedCustomers.add (customer);
return selectedCustomers;
List<Account> selectedAccounts = new ArrayList<Account> ();
for (Account account: accounts)
if (account.isOverdraw())
selectedAccounts.add(account);
return selectedAccount;
cutomers.select( customer => customer.nameStartsWith(“H”) )
accounts.select( account => account.isOverdraw() )
![Page 41: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/41.jpg)
customers.select( new SelectClosure<Customer> () {
public boolean value (Customer aCustomer) {
return aCustomer.nameStartsWith(“H”); }});
cutomers.select( customer => customber.nameStartsWith(“H”) )
Why not an Anonymous Class?1. Sintax:
Which one reads better?
2. Binding problems…
![Page 42: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/42.jpg)
What did we gain?1. Few words Simplicity, Easier to
understand, read, remember, etc. Less bugs!
2. We created a new “abstraction”: select
3. … and we remove duplicated code!!
![Page 43: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/43.jpg)
Now… let’s do some reflection
1. Why didn’t we see the “duplicated code”?
2. Why didn’t we came with a solution?
![Page 44: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/44.jpg)
Why didn’t we see the “duplicated code”
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
![Page 45: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/45.jpg)
Why didn’t we see the “duplicated code”
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
![Page 46: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/46.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!
DOES NOT REALLY?
![Page 47: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/47.jpg)
cutomers reject: [ :aCustomer | aCustomer nameStartsWith: ‘H’ ] (Smalltalk)
customers.reject { | aCustomer | aCustomer.nameStartsWith(“H”) } (Ruby)
customers.Where( aCustomer => !aCustomer.nameStarsWith(“H”)) (C#)
rejectList<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (!customer.nameStarsWith(“H”))
selectedCustomers.add (customer);
return selectedCustomers;
![Page 48: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/48.jpg)
List<Customer> selectedCustomers = new ArrayList<Customer> ();
for (Customer customer: customers)
if (customer.nameStarsWith(“H”))
return customer;
throw ….
customers detect: [ :aCustomer | aCustomer nameStartsWith: ‘H’ ](Smalltalk)
customers.detect { | aCustomer | aCustomer.nameStartsWith(“H”) } (Ruby)
customers.First ( aCustomer => aCustomer.nameStarstWith(“H”)) (C#)
detect
![Page 49: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/49.jpg)
customers collect: [ :aCustomer | aCustomer name ] (Smalltalk)
customers.collect { | aCustomer | aCustomer.name () } (Ruby)
customers.Select( aCustomer => aCustomer.name() ) (C#)
collectList<String> customerNames = new ArrayList<String> ();
for (Customer customer: customers)
customerNames.add (customer.name());
return customerNames;
![Page 50: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/50.jpg)
self
should: [ do something ]
raise: Exception
withExceptionDo: [ :e | self assert: …. ] (Smallalk)
TDD: Test for exceptionsTry {
… do something
fail()
} catch (Exception e) {
assertTrue (…. ) }
![Page 51: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/51.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 52: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/52.jpg)
Meta-Conclusion
Object = ¿Data + Code?
![Page 53: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/53.jpg)
Meta-Conclusion
Object = ¿Data + Code?
If you think so, you don´t understand OO yet
![Page 54: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/54.jpg)
Mete-Conclusion
Data is an Object
Code is an Object
An Object is a “superior” concept that unifies data and
code
![Page 55: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/55.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 56: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/56.jpg)
What is the problem?
![Page 57: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/57.jpg)
No If!
![Page 58: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/58.jpg)
If Implementation
“if” as a reserved word– What do we gain?– What do we loose?
“if” as a message– What do we gain?– What do we loose?
![Page 59: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/59.jpg)
Boole’s Algebra
“if” as a message
![Page 60: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/60.jpg)
Now… let’s do some reflection
1. Why didn’t we see the “polymorphic message”?
2. Why didn’t we came with a right solution?
![Page 61: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/61.jpg)
Why didn’t we see the “polymorphic message”
Because 'if' as a reserved word does not make us think in polymorphism
![Page 62: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/62.jpg)
![Page 63: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/63.jpg)
How do we model 'age'?
![Page 64: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/64.jpg)
How do we model 'Weight'?
![Page 65: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/65.jpg)
How do we model 'money'?How do we model 'length'?How do we model 'speed'?
![Page 66: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/66.jpg)
We need algebraic expressions
Let's see an example
![Page 67: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/67.jpg)
Now… let’s do some reflection
1. Why don't we use algebraic expressions?
2. How does affect our design not to use them?
![Page 68: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/68.jpg)
Because 'common programming languages' only provide arithmetic models
Because we don't realize that a language is the beginning not the end.
![Page 69: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/69.jpg)
A programming language is its creator's state of knowledge
![Page 70: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/70.jpg)
How does impact our design a language without extensible
classes?
ArrayHelper?? xxxManager??
![Page 71: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/71.jpg)
How does impact our design a language where we can not see how it is implemented?
![Page 72: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/72.jpg)
How can we add specific behavior to an object?
Let's see an example
![Page 73: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/73.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 74: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/74.jpg)
How do we learn a new word?
![Page 75: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/75.jpg)
Do we:1. Stop our brain2. “edit" a new definition in our
dictionary3. “Compile” the new definition4. Restart our brain?
![Page 76: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/76.jpg)
NO!!
Why do we have to do it with our programs?
![Page 77: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/77.jpg)
Can our programs “change while running”?
Can our programs “learn” as we learn?
![Page 78: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/78.jpg)
Yes, they can!... If they areMETACIRCULAR
Apply
Eval
![Page 79: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/79.jpg)
Let’s see a problem:Can you make a proxy “learn” about its
proxee as it is used?
![Page 80: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/80.jpg)
If we don’t have meta-circular languages, then we can not think
about solutions where meta-programming would fit!
![Page 81: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/81.jpg)
Let’s think again…
Are these concepts new?
![Page 82: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/82.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 83: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/83.jpg)
Even More! Static vs. Dynamic typing
languages?Design?TDD?
Frameworks?Relational Databases?Web applications?
![Page 84: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/84.jpg)
Fuente: http://c2.com/cgi/wiki?WardExplainsDebtMetaphor
Technical Deb Metaphor…
![Page 85: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/85.jpg)
![Page 86: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/86.jpg)
Why not having closures generate debt?
Repeated code Lack of abstractions Difficult and costly to maintain
![Page 87: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/87.jpg)
Why not having meta-programming generate debt?
Some problems are more difficult to solve More code!
Programs can not reason about programs or themselves
We always need a programmer to do something a program could do
![Page 88: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/88.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
![Page 89: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/89.jpg)
Conclusions Learn other programming
languages Lisp/Scheme Smalltalk Forth and more...
Learn our history
![Page 90: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/90.jpg)
We teach this and other important design aspects in our courses
• OO Design I & OO Design II• TDD & Advanced TDD
Check them out at:http://www.10pines.com/
![Page 91: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/91.jpg)
Questions?
![Page 92: Programming Language Technical debt and their influence in Thinking and Desgin](https://reader033.fdocuments.in/reader033/viewer/2022061203/547e7cf3b47959b1508b4b52/html5/thumbnails/92.jpg)
agile software development & services
Muchas gracias!
twitter: @10Pines
Argentina
Tel.: +54 (11) 6091-3125Alem 693, 5B(1001) Buenos Aires