OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
3 approaches to capturing knowledge
• From: "Costello, Roger L." <costello@mitre.org>
• To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
• Date: Sun, 13 Feb 2011 10:45:46 -0500

```Hi Folks,

Consider the task of providing the distance and velocity of an object falling toward Earth. Below are three approaches to solving the task. After showing the three approaches I list some advantages and disadvantages of each approach. Are there other advantages and disadvantages? Are there other approaches?

--------------------------------------------------------
Approach #1 - Enumerate the Distance and Velocity Values
--------------------------------------------------------

This XML document shows the distance and velocity values at each second:

<Freely-Falling-Object>
<Snapshot>
<Time units="second">1</Time>
<Distance units="feet">16</Distance>
<Velocity units="feet/second">32</Velocity>
</Snapshot>
<Snapshot>
<Time units="second">2</Time>
<Distance units="feet">64</Distance>
<Velocity units="feet/second">64</Velocity>
</Snapshot>
<Snapshot>
<Time units="second">3</Time>
<Distance units="feet">144</Distance>
<Velocity units="feet/second">96</Velocity>
</Snapshot>
<Snapshot>
<Time units="second">4</Time>
<Distance units="feet">256</Distance>
<Velocity units="feet/second">128</Velocity>
</Snapshot>
<Snapshot>
<Time units="second">5</Time>
<Distance units="feet">400</Distance>
<Velocity units="feet/second">160</Velocity>
</Snapshot>
</Freely-Falling-Object>

-------------------------------
Approach #2 - Give the Formulas
-------------------------------

This XML document provides the formula for computing the distance and velocity of a freely falling object:

<Freely-Falling-Object>
<Formulas>
<Distance>d = gt**2/2</Distance>
<Velocity>v = gt</Velocity>
<g>32 feet/second**2</g>
</Formulas>
</Freely-Falling-Object>

------------------------
Approach #3 - Give Code
------------------------

Forego XML and provide code that computes, for a time t, the distance and velocity:

g = 32

freelyFallingObject t = [d, v]
where d = g * t**2/2
v = g * t

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

--------------------------------------------------------
Approach #1 - Enumerate the Distance and Velocity Values
--------------------------------------------------------

1. No computation needed. Simply search the list for the time of interest and then retrieve the distance and time values.

2. A Subject Matter Expert (SME) can assess whether the values listed are correct.

3. Since it is an XML document it accrues all the benefits of XML -- rich marketplace support, readily transportable, easily searchable, and transformable.

1. The above document shows values for 1 second to 5 seconds. Suppose a user needs the values for 6 seconds? How about for 4.5 seconds? Will you expand the list and create millions and millions of values, to address all possible user needs? Then searching and storing the values will become horribly inefficient.

-------------------------------
Approach #2 - Give the Formulas
-------------------------------

1. Given the formulas, they can be implemented in many programming languages.

2. A Subject Matter Expert (SME) can assess whether the formulas are correct.

3. Since it is an XML document it accrues all the benefits of XML -- rich marketplace support, readily transportable, easily searchable, and transformable.

4. Given a pencil and paper, the values can be calculated. A user may be in a location where he doesn't have access to a computer. With a hardcopy of the XML document and a pencil and paper, he can quickly calculate any values he requires.

1. The values are not immediately available. Calculations are needed to reveal the values.

------------------------
Approach #3 - Give Code
------------------------

1. It is easy to get answers -- just specify a time and out pops the answers. No searching required as in Approach #1. No calculating as in Approach #2.

2. Need the values at 6 seconds? Easy, just specify t = 6. Need the values at 4.5 seconds? Easy, just specify t = 4.5. Unlike Approach #1, users have access to the values for virtually any time.

1. It requires an engine to execute or interpret the code. If a user is at a location with just pencil and paper then code isn't helpful.

2. A Subject Matter Expert (SME) may be intimately familiar with the science of freely falling objects, but may not understand programming language code; thus, a SME may be unable to assess whether the code correctly implements the equations for freely falling objects. I recently heard this remarkable statement, "A surprising amount of stuff (code) gets developed in ignorance."

/Roger
```

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS