Python or Processing for first year design students?
May 16, 2014 7:21 AM   Subscribe

What language should I teach design students to program in: Python or Processing?

I'm teaching an Intro to Programming course for and undergrad semester design students next semester. "Design" in this context has the broadest possible interpretation, encompassing graphic-, videogame-, furniture-, clothes-, house- and city-design. The school is very computer and fabrication oriented, and there's tons of cool 3d printers, routers and robots to play with. Think a mini MediaLab thing.

I need to pick a first language to teach them.

The school suggested start out with Processing and then progress to Python, but in my experience one semester is not enough to give students a firm grounding in 2 languages/APIs. The students are not elite, it's a new school and doesn't have much of a reputation yet, and the other profs say that they range from middling to pretty good.

There's some other courses in the curriculum that require Arduino and such, so Processing would be a good fit, but I feel like it would be good for them to learn something more general purpose like Python at first, especially as it's becoming a standard scripting language in Rhino, Maya, etc.

I use Python every day for my web development work, but I could probably get up to speed in Processing in a week or so.

Any suggestions, experience, or online course outlines are appreciated.
posted by signal to Education (15 answers total) 8 users marked this as a favorite
Python. Regardless of what direction the students end up going, python will be useful. It is a mature language with one billion extensions. If they are proficient with python, picking up processing will be a snap.
posted by rockindata at 7:35 AM on May 16, 2014

My gut is that Python will be infinitely useful for them for the rest of their lives, but Processing might be more fun and "fit" better with the aim of the school.

Processing has more of an emphasis on getting a thing to visually do another thing, which can be very encouraging. I mean the first tutorial on Processing is to make an ellipse appear on screen:

Most Python tutorials are going to be a way to have the computer say "Hello, World!"

That said, I think Python will be the more useful thing for them to learn and provide a better foundation for learning other languages and tools. As Rockindata says, Processing will be easy for them to pick up if they show any aptitude for Python.
posted by beep-bop-robot at 7:40 AM on May 16, 2014

There's an argument that Processing is "easier," but I find that it hides a bunch of the complexity of what is really Java, to the point that transitioning from Processing to Real Java becomes a problem for some students. Python has a harder setup curve, but I'd say it's probably more useful and I suspect it teaches better habits.

The one thing Processing has going for it out of the box is an immediately-usable 2d/3d graphics API. I'm not familiar with anything directly comparable for Python (but I'm also more of a Ruby guy).
posted by Alterscape at 7:40 AM on May 16, 2014

I think processing. Assuming that this is a first programming experience for many of these students, and assuming that as design students they are more visually oriented, it's a much better fit. Traditional text-only programming can be pretty discouraging for people who do not think of themselves as programming types, and the fast feedback loop of processing, going from typing something in to seeing something non-text on the screen is really encouraging. I'm assuming the goal here isn't to train career programmers with a useful language for the job market, but instead to introduce non-programmers to the idea that programming can become a part of their largely art and design based toolkit. Python is useful too, but processing would IMHO overcome stereotypes faster.
posted by Joh at 7:47 AM on May 16, 2014 [3 favorites]

I think you should teach the class in Processing, and give the class a comp sci 101 pre-req.
posted by oceanjesse at 7:50 AM on May 16, 2014

For design students? Processing, absolutely, because of the visual element.

You may also be interested in this post about how programming gets taught.
posted by danceswithlight at 8:10 AM on May 16, 2014 [1 favorite]

I vote for Processing. For non-programming design students, you'll be able to get something that looks nice with a minimal amount of effort with Processing.

I python is too complicated for students who really looking to do graphics work.
posted by Fidel Cashflow at 8:11 AM on May 16, 2014

Processing is the language of visual computing. Sure, it's got a very different model from other languages (it's like awk for graphics: a processing loop that ties all the actions together). It's much easier to interface to physical computing devices than Python, and it also does lovely things in the browser through processing.js

You can have simple (slow) 2D graphics in Python very easily with the turtle module. You can talk to external devices, but it's a bit uglier (good luck explaining why you need iterators to talk to an Arduino over serial). It all depends if you want to turn out comp sci people, or people who can get their ideas into computers quickly. The Processing books are really good, and very accessible for learners. The language is very close to that used in Wiring/Arduino/Energia/..., and avoids learning two languages.

The biggest win in Processing, though, is that you can copy and paste it to/from web pages, and it will still work.
posted by scruss at 8:23 AM on May 16, 2014 [1 favorite]

Ok, slightly more awake. I think folks make a compelling argument for Processing in this context. I'd encourage you to teach OOP principles as soon as practical, because it lets you get exponentially more out of Processing than the basic 'sketch' model, though. You can actually have classes defined in separate files/tabs in the P5 IDE, but for some reason I found that students had a lot of trouble grasping this if they spent too much time in single-file-sketch non-OOP land.
posted by Alterscape at 8:30 AM on May 16, 2014

This is a tricky question.

Processing is definitely easier and fun to learn, but on the other hand doesn't translate very well into design/fabrication workflows. Exporting geometry in 3D (as an .OBJ) to a 3d editor to manipulate, modify, and represent something isn't the simplest workflow. Processing stuff kind of just stays on the web and works as visualizations, as a result, but it's a great way to understand loops, ifs, recursion, OOP, agent-based models, etc.

Python doesn't have the immediate visual environment of Processing, but as you yourself mention, is becoming a standard scripting language, especially when paired with Rhino/Grasshopper or Maya, etc. Rhino/Grasshopper + Python is super powerful, since you can use Python with Rhino as a graphics engine, and can plug into the interface/abilities of Grasshopper if you want.

I'd say - if you're at all familiar with Rhino and can create a workflow that lets students create geometry in Rhino from Python, then I'd teach a Processing-esque course in Python/Rhino.
posted by suedehead at 9:39 AM on May 16, 2014

Actually, reading over when you said The school is very computer and fabrication oriented, I want to reinforce Python.

For fabrication or 3d work, Processing is kind of a pain. For example, if I had a 3d box mesh, randomly scattered some points in it, created spheres around those points, and wanted to subtract the spheres from that box (essentially creating 'swiss cheese'), that would be very easy in Python+Rhino, but I don't know of any libraries that can do 3d boolean subtraction in Processing.
posted by suedehead at 9:49 AM on May 16, 2014

Is your goal to get them interested in programming as a design medium, in hopes they do more later? If so I'd say Processing, incorporating Processing.js to show them in-browser stuff. That will teach students with no programming experience a little about what programming is like and be naturally graphic-design focussed.

Or is your goal to teach them computer science skills they'll use in later courses? If it's the latter I'd say Python. Python is a gentle language to learn, but it's also a real language you can use for many projects. The Arduinio and 3d-printing examples you mentioned are strong arguments for Python. OTOH Python is kind of crappy at graphics.
posted by Nelson at 10:47 AM on May 16, 2014

There are ports of Processing to Python (pyprocessing and
posted by tallus at 1:10 PM on May 16, 2014

Python has in-browser IDEs which reduce the friction a bit. Skulpt starts with nice simple turtle graphics examples.
posted by morganw at 4:08 PM on May 16, 2014

Thanks all. I think I'm going to start them out on Processing and, if they advance enough, do a section on Python at the end.
posted by signal at 7:31 AM on May 19, 2014

« Older Bed and Breakfast in the Texas Hill Country   |   Give me 100 sandwiches... every day for the rest... Newer »
This thread is closed to new comments.