PSA: Don't create creative coding library
In my post on art code I mentioned that in generative art change is constant. If you go into creating a new art piece with open mindset there is no telling where the journey will take you. You can open the editor with intention of implementing simple cellular automata and end the coding session with working simulation of double pendulum.
Collection > library
Because of that I deliberately avoid creating a common library of code that can be reused. Even seemingly stable functionatlities like picking random item from the list can have hundret variations based on particular art piece that I'm working on.
Instead I maintain a collection of snippets that I think produce interesting results. Then when working on a sketch I copy and paste interesting bits into it and work from that. I found that this approach enables more experimentation on my part which is crucial for good results.
This also has an added benefit of keeping the sketches self contained, so the changes made during intensive session with one sketch generally does not affect others.
Do what I say, not what I did
Of course this has not always been the case - when I started creating art I've spent countless hours implementing library of common functions that I will for sure reuse in other sketches in the same way. This lead to me spending more time working on the library and making sure that it is flexible, than creating art.
As a extra bonus it enabled me to sink even more time into making sure that changes to my library are backwards compatible and I could still run my old sketches.
So let me reiterate - when working on generative art try to stop yourself from extracting each piece that has a resembleance of common functionality - you will thank me later.