Zachary Kanfer
I write about programming, music, and comedy.
3y ago
Most generative art code is terrible
Zachary Kanfer

People believe that the quality of generative art code doesn't matter, because it only exists to generate the artwork.

This is an understandable belief. When an artist makes generative art, they are looking at the image produced. If they art that comes out is good-looking, that's "good enough". But there are some issues that come out of this belief:

  • It's hard to modify the code.

  • When you reread the code, it's hard to understand.

  • The code isn't reusable.

Your generative art would look better if your code was better.

Better code lets you do more with your art.

When code is more readable, it's easier to understand. And when the code is understood, it's easy to modify. I recently went back through five years of my generative art, and I was shocked at how difficult some of the code was to modify. Conversely, there were some pieces where I was able to make significant changes with little code, just because the code was well-factored.

You have to make code readability a priority, because it won't happen on its own.

One way to do this is to pretend you don't already know what is going on, and write your code so it's clear to a new reader.

Your code will get clearer and more descriptive. You'll name things better, so you will always know what those things do. Your helper functions will be used in later art, saving time and expanding possibilities. You'll easily modify your code to do new, creative things.

If you don't care about the quality of your code, you're limiting your art.

Better code makes for better art.

It's easy to throw together some code and make something that looks ok. But the more experienced you get, the more you'll want to do complicated things, or build on top of prior art. Better code will help you do that.

0

Atomic Essay

Comments

What will you write today?

Write, publish, get feedback, and become a better writer.

Trusted by 75,000+ writers