Tuesday, January 24, 2012

"mimeomorphic" actions?

Discovered a brilliant site on the art and science of software testing: developsense.com

Encountered a new word while reading about the nature of testing on this blog: "mimeographic."

The usual define: mimeomorphic google query didn't yield the usual dictionary/wikipedia definition, so had to look around a bit more.

Google searches led to connections to AI and perhaps even phenomenology! The terms, "mimeomorphic action" and "polimorphic action" seem to have been coined in a computer science book:


Collins, H. M.; Kusch, M., (1998) The Shape of Actions: What Humans and Machines Can Do , Cambridge, Mass: MIT Press.
This book develops and explores the idea of polimorphic and mimeomorphic actions in great detail following on from the initial distinction which was explored in Artificial Experts and then called regular actions and machine-like actions. Cases dealt with include bicycle riding, love-letter writing, writing in general, McDonalds and the mechanisation of air-pumps.
(source)

More info from scrounging around the Net:
What can humans do? What can machines do? How do humans delegate actions to machines? 

Polimorphic actions (such as writing a love letter) are ones that community members expect to vary with social context. Mimeomorphic actions (such a swinging a golf club) do not vary. Although machines cannot act, they can mimic mimeomorphic actions. Mimeomorphic actions are thus the crucial link between what humans can do and what machines can do.
(source)

 And finally from the point-of-contact website itself (developsense.com):
In The Shape of Actions, Collins and Kusch describe key differences between two kinds of intentional human actions that they call mimeomorphic and polimorphic. In both words, “morph” refers to shape, or form. “Mimeo-” refers to copying. (The grey-haired among us may remember that stencil printing machines used to be called mimeographs.) Mimeomorphic actions are actions that we want to do the same way every time, almost as though we were machines. Collins and Kusch use the example of a golf swing, a kind of action in which we want to eliminate variation and emphasize precision, regularity, and smoothness. “Poli-” is a pun, referring to two similar-sounding Greek roots. The Greek word polys refers to many, much, or several. The Greek polis—a different word entirely— literally means the city, so Collins and Kusch use “poli-” to emphasize the collective and diversified nature of human actions. Polimorphic actions are naturally and appropriately variable, and are rooted in social and human interactions and goals. Conversation is a canonical example of polimorphic action.
(source)

Monday, January 9, 2012

soapui: logging request and response to a file

Note: this code snippet only works within a groovy script assertion for a test step. It will not work for a groovy script test step itself, because messageExchange is not available in a script test step :P


def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )

def d = new Date()
newdate = d.format("yyyy-MM-dd'T'HH-mm-ss")


def myOutFile = "/home/ambar/.loadui/ambar/TrybeSoapUITest." + newdate + ".log"
def f = new File(myOutFile)

f.write("STARTING LOG...\n\n", "UTF-8")

def rawRequest = new String( messageExchange.getRawRequestData() )
f.append("\n\n\n[INFO] RAW Request Data: " + rawRequest)

/*context.currentStep.properties.each { key, value ->
  f.append("${key} : ${value.value}\n")
}*/

//f.append("\n\n\n")

//def requestHeaders = messageExchange.getRequestHeaders()
//f.append("[INFO] request headers: " + requestHeaders)

f.append("\n\n[INFO] response: " + messageExchange.getResponseContent() )
f.append("\n\n[INFO] time taken: " + messageExchange.timeTaken)

assert messageExchange.timeTaken < 10000

Wednesday, January 4, 2012

nginx: simple proxy_pass usage

Problem: send incoming requests containing "/trybe" in the URL on the "enkomion" hostname to the  Trybe REST server locally hosted on tomcat (which is listening on port 8080).

Example:
input="http://enkomion/trybe/..."
output="http://localhost:8080/trybe/..."
(simply have to convert enkomion to localhost:8080 in the hostname part of the URL, but only for /trybe/ location)

Solution:
server{

        ...

        server_name localhost enkomion

        ...

        location /trybe {     
  proxy_pass http://pts;
        }

        ...
}