new bookmarker - was: Editing class method sources in single place

Paul D. Fernhout pdfernhout at kurtz-fernhout.com
Wed Feb 13 14:34:43 UTC 2008


Francisco-

I like the idea of keeping only the methods of interest around somewhere,
like you outline or as someone else mentioned with MorphicWrapers as even as
separate windows.  I was surprised at first to see a PlantStudio reference
in this context, but after seeing the screenshot it made sense. Here are
some comments on the origins of those ideas, as well as a simple suggestion
in the last paragraph, involving just keeping the recently viewed method
history in a side panel of a regular browser, like Firefox can.

=== History

The PlantStudio browser, and also the Garden Simulator browser which
preceded it, screenshot here:
  http://www.gardenwithinsight.com/sc_brows.htm
were inspired from Smalltalk, but also from VisualBasic and Delphi property
tools for editing form widgets.

Lazarus is a free Delphi-like system, a couple "Object Inspector" window
screenshots from it:
http://www.lazarus.freepascal.org/modules.php?op=modload&name=Screenshots&file=index&req=showsc&id=4
http://www.lazarus.freepascal.org/modules.php?op=modload&name=Screenshots&file=index&req=showsc&id=5
These show that idea of having the value on the same line as the name (and
you can change the value on that line), but also being able to expand the
item if it has internal complexity (see the FONT line on the first link) so
you can change the parts separately. In PlantStudio, S-curves were something
that needed to be changed that way as the curves were defined by more than
one numerical value.

PataPata is another variant (post-PlantStudio), except with the expansion in
a lower pane, more like a Smalltalk browser. This is a little bit like what
Igor suggested (but not separate windows, which might be nicer). Here is a
screenshot (see the most front window):
   http://sourceforge.net/project/screenshots.php?group_id=165910
In the end, I didn't like it much, for a few reasons. (*)

In the Garden Simulator (released around 1997) we organized what we called
"aspects" (variables or derived or simulated current values) related to
simulation objects into Smalltalk-like protocols we called "groups". One
difference was that you could have an aspect in more than one group. We
removed that flexibility to make your own groups in PlantStudio (thinking
less is more? :-) I would put that flexibility back in a more generic way if
I did it again (I would like users to be able to create their own models and
declare their own groups).

There was another idea in the Garden Simulator browser:
  http://www.gardenwithinsight.com/sc_brows.htm
"The browser is a tool for examining the simulation in detail. The browser
has two sides. The numbers side shows you the numbers in the simulation very
simply as numbers with units on a sliding gauge. The pictures side shows the
same information, but arranged in ways that are more visual and easier to
understand. For the weather, you can see running graphs of temperature,
humidity, precipitation, radiation, day length, and wind speed. For the
soil, you can see a soil profile with soil color, temperature, pH, nitrogen,
phosphorus, soil materials, or plant roots. For a plant, you can see a
close-up look at the plant, a breakdown of plant biomass in various plant
parts (such as leaves and fruits), or the stresses on the plant's growth.
Groups help to manage the complexity of the over 800 aspects in the
simulation. You can create your own groups. You can also use the browser to
harvest fruits from a plant, create your own plant cultivars (varieties),
soil types, and climates, and change many of simulation values. "

What is most important there is that the browser could actually mix
presentations of the same data. So, in a Smalltalk context, imagine a
browser with a left hand side which is the bookmarked methods you indicate,
and perhaps a right hand side which might be, say, a graphical network
visualization of the way the methods call each other. That browser was
inspired by the left brain (logical) / right brain (visual) duality idea
some have proposed.

== Generalizing

So to generalize that with the bookmark idea, what you kind of want is some
way to collect all the views on a specific task you are working on into a
coherent whole, especially one you can dismiss or hide with one click. I
have so often opened two dozen windows trying to debug something, or trying
to make some change to the code, and then had to find each window, remember
why I opened it, and close it, while still leaving some windows open.  I'm
not sure how to do that in a generic way, especially because tasks seem to
shade into each other -- you solve one issue but a related one comes up.

Perhaps an OLPC/Sugar-like history list of *when* you opened windows in
time-order might be most useful? Or it could track when you last looked at
the window or changed something relevant to it? It's almost a workflow-like
problem. Definitely a possible area of exploration.

