streamlining creation of gtInspector extensions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

streamlining creation of gtInspector extensions

Ben Coman
Just a passing thought (that I'm sorry I don't have time to explore
myself right now) ...

I wonder if GT devs might experiment with streamlining
discover-ability of existing and creation of new extensions by being
able to right-click the tabs to get a menu....
*  Show Definition - which opens a browser on the right code
*  Create Custom Extension - which opens a dialog to create a new
package "MyGTExtensions" and/or select an existing package, specify an
identifier and choose a template  that is created and Browser opened.

The might help facilitate creating the extensions while in the "flow"
of developing.  At the moment I need to break context to go searching
for gtInspectorXX: examples to use as a template, take time
understanding each to choose which is applicable  (repetitively each
time I want to create an extension since they don't "stick" in my
head).   At times I feel a tension between taking the time to create
an extension and staying in the "flow" and I think such a facility
would reduce this friction.

cheers -ben

Reply | Threaded
Open this post in threaded view
|

Re: streamlining creation of gtInspector extensions

Sean P. DeNigris
Administrator
Ben Coman wrote
*  Show Definition - which opens a browser on the right code
*  Create Custom Extension - which opens a dialog to create a new
package "MyGTExtensions" and/or select an existing package, specify an
identifier and choose a template  that is created and Browser opened.
Great ideas! This brings the behavioral possibilities much closer to the live objects themselves...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: streamlining creation of gtInspector extensions

Peter Uhnak
On Sun, Sep 04, 2016 at 11:10:26AM -0700, Sean P. DeNigris wrote:
> Ben Coman wrote

