And here is a screenshot to give you an example of what it looks like in 
the wild.

<https://lh3.googleusercontent.com/-dclS32zEKho/VypDL4dK_qI/AAAAAAAAA7A/IAosxyY7cgAQgsFIisVMdJcPmVhkwzq2gCLcB/s1600/WormClonesLeo.png>

I have a class named TssWorker which subclasses from ClientWorker. 

I am using declutter-tree to great effect here. Class nodes are highlighted 
in pale pink and I am using an icon to replace "@worm". I am using a 
customized currently selected node style as well. The result is visually 
clean, interesting and appealing.

On Wednesday, May 4, 2016 at 1:57:31 PM UTC-4, john lunzer wrote:
>
> Just thought I'd share a Leo pattern which perhaps some people are already 
> using but thought I'd formalize it and give a cute name to.
>
> Introducing WormClones™!
>
> The idea is to use a clone as a way to create useful paths (or wormholes) 
> through your code. This is made possible by empty nodes having no effect on 
> the *functionality *of the file Leo writes out.
>
> Here is an example, these are all node headlines:
>
> class TheParent
>
> `-> Sub Classes
>
> `-> *TheFirstChild/TheParent *
>
> `-> *TheSecondChild/TheParent*
>
> `-> def Function1
>
> `-> def Function2
>
> `-> def FunctionA
>
>
>  class TheFirstChild
>
> `-> Parent Class
>
> `-> *TheFirstChild/TheParent *
>
> `-> def Function3
>
> `-> def Function4
>
> `-> def FunctionB
>
>
> class TheSecondChild
>
> `-> Parent Class
>
> `-> *TheSecondChild/TheParent*
>
> `-> def Function5
>
> `-> def Function6
>
> `-> def FunctionC
>
>  
> Those (*bolded*) nodes under the "Parent Class" and "Sub Classes" nodes 
> are all WormClones™. This is a simple example, but in cases of more complex 
> lineage they can help you to quickly discover and traverse the lineage of 
> classes. It also makes overloading functions of parent classes a breeze 
> (copy-node, goto-next-clone, paste-node).
>
> I do realize that some IDEs have an "object browser" that will 
> automatically discover class lineage. As well a plugin could be written in 
> Leo to do the same. But on top of being vanilla Leo this method has the 
> benefit of keeping you "close to the code" as is one of Leo's primary 
> strengths. I find creating the WormClones™ myself helps my memory of code 
> structure as well. This is only one case, Edward also talked about a case 
> for using WormClones™ as quick (and fun!) portals between chapters. 
>
> To facilitate this workflow you can create the very snappy outline pane 
> only plain key shortcuts (which I also recommend for general use):
>
> cut-node ! tree               = x
>
> copy-node ! tree              = c
> paste-node ! tree             = v
> paste-retaining-clones ! tree = b
> goto-next-clone ! tree        = n
>
>
> Thanks to Edward for his recent chapter work which helped to solidify this 
> idea in my head. Also thanks to Edward for the plain key outline shortcuts, 
> love the fluidity in the outline I get from them.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to