Maybe it would be useful to have one method per window but just have a
better way to organize and reorganize windows (or window icons) in Squeak.
Perhaps that generic system might know something about when the window was
opened or what else was going on in the system or how the windows were
related (which browser window spawned from another).

But perhaps simplicity is a good philosophy here -- and one window with a
bunch of related bookmarked methods of interest might be good. But you still
end up needing to spend time managing what you put in and take out of your
bookmarks, and if they keep growing you end up with clutter again.

Other simple things might be holding or coloring or graying methods in a
browser based on how recently you looked at them. That way you could find
them again more easily at a glance.  I think someone did this? Maybe part of
Spoon for methods which were actually used as code coverage?

Generalizing, this is all about restricting views of the system to what is
interesting or useful to you at the moment. That can be done by your own
choice (bookmarks), or it can even be done by others in an educational or
corporate setting, restricting programmers to what they are allowed (by
someone else's bookmarking choices) to view or change (assuming a security
model, which Smalltalk does not have, and maybe shouldn't). Completely
generalizing this would entail making "bookmarks" somehow a first class
object in the system's design, perhaps called "shadow modules"? :-)

== Simplest suggestions

In practice, what I often want is to view only a *few* classes of interest,
and then perhaps simplify the methods of interest for those classes; so,
sort of like a regular browser, but with just some classes and then for
these classes, just some methods. It might be nice to drag and drop to this
browser from regular browser. One might also have prepared class/method sets
for newbies to use (hiding much of the system complexity); LearningWorks had
some ideas along this line of hiding complexity in the debugger (not showing
new programmers some intermediate methods).

Or even easier, what I think I would like is another panel on a regular
browser which keeps a method viewed history in chronological order, so as I
look at methods they show up in the list (Class and name) and I can just
click in that list to make the browser go back and forth to that method
(including being able to open a new browser on the method with a double
click?). But I wonder if I have seen that somewhere too? Or maybe I have
just wanted it for so long? :-) The FireFox web browser can have a side bar
which can do that. Maybe that is what I am thinking of?

--Paul Fernhout
(*) While I thought it was a good idea at the time to try, PataPata's
hierarchical browser (which was *not* fully Self-like, Self-s was much
better) became very confusing lumping everything into a big hierarchical
inspector (although you could have more than one). Using it entailed lots of
scrolling where you could easily lose your place in lots of clutter. That
clutter came in part from mixing variables and methods, but also from mixing
classes and instances (since it was a Prototype-based system and there was
no clear difference). I also learned I did not like Self's choice (which I
had followed) of merging separate method and variable namespaces (of
Smalltalk) into one common one where any variable could be method. If you
separate classes and instances there would not be so much clutter. I tried a
wonderful browser for an prototype-ish extension to TCL that did a good job
of supporting mixing prototypes/singeltons and classes using a browser
desing which looked more Smalltalk-ish:
  "XotclIDE"
  http://wiki.tcl.tk/2131
"Integrated interactive development environment for the XOTcl extension (but
supports also regular Tcl programs). Provides a Smalltalk like graphical
programming environment (ENVY, Squeak, Visual Works) with graphical
introspection and editing of a running system. It supports also normal Tcl
procs and packages. State can be saved in the form of Tcl packages. Can
optionally use a sql-based version control system ..."
  "XOTclIDE. Integrated Development Environment for XOTcl and Tcl"
  http://www.xdobry.de/xotclIDE/

Francisco Garau wrote:
> It would be nice to have a new browser (or bookmarker actually) where you
> can drop methods from several classes. I envision the UI as a combination
> of Paul Fernhout's PlantStudio and Strongtalk (or self).
> 
> The text only UI would look like like this: + Date class >> today + Point
> >>min: aMin max: aMax + Collection >> add: newObject
> 
> And when expanded the second item: + Date class >> today - Point >>min:
> aMin max: aMax ^ (self min: aMin) max: aMax
> 
> + Collection >> add: newObject See the screenshoots to have an idea how
> the GUI might look like.



More information about the Squeak-dev mailing list