Do you really want to add extra hidden (because nobody would click on a tab, because nowhere else in the system it's like that) buttons just to save two seconds?

> > *  Show Definition - which opens a browser on the right code

* click on the pen near top right corner, select extensions package, select method
* select the meta tab, select a class, select extensions package, select method

Do you really need a special hidden button to maybe save two seconds on a five second action that you rarely perform?

> > *  Create Custom Extension - which opens a dialog to create a new
> > package "MyGTExtensions" and/or select an existing package, specify an
> > identifier and choose a template  that is created and Browser opened.

Why not just open a browser and add a method? You can protocolize the method with two clicks or a shortcut, and it's already part of the system.

Unless you plan on writing two hundred extensions, you are really not going to save anything, because you spend most of the time actually implementing it and not bootstrapping it. (At least that's my experience after writing 20 or 30 extensions).

Another tip that I tend to use:
* open spotter, type #gtInsp, press ctrl + m (to select implementors), enable live preview (if you haven't already), look around for inspiration


(just to be clear... I am not strictly against adding it, but it feels like it add another hidden feature (that's undiscoverable) for very little benefit)

Peter

Reply | Threaded
Open this post in threaded view
|

Re: streamlining creation of gtInspector extensions

Sean P. DeNigris
Administrator
Peter Uhnak wrote
Do you really want to... just to save two seconds?
Of course not!

Peter Uhnak wrote
that's my experience after writing 20 or 30 extensions
And there's the source of the misunderstanding. Notice the key word in the original request was /discoverability/ i.e. for specifically for new people who /haven't/ written 20 or 30 extensions, or even 1! You did suggest in your answer that you don't think it's very discoverable because it's still hidden, but it seems more discoverable than the current knowledge repositories - brains of experts, blog posts, and the help system - because it's much closer to hand. Maybe we should put a link to the help system there instead...
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: streamlining creation of gtInspector extensions

Peter Uhnak
On Sun, Sep 04, 2016 at 12:30:29PM -0700, Sean P. DeNigris wrote:

> Peter Uhnak wrote
> > Do you really want to... just to save two seconds?
>
> Of course not!
>
>
> Peter Uhnak wrote
> > that's my experience after writing 20 or 30 extensions
>
> And there's the source of the misunderstanding. Notice the key word in the
> original request was /discoverability/ i.e. for specifically for new people
> who /haven't/ written 20 or 30 extensions, or even 1!

Well you learn it like a lot of other stuff in Pharo… by looking at code examples, which in this case means the implementation itself.
And from that perspective it's imho very neat, that you can already very quickly find what you know, as long as you are comfortable using Pharo.

In any case, Andrei was doing some experiments during ESUG on people (me included) on writing inspector extensions, so he is looking into it.

Peter

Reply | Threaded
Open this post in threaded view
|

Re: streamlining creation of gtInspector extensions

Sean P. DeNigris
Administrator
Peter Uhnak wrote
Well you learn it like a lot of other stuff in Pharo… by looking at code examples, which in this case means the implementation itself.
Agreed. The problem here and in other tools (as opposed to scripts) is how you get from the UI to the implementation. You're still assuming that the first-time extension writer knows how to get to the implementation, which seems unlikely to me.
Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: streamlining creation of gtInspector extensions

Ben Coman
In reply to this post by Peter Uhnak
On Mon, Sep 5, 2016 at 3:24 AM, Peter Uhnak <[hidden email]> wrote:
> On Sun, Sep 04, 2016 at 11:10:26AM -0700, Sean P. DeNigris wrote:
>> Ben Coman wrote
>
> Do you really want to add extra hidden
> (because nobody would click on a tab, because nowhere else in the system it's like that)

Its not hidden because its similar to lot of other systems that
newcomers use [1][2][3].

> buttons just to save two seconds?
>
>> > *  Show Definition - which opens a browser on the right code
>
> * click on the pen near top right corner, select extensions package, select method

"Which extensions package, which method do I select?  I've only been
using Pharo a week.  I'm not used to this extreme integration of IDE
and my application code.  You mean I can actually modify the UI code
right now?"

> * select the meta tab, select a class, select extensions package, select method
>
> Do you really need a special hidden button to maybe save two seconds on a five second action that you rarely perform?

Its exactly the rare actions that benefit the most from better
discoverability (see below).   Its not about saving a few seconds.

>
>> > *  Create Custom Extension - which opens a dialog to create a new
>> > package "MyGTExtensions" and/or select an existing package, specify an
>> > identifier and choose a template  that is created and Browser opened.
>
> Why not just open a browser and add a method? You can protocolize the method with two clicks or a shortcut, and it's already part of the system.

"How do I determine the right class to add the method? I've only been
using Pharo a week and I'm not used to extending core classes. What is
a protocol and what is an extension?"

>
> Unless you plan on writing two hundred extensions, you are really not going to save anything, because you spend most of the time actually implementing it and not bootstrapping it. (At least that's my experience after writing 20 or 30 extensions).

The advantage is not for someone writing 20 or 200 extensions.  Its
for the person creating their very *first* extension.

>
> Another tip that I tend to use:
> * open spotter, type #gtInsp, press ctrl + m (to select implementors), enable live preview (if you haven't already), look around for inspiration

Considering a newcomer's discoverability of:

* a common paradigm such as a tab context menu [1] [2] [3]
      + a dialog

* guessing a random string like #gtInsp to search on
      + having the idea to create a personal MyGTExtensions package to
hold the extension
      + knowing how to derive the name of the *MyGTExtensions protocol

I feel the former will work better.

>
>
> (just to be clear... I am not strictly against adding it, but it feels like it add another hidden feature (that's undiscoverable) for very little benefit)

Maybe the <Pen> button could be a menu with
* Browse definition of selected tab
* Create a new tab

The icon could be the three horizontal line "menu" icon rather than a "pen".


[1] http://stackoverflow.com/questions/12986625/eclipse-plugin-development-adding-a-menu-on-right-click-on-tab-of-editor
[2] http://www.howtogeek.com/howto/internet/firefox/quick-tip-duplicate-current-tab-in-new-window-in-firefox/
[3] http://techdows.com/2012/02/reload-all-tabs-in-chrome-from-context-menu-or-with-a-hotkey.html

cheers-ben