[squeak-dev] Inspector Browser based tool for beginners: Object Inquirer

mail at jaromir.net mail at jaromir.net
Sat Dec 25 16:55:01 UTC 2021

Hi Marcel, Christoph and all,

For your consideration:

I've extended the Inspector Browser a bit to include the position of the object's class in the hierarchy, and added an inspector code pane. The implementation is subclassed off InspectorBrowser to the new ObjectInquirer class.

The goal is to help beginners who are new to OOP and Smalltalk to better grasp the concept of "object"; the learner should be able to literally see the whole object, i.e. its states (variables) and its behaviors (methods) tied together rather than separated; the current Inspector (or Explorer) displays only the object states, while the Class Browser (or Hierarchy Browser) displays only the behaviors (and inheritance hierarchy); as a pro you're probably thinking: "...and where's the problem?", but if you're just beginning with OOP, it makes it unnecessarily difficult to learn.

According to dictionary.com an inquirer is "a person who asks a question or seeks to learn about something" so the name Object Inquirer seemed a good candidate :)

If you want to try sending messages to the inspected object you don't have to look for which messages the object responds to; you have them in front of you, including all inherited messages. You can also immediately see where in the hierachy the inspected object belongs - very helpful for a beginner. 

And if you're wondering where all the state variables come from, again you can find out right away which superclasses add which variables.

Try to compare e.g. "Transcript inspect" and "Transcript inquire". (screenshots attached)

I could go on and on about why I think this might be useful for beginners... I just wish I had such a tool when I started with OOP and Smalltalk :)

As an exercise, I've also implemented the Object >> #inquire method, a yellow button menu item 'inquire it (Q)' and the CMD+Shift+Q shortcut to make Inquirer use consistent with Inspector and Explorer (to make the shortcut work, just do-it: SmalltalkEditor initialize).

I'd appreciate your opinions if you considered such a tool useful.

Merry Christmas!

^[^    Jaromir

Sent from Squeak Inbox Talk
["Object Inquirer.png"]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ProjectObjectInquirer.1.cs
Type: application/octet-stream
Size: 5850 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211225/90b5268a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Object Inquirer.png
Type: application/octet-stream
Size: 130512 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20211225/90b5268a/attachment-0003.obj>

More information about the Squeak-dev mailing list