archives

Metaphors we Program By: Space, Action and Society in Java

It is usually unknown that it exists a Conference of Psychology of Programming .

A lot of papers concern firstly educational problematics. But certain of these are more originals.

It's the case of the Alan Blackwell's paper "Metaphors we Program By: Space, Action and Society in Java".

Blackwell analyses how the authors of Java.lang and Java.bean library understand, in a cognitive way, their code.
To do that, he analyses the javadoc of these two librarys. After describing his methodology, he state some aphorisms he extract from his study. Some of these are remind here.

Firstly, programmers understand components as agent :

  • Components are agents of action in a causal universe
  • Components have communicative intent
  • Components are members of a society
  • A component has beliefs and intentions

It is here interesting to think about AgentSpeak which is a well-known Belief-Desire-Intention Agent oriented language.

Moreover, agents are proactives :

  • Method calls are speech acts
  • Programs can author texts

These agents live in a deontic world :

  • Components are subject to legal constraints
  • Components are subject to moral and aesthetic judgment.

These agents live in a time/space world :

  • Components observe and seek information in the execution environment
  • Components own and trade data
  • Programs operate in historical time
  • Programs operate in a spatial world with containment and extent
  • Execution is a journey in some landscape.
  • Program logic is a physical structure, with material properties and subject to decay
  • Data is a substance that flows and is stored.

To Conclude, it seems programmers doesn't think their code in a mathematical, object, functional way, but in a world where Belief-Intention-Agents live in a deontic and temporal and geographic world.
It is interesting to see how it looks like our daily world.