If you’re new to coding, or even if you’ve been coding for years, understanding the differences between all the different languages and libraries out there can be really confusing. Should you learn Processing or p5.js? How does Processing.js fit into the picture? How do all of those relate to other languages? So before you dive into coding, let’s take a minute to understand how the various versions of Processing relate to each other, and to other languages.
When you’re comparing different languages, it can be tempting to try to find the “best” one. But keep in mind that languages are a lot like tools, where each tool is designed for a different job.
It doesn’t really make sense to ask “which tool is better, a hammer or a saw?” because each tool is designed for a different task. The same thing is true of programming languages!
So instead of trying to find the “best” language, you should try to find the language that best fits your goals.
One last thing to keep in mind is that learning about one tool doesn’t mean you can’t learn about other tools. In fact, learning how to use a hammer makes it easier to learn how to use a saw, and over time you’ll likely use many different tools. Again, the same thing is true of programming languages!
So don’t stress out too much about finding the perfect language. Anything you learn now will apply to any other language you learn along the way. The important thing is to try out new things and to find what’s interesting to you!
To understand how all of this fits together, let’s see a timeline of the major events:
PAppletclass extended Java’s
Appletclass. But since applets weren’t really a thing anymore, it didn’t make sense to keep that around.
surfacevariable and the
You don’t have to memorize any of this, but hopefully it helps put everything into perspective.
The difference is a little bit philosophical, in that they had slightly different goals.
p5.js is based on Processing’s original goals, but the developers of p5.js didn’t tie themselves to Processing’s syntax. Some things are the same (like the
Processing.js is no longer maintained, and you should no longer use it except for some pretty specific use cases, which I’ll mention in a second.
With all these different versions of Processing, how do you know which one to use? Here’s a list that explains my recommendations:
I’m completely new to coding!
You should start with p5.js. I love p5.js because it comes with an amazing online editor that requires zero setup, and you can share what you make as a webpage with a single click.
I know some web dev and want to get into creative coding!
I know some Java and want to get into creative coding!
You should start with Processing. Processing is built on top of Java, so you can use anything you know about Java in Processing code.
On a personal note, this was the path I followed. I learned about Java in high school and then in college, and only later did I discover Processing. It opened up a whole world of creating coding for me!
I already wrote a Processing sketch and want to share it on the web!
If your sketch uses any Processing 3 features, or any Java-specific libraries or features, then you can only deploy your sketch as an executable file. You can link to a download of your executable file from a webpage, but you can’t share this kind of sketch as a website itself.
If your sketch does not use any Processing 3 features or any Java-specific libraries or features, then you can use Processing.js to share your sketch as a website.
My code reads a lot of local files, or outputs something used by a bigger project.
p5.js makes it easy to deploy your code to the web, but that comes at the cost of making it harder to do things like access files on your hard drive. After all, you wouldn’t want any random website accessing your files!
So if your code needs to read in a lot of files from your hard drive, then you should probably use Processing.
For example, I use Processing to create these movie color visualizations. I use one Processing sketch to convert a movie into a bunch of images (one for each frame), and then I use a different Processing sketch to take those image files and convert them into a poster or a visualization. It wouldn’t really make sense to deploy those individual sketches to the web, and they need to access a ton of files on my hard drive, so I use Processing instead of p5.js.
I want to get a job!
Even if your end goal is to get a programming job that’s not directly tied to creative coding, I still think that creative coding is a great way to practice the fundamentals of coding, which you can then apply to whatever you want.
I’d summarize my thoughts like this:
If you want to get a job as a backend developer or as an Android developer, then you should start with Processing and then work your way through Java and Java EE, or Google Cloud or Android depending on your goals.
I listed my recommendations above because I know how confusing this is, but there aren’t any strict rules about any of it. In the end, you should use whatever you’re comfortable with or curious about!
If you’re trying to decide between Processing and p5.js (or between any other language), the best advice I can give you is to try them all out! Put together a hello world program for each one, and see which one fits in your brain the best.
Both the p5.js tutorials and the Processing tutorials are designed for people who have never coded before, so either one is a good choice. And remember that learning one language actually helps you learn other languages, so any time you spend learning is time well spent!
Learn how to create p5.js sketches!
Learn how to program in Processing!
Happy Coding is a community of folks just like you learning about coding.
Do you have a comment or question? Post it here!
Comments are powered by the Happy Coding forum. This page has a corresponding forum post, and replies to that post show up as comments here. Click the button above to go to the forum to post a comment!