Tuesday, October 4, 2011

The p5 IDE is not very good.

A project that I've been working on for the last 4 months at CDOT has involved making a relatively complex game (39 files, 240 KB of code). This was my first experience making an actual structured program in the Processing IDE and it really served to highlight the inadequacies of that program, which are as follows:

  1. No debugging. Yes, you'd better get used to println statements to narrow down a program's behaviour.
  2. Call stack on crash is not useful. The thing that normally tells you what line number your program crashed on as well as the set of calls that led to that point is less useful because all of your code files get jammed together by P5 when it compiles. So the line number that it gives you is the line number in the concatenated stack of code files. Which is a completely useless number because you have no way of finding that line.
  3. Their tabbed interface sucks for a large number of files. If it doesn't have enough space on the tab line to write the names of all the tabs than it collapses the tabs that don't fit into tabs without names on them, which makes it annoying to switch between them because you can't tell what file the tab you are clicking on contains.
In short, try using Eclipse with a plugin to develop processing applications. It involves more overhead because you have to specify the names of the objects that you are calling when you do things like draw() or image() but you will at least be able to debug the program and see where it is crashing. And it has much better tools for managing the files in your project as well.