synthsin75 wrote:The problem is that relatively new scripters won't know why "self.moho" doesn't work
My idea of recipes are definitely not tutorials. They're more common cut, paste and morph code snippets that I use frequently and am willing to share with others. Also, I think that's one of the advantages of the forum format. Other formats are wonderful if someone can create them, but here, if someone doesn't know about self.moho they can ask, and if this is a kind of thing that's of interest the original author doesn't have to be the one that answers the question. In the worst case, the reader is at least exposed to new things and sees them in a context. They can go play.
Headers are really useful
synthsin75 wrote:For me personally, I don't always have a lot of time to explain the workings of every code snippet I may post
I don't think any contributor should have to
explain the workings of their code snippet. They're generous enough just to share and we all have real lives
However, I think a header above each snippet is
extremely helpful. I do that for my Current Approaches thread
viewtopic.php?f=9&t=28849 If people haven't read the threads they can still quickly scroll through the pages and easily see the different headers. If they actually have read a post, they may not need it at the time, but later they may think, "I know I saw something about <whatever> in that thread." Then they can search for the word at the top of the thread and the search will look through all the pages, but will be limited to the thread. I even do that for my own posts sometimes in Current Approaches. There may not be a lot of other contributors there, but there have been over 6000 reads in just over a year, so hopefully it's helping some people.
So ... if you guys could, I think it would be helpful to add headers above snippets. But even if you don't I'm learning things already from the things you've shared. So thank you
A single sentence or two is nice
I think a header is most important, but a single sentence or two, just below the snippet is nice. But again, I'm not talking explanations. It's up to the reader to do the homework.
Stan wrote:If you guys have any ideas, please let me know.
Github is a public place where code can be shared. I have an account there
https://github.com/Strider22/AnimeStudioScripts, but it's typically about full applications/scripts. Hypothetically, there could be files by category and people could add there. But ... that's not for the uninitiated.
Stack Overflow
http://stackoverflow.com/ is a site that's specifically for Q & A related to code. People could add stuff there. Don't know if sorting and categorization are as easy, but snippets could be added by asking and answering questions "How do I iterate without recursion?"
I'm also thinking of adding a blog to my new site
http://strider2000.wixsite.com/familyfunanimation. I'm brand new to creating my own website so I don't know much about them, but I have seen people's blogs where categorization and tags helped find things. In my case I'm thinking of manually creating an index if there isn't some automatic way, since I do best with an index.
Anyway, those are just some ideas. If I/we create any such things we could always link to it from here.
Stan wrote:I came up with a universal iterator
Ok, so there's the "Process all layers" recipe
Thanks for sharing Stan! (Stan if you missed it, I posted a recipe that processed just top level layers and I mislabeled it as "Process all layers"
I've corrected that in an edit
For drilling down I typically do a recursion, but often don't have to drill down into all layers. Have you actually done a timing test to show that your iterator is noticeably faster than recursion. That would be of interest to me. Yours is certainly a nice approach if you have to hit all layers, but if you can top at some top level layers I think a recursion may be faster. But that's just an interesting thought beyond your generosity of sharing the script and I can go play if I really want
By the way does anyone know of how to do timings for a question like that?
Thanks for sharing hayasidist! Man there's so much information everywhere that it's just hard to keep up. That's really helpful.