On 2013-03-09 22:46, Andy Parker wrote:
On Tue, Sep 3, 2013 at 12:53 PM, Luke Kanies <l...@puppetlabs.com
<mailto:l...@puppetlabs.com>> wrote:

    How difficult would it be to build tools to help our users
    understand when they might be making a mistake in this area?


Warning is easy. Warning correctly is hard. We would need to come up
with heuristics that would identify code that is absolutely correct, but
may not mean what the user wants. So are there patterns of usage where
we can with 95% (or more) certainty say that it represent a
mis-contained class? However, we would also want some way of suppressing
those warnings for the cases where we get it wrong.

    That is, can we subtly encourage users to use 'contain' by providing
    compiler hints and such?


This could potentially be expensive to compute and belong more in the tooling domain - i.e. support for things like this is better suited in Geppetto than in the runtime.

I can imagine some visualization of containment, say a view (an optional panel users can have open when they edit code). Just seeing that a class would "float to the top" (or not) as a consequence of the code they are looking at is perhaps the only feedback needed. Maybe it may be enough to do something interesting with the current outline that stresses the "containment" aspect (an UNCONTAINED label, a marked corner on the icon, etc. (Fun UX stuff...)

It would naturally be hard to compute this correctly without doing a full evaluation, but maybe some static evaluation, and heuristics can be designed that can give a warning and a tip ("maybe you want to contain this class", and tool automatically makes the containment for the user as a quick fix). In this case, it is probably ok with less accurate heuristics than what users are likely to tolerate at runtime.

Regards
- henrik


--
You received this message because you are subscribed to the Google Groups "Puppet 
Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-dev+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-dev@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-dev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to