Alan Kay coined the term Dynabook, the expressions
Dynamic media and Active Essays. How does Dr. Geo connects to
the underneath concepts behind these words? This is what we explain in the
following paragraphs.
sketch := DrGeoCanvas new axesOn. f := [ :x | x cos + x ].
"Derivate number"
df := [ :x | (f value: x + 1e-8) - (f value: x) * 1e8].
sketch plot: f from: -20 to: 20.
ptA := (sketch point: 2@0) large; name: 'Drag me'.
5 timesRepeat: [
ptB := sketch point: [ :pt |
pt point x @ (f value: pt point x)] parent: ptA.
ptB hide.
(sketch segment: ptA to: ptB) dotted forwardArrow.
ptA := sketch point: [:pt | | x |
x := pt point x. x - ( (f value: x) / (df value: x) ) @ 0] parent: ptB.
ptA hide.
(sketch segment: ptB to: ptA) dotted forwardArrow].
Thanks to Chao-Kuei Hung for his editing.
[2] A. Kay, A Personal Computer for Children of All Ages, Xerox Palo Alto RC, 1972
[3] A. Kay, Afterword: What is a Dynabook?, 2013
[4] T. Yamamiya, A. Warth and T. Kaehler, Active essays on the web, Technical report, 2009
[5] Wikipedia contributors, Newton's method, Wikipedia, The Free Encyclopedia (accessed July 6, 2018)
Alan Kay's personal dynamic media concept[1] and its
implementation in the interim Dynabook[2], [3] and later the Etoys system propose a mix of
written static contents and computer programs. The former is the old world of
book, the later the new world of computerised dynamic simulation, model and
hand-on experience; put together these contents are the essence of an Active
Essay[4]. In this recipe, the Smalltalk language
provides the needed flexibility and generality to make this dynamic content
actively designed by the user as well.
At a modest scale, Dr. Geo shares this vision of Active Essay, precisely in
the field of mathematics and geometry.
Geometric Active Essay
With mouse operations, the user produces a geometry construction constrained
by the inherent properties of the parts defining the construction. A triangle
will be designated by three vertices and three segments, then the user
instructs Dr. Geo to build the three perpendicular bisectors of each side of
the triangle. If Dr. Geo wouldn't know how to do it, the user could have
instructed it through a macro-construction. Finally, the user sees the three
lines crossing in a common point.
That is more or less the same as the old way of constructing a geometric
sketch on a paper-pen environment. From now on, the computerized world of model
shows up when the user interacts with his construction; he asks Dr. Geo to drag
one of the triangle' vertex and he observes the three lines are always crossing
at a same location.
This geometric Active Essay example is only limited by the user imagination
and the Dr. Geo construction tools. But what if the user wants more than the
provided tools? This is where the Smalltalk dimension of Kay's dynamic content
plays its role: provide to the user the needed flexibility to describe its own
simulation. For example, what about a dynamic model a teacher designs to show
how the Netwon-Raphson algorithm works[5]?
Programmed Active Essay
To do so, the Dynabook and Dr. Geo can not anticipate the user needs.
However enough flexibility is provided by the mean of malleable tools and
Smalltalk programming language. From there, in the field of geometry, an Active
Essay takes the form of a Pharo (a modern reinterpretation of Smalltalk) description to manipulate the Dr. Geo
tools. It results on a very short essay, 15 lines, to produce a sketch with a
plotted curve and 5 iterations on the Newton-Raphson algorithm.
Active Essay of the Newton-Raphson algorithm
| sketch f df ptA ptB|sketch := DrGeoCanvas new axesOn. f := [ :x | x cos + x ].
"Derivate number"
df := [ :x | (f value: x + 1e-8) - (f value: x) * 1e8].
sketch plot: f from: -20 to: 20.
ptA := (sketch point: 2@0) large; name: 'Drag me'.
5 timesRepeat: [
ptB := sketch point: [ :pt |
pt point x @ (f value: pt point x)] parent: ptA.
ptB hide.
(sketch segment: ptA to: ptB) dotted forwardArrow.
ptA := sketch point: [:pt | | x |
x := pt point x. x - ( (f value: x) / (df value: x) ) @ 0] parent: ptB.
ptA hide.
(sketch segment: ptB to: ptA) dotted forwardArrow].
More interestingly, it is a model the user can explore with his mouse:
zooming in one area, moving the initial value in the algorithm. The learner
will visualise the impact of the initial value on the algorithm convergence. It
is very tempting to make an analogy with the Archimedes' lever: the Dr.Geo's
tools and the Smalltalk lever; with a very short effort, 15 lines, it results
on an interactive and dynamic simulation the Dr. Geo's author could never
anticipate.
Dr. Geo is developed with Pharo Smalltalk.
Dr. Geo itself should be considered as a rather complex Active Essay designed
with the tools provided by Pharo. Dr. Geo itself
lets the end user access the Pharo tools, making the environment completely
circular and transparent. We are very grateful to the talented Pharo community
on their continuing effort to improve this fantastic environment. One may not
wait long to see the Dynabook and Personal Dynamic Media concepts taking life
in Pharo, standing on the shoulder of giants.
Any opinion on the topic? If so leave a comment for further reflection.Thanks to Chao-Kuei Hung for his editing.
Notes
[1] A. Kay, A. Goldberg, Personal Dynamic Media, VPRI Memo, 1977[2] A. Kay, A Personal Computer for Children of All Ages, Xerox Palo Alto RC, 1972
[3] A. Kay, Afterword: What is a Dynabook?, 2013
[4] T. Yamamiya, A. Warth and T. Kaehler, Active essays on the web, Technical report, 2009
[5] Wikipedia contributors, Newton's method, Wikipedia, The Free Encyclopedia (accessed July 6, 2018)
Aucun commentaire:
Enregistrer un commentaire