Skip to main content Skip to navigation

A basic shopping construal

In making a construal of a shopping scenario, we consider three components of our live experience:

  • What features are characteristic of shopping? These take the form of entities that we observe as we shop, and whose status changes during a shopping transaction. We call these observables. Examples might be: What items are for sale? what is the cost of each item? what coins do we have in our purse? what items have we selected to buy? what coins have we offered as payment?
  • How the various characteristic entities in a shopping scenario are connected in such a way that changing one will affect another? For instance, whether we have brought along enough money to buy the items we have selected depends on what coins we have in our purse, what we've chosen to buy and the cost these items. We call direct connections of this nature between the status of one observable and another dependencies.
  • What can act to change the status of the observables in a shopping scenario? As a customer, we can determine which items we'd like to buy and choose what coins we use to pay from them. As a shop-keeper, we can determine which items are for sale and the price at which items are sold. We call the entities that initiate changes of this nature agents.

By its nature, construals are fluid and informal constructions. In a shopping scenario, we may change our minds about what items we wish to buy, and which coins we use to pay for them. The items for sale may change even as we are viewing them, as some are sold out, or new items are introduced. When making a construal on a computer, we create an artefact that has counterparts of the characteristic observables, dependencies and agency we encounter. The way in which the observables, dependencies and agency in the computer construal are configured and interpreted is at all times open to negotiation by the maker. Indeed, the ways in which the maker learns to configure and interpret the construal is an essential component of its meaning. This reflects the fluid informal quality of the construal.

A basic shopping construal

Screenshot of basic shopping construal

The above screenshot is taken from the simple shopping construal at itag/shopping/newshoppingconstruit in the repository.

The current state of the construal is depicted in the Canvas HTML5 display entitled 'picture'. The picture visually represents the current status of several characteristic observables. The items for sale together with their prices are depicted at the foot of the display. The items that the customer proposes to buy have been placed in a basket. The coins at the top of the display are those that remain in the customer's purse, and those that are laid out as the 'Coins to hand' represent what the customer is potentially presenting as payment. As in a real-life scenario, there are several observables that are not represented explicitly in a visual form - they include, for instance, the total cost of the items being bought, the total amount of money being 'tendered' by the customer and the change that the customer would receive. In practice, these observables would be known to the experienced customer and illustrate dependencies characteristic of the shopping scenario.

Observables and dependencies that are not represented in the picture are nonetheless captured in the computer construal. This can be seen by consulting the Observable List to the right of the picture canvas in the above screenshot. The total cost of the items being bought is recorded in an observable named bill, the total amount of money being 'tendered' by the customer is recorded in the observable tendered. In the Observable List, an observable whose value is explicitly specified is shown in black, whilst an observable whose value is determined by dependency is shown in green. Each observable that is defined by a dependency has an associated recipe that explains how its value is expressed in terms of the values of the observables on which its value depends. This recipe is recorded as a definition. A simple example is the definition of tendered, as depicted at the foot of the Observable List in the above screenshot:

tendered is moneyinhand(purse, coinsselected)

The precise recipe which is used to compute the value of tendered from the coins selected from the purse by the customer is expressed as a simple maker-defined function called moneyinhand. This function is recorded in the Function List displayed at the top left of the screenshot, and the code which specifies it is shown in the bottom right corner.

The roles of the agents in the shopping scenario are expressed through actions that are enabled through the interface to the construal. The customer can click on a coin to toggle between taking it out of the purse and putting it back. The action that implements this agency for the first coin is recorded as coin1picMove in the Agent List above the picture in the display, and the code which specifies it is shown in the top right corner.

Exercising the shopping construal

Making a construal is unlike writing a traditional computer program in that there is no formal specification of an overall computational behaviour. In the construal depicted above, the maker can all times adapt the construal either by modifying the values and definitions of existing observables or introducing new observables and dependencies. The files that are copied and pasted into the Input Window initially in effect record the sequences of definitions of observables ('scripts'), together with the associated supporting functions and actions, that were originally developed incrementally by the maker of construal. Making the construal is an experimental process in which the maker's understanding of the shopping scenario is clarified as characteristic patterns of interaction emerge through configuration and interpretation. This can be appreciated by studying the way in which the definitions in the file basicshoppingcorr.js-e correct and refine the relationships between observables expressed in basicshopping.js-e (as is documented in comments within the file basicshoppingcorr.js-e).

A typical educational resource based on a shopping scenario has a clearly delineated functional behaviour. An example might be the online educational game money math.

By modifying the definitions, functions and actions in the basic shopping construal it is a relatively simple matter to derive a variant of the basic shopping construal that has the same basic functional behaviour as the 'money math' game. The screenshot below depicts the Canvas HTML5 picture that supplies the interface for the game user. To adapt the basic shopping construal to obtain this interface it is only necessary to copy-and-paste the content of the file enoughmoneyext.js-e into the Input Window and press Submit.

Screenshot of an educational game derived from the basic shopping construal

The interface has just three buttons - 'YES' and 'NO' to indicate whether you think you have enough money to buy the items presented, and 'New Puzzle' to generate a new pair of items and set of available coins. In this context, the possibility of much richer interaction via the Input Window still exists, but is beyond the scope of the learner playing the game.

Further examples and discussion of how the basic shopping construal may be adapted can be found here.