SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Cuchulainn
Topic Author
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Automatic Reflex and Sapir-Whorf Theory in Programming

October 14th, 2017, 8:59 am

How many steps are there from problem to solution? And which steps are implicit and have not been externalised by developers?

Example: In OOP, one approach is to create class libraries that model reality as we know it Jim (as the developer sees it) and implement them in the current programming language. *Everything* is an object and if it's not then we use reification. We map abstract ideas to concrete data models and objects.

Every decision has consequences. And each one is a Procrustean bed to a lesser or greater extent.
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 15th, 2017, 12:55 pm

The zeroth step is the most implicit one which is when that particular problem was given to (or taken by) that particular developer. That step assumes the developer's tools (i.e., their chosen languages) are appropriate to that particular problem.
 
User avatar
Cuchulainn
Topic Author
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 16th, 2017, 9:26 am

The zeroth step is the most implicit one which is when that particular problem was given to (or taken by) that particular developer.  That step assumes the developer's tools (i.e., their chosen languages) are appropriate to that particular problem.
Few would disagree with you on this.These issues are/should be flagged by a risk-driven software process.

In most cases the tools are not/never 100% appropriate but they will still be used in software projects even if it means ingenious workarounds to fit it into the software paradigm. That's life.

A concrete example is the (extremely) flawed Gang of Four Observer pattern (based on the implicit assumption "everything is an object") in which the abstract idea of message passing has been reified into a class hierarchy. A related issue is to start creating inert class hierarchies as a way to communicate design intent even though data flow is more important. The Observer is an example of "OOP Sapir-Whorf". It's easy to get stuck in a rut.

Inheritance is not a requirement; it is an optimisation.
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 16th, 2017, 5:42 pm

Turing's concept of Universal Computation guarantees that any computational problem can be solved by any computational methodology. One could, in theory, write a model validation system with a finite state machine on a Turing tape. I don't think Turing ever created any theorems about software project cost management, reliability, or maintainability.

The observation that OOP can be overused is interesting but raises the issue of whether it's better for a software development team to be deeply invested in one approach or in multiple approaches. The first enhances the effectiveness of communications and coordination in the group. The later brings in outside perspectives at the cost of team cohesiveness and depth of experience.

(And a more interesting issue is whether different human languages are better suited to programming than others. Are programmers whose native language is X better suited to programming projects of type Y?)
 
User avatar
Cuchulainn
Topic Author
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 17th, 2017, 7:35 am

I think Turing is overrated. Too philosophical for my taste. 
 
User avatar
Cuchulainn
Topic Author
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 23rd, 2017, 11:09 am

. Objects model real-world entities. They “directly model objects of the physical reality to which   the software applies (Meyer 1997).

. Objects are easy to find (“they are there for the picking” (Meyer 1997)). 

I wonder if this is true (maybe for introverted objects, only). For example, objects can respond to messages (they are polite), but they cannot describe what they require from their environment nor send messages to other objects.They need a leader to kick start communication?
 
User avatar
Cuchulainn
Topic Author
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 30th, 2017, 9:41 am

Image
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 30th, 2017, 12:52 pm

. Objects model real-world entities. They “directly model objects of the physical reality to which   the software applies (Meyer 1997).

. Objects are easy to find (“they are there for the picking” (Meyer 1997)). 

I wonder if this is true (maybe for introverted objects, only). For example, objects can respond to messages (they are polite), but they cannot describe what they require from their environment nor send messages to other objects.They need a leader to kick start communication?
The problem with objects is that they are toy representation of the world based on the assumption that the world consists of toys. It's a tautological view of the universe that falls apart upon deeper inspection.

Even a seemingly obvious "object" like a tree becomes fuzzy and not object-like the more one studies it. What "messages" encode the shade the tree casts across the landscape? Where is the boundary between the tree and the soil that its roots hold together or the fungi and bacteria that live in, on, and next to the roots? And what of the fruits of the tree? When do they cease being has-a parts of the tree to become independent objects (or not if they fall to the ground, rot, and become part of the tree again)? And what of the aspen in which a single genetic individual actually forms the entire grove of up to tens of thousands of "trees"?
 
User avatar
outrun
Posts: 4573
Joined: April 29th, 2016, 1:40 pm

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 30th, 2017, 2:23 pm

IMO objects are part of the algorithms that are used to solve a problem, not real works descriptions.

If you need to model the shadow cast by a tree on the ground, you might chose a ray tracer algorithm to compute that shadow, and the choice of using a ray tracer leads to object being abstract spatial structures and rays that bounce off them (the operations the ray tracer algorithm performs on its objects). If you chose a different algorithm to compute the shadow you will end up with different objects. Often the object used in an algorithm are abstract algorithmic elements that have no real world meaning, the solve purpose it to serve the algorithm that solved the problem. .. a double linked list for modelling a traversable and extendable collection of elements that an algorithms works with to solve a problem.

..the choice of using a ray tracer or something else is driven by requirements: does it match requirements best when compared to other algorithmic options? Dimensions could be computing time, memory usage, accuracy, latency, maintainability.. all algorithmic and/or code related requirement.

The best code I've seen has object that are generically useful to easily map to abstractions of real world objects and fully integrated with algorithms that act on them. The mapping to real world object might not be perfect, but the mapping between an algorithm and the data structures it uses  is perfect. Things like a "random access iterators" and "sort"
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 30th, 2017, 3:48 pm

Those are great points that highlight the interaction between the implementation or "how" of the objects (e.g., the choice of ray tracer and tree geometry data structures) and the purpose or "why" of the software. One might readily create a nice TreeShade software system that computes the shade of a tree. Yet that system may be ill-suited to what seems like obvious re-use opportunities such as computing how the shade from one tree affects another tree or computing the biomass productivity of a forest.

The tricky part is that issues such as reuse, extensibility, and maintainability often imply that the "why" is different or changing. And a second issue is the platform-non-independence issue -- a doubly-linked list might work very well in a single-threaded application but become a performance scaling bottleneck on multi-core or GPU platforms.

From what I've seen, so many of the criticisms of various software development approaches reflect the unavoidable natural complexity of the long term problem space rather than the inadequacy of the implementation methods. It's easy in hindsight to criticize the methodology and design choices AFTER it becomes obvious that a different decision in the past would have been better for the future.
 
User avatar
Cuchulainn
Topic Author
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 30th, 2017, 8:01 pm

Very verbose.

Why not just stick to the duck + battery problem. How would you solve it?
I am assuming you are familiar with Liskov,The you will know when and why it break down. This is what my post is hinting at.

The problem with objects is that they are toy representation of the world based on the assumption that the world consists of toys. It's a tautological view of the universe that falls apart upon deeper inspection.

I agree deeper inspection' . But how? It's like saying mother's apple pie.
 
User avatar
Cuchulainn
Topic Author
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 30th, 2017, 8:18 pm

It's easy in hindsight to criticize the methodology and design choices AFTER it becomes obvious that a different decision in the past would have been better for the future.

I don't agree.It's very difficult because we have all been snared in our littte Sapir-Whorf fiefdoms.
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 31st, 2017, 12:45 am

Very verbose.

Why not just stick to the duck + battery problem. How would you solve it?
I am assuming you are familiar with Liskov,The you will know when and why it break down. This is what my post is hinting at.

The problem with objects is that they are toy representation of the world based on the assumption that the world consists of toys. It's a tautological view of the universe that falls apart upon deeper inspection.

I agree deeper inspection' . But how? It's like saying mother's apple pie.
It's not even clear to me that the duck+battery is a problem in that both natural ducks and battery-powered ducks share the same multi-faceted abstracted model of requiring an energy source (providing some number of kilojoules that might be allocated to various duck behaviors), creating waste products from that energy source, and having analogous consequences if they run out of energy.

Even example of a seemingly good representation for code has a counterexample. But then the counterexamples have countercounterexamples (e.g., the battery-powered duck really can be nicely modeled as a duck).

The devil is in the details which are seldom known at the onset of the project.
 
User avatar
Traden4Alpha
Posts: 23951
Joined: September 20th, 2002, 8:30 pm

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

October 31st, 2017, 12:50 am

It's easy in hindsight to criticize the methodology and design choices AFTER it becomes obvious that a different decision in the past would have been better for the future.

I don't agree.It's very difficult because we have all been snared in our littte Sapir-Whorf fiefdoms.
Maybe so. Certainly one of the supposed differences between Western and Eastern thought processes is whether one breaks up the world into discrete independent objects or considers everything in terms of relationships and contextual issues.

Yet if Sapir-Whorf has created fiefdoms, then I'd expect noticeable variation in the success rates for large software projects around the world. Are the Chinese, Japanese, Dutch, British, Italians, or Americans any better (or worse) at big software? Sapir-Whorf would predict they would differ. But I've not seen any data on this.
 
User avatar
Cuchulainn
Topic Author
Posts: 59705
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: Automatic Reflex and Sapir-Whorf Theory in Programming

November 4th, 2017, 10:34 am

It's easy in hindsight to criticize the methodology and design choices AFTER it becomes obvious that a different decision in the past would have been better for the future.

I don't agree.It's very difficult because we have all been snared in our littte Sapir-Whorf fiefdoms.
Maybe so.  Certainly one of the supposed differences between Western and Eastern thought processes is whether one breaks up the world into discrete independent objects or considers everything in terms of relationships and contextual issues.

Yet if Sapir-Whorf has created fiefdoms, then I'd expect noticeable variation in the success rates for large software projects around the world.  Are the Chinese, Japanese, Dutch, British, Italians, or Americans any better (or worse) at big software?  Sapir-Whorf would predict they would differ.   But I've not seen any data on this.
Countries are artificial categories. Sapir-Whorf is deeper.
It could even be more small-scale. e.g. between the ear-lobes of the individual developer. An experiment is to model shapes (achtung: make sure you define the domain otherwise you will fly off on a tangent and requirements drift):
Circle
Square
Rectangle
Ellipse

In general, developers make an implicit model (but maybe not) and start programming.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On