toxi.in.process

Friday, August 26, 2005

Using JEdit as external code editor for Processing

As you might know, the Processing IDE (to a large part) is based on the open source JEdit editor. Having grown fond of this powerful and customizable editor, I've been using it for most of my XML and programming tasks over the years, whenever Eclipse is a too big a gun to fire up. JEdit only becomes "truly" efficient via its many plugins available, but it also rocks in ease of customization.

Due to my new job I've become a semi-Mac user again (at least to 50%) and haven't got around installing much software yet. So using the existing definition for Java and some handy Regular Expressions I quickly converted the list of processing keywords (located in the file /lib/keywords.txt inside the Processing root folder) into a JEdit edit mode XML definition for PDE source files.

Brief note for installation:

1) put this file into the /modes directory inside the JEdit root folder
2) copy & paste the following XML node into the file "catalog" inside the same folder

<MODE NAME="processing" FILE="processing.xml" FILE_NAME_GLOB="*.pde" />

Syntax colouring/checking for PDE files should now be ready. Please do let me know any errors/suggestions. Maybe it'd be handy to include method names and constants of some common P5 libraries too?

Btw. If you're interested the JEdit RegExp used for turning the plaintext list into XML are here:

search pattern: ^(\w+)\t(\w+).*$
replace pattern: <$2>$1</$2>

Thursday, August 04, 2005

Remembering your limits

Recently I've been receiving quite a few emails with an empty body and the subject line "tell me more!" - my standard one used for embedded mailto: links in early Flash experiments I'd published on various sites. I had hoped all these sources of neglect would have been eradicated in meantime. Now thanks to the 1st person in years to actually include a message in of these emails the culprit turned out to be my 3D DotMatrix Scroller. Done back in 1999 with Flash 4 it somehow seems to enjoy some belated attention again.

Oh my... The doors of perception opened wide and all the memories came flooding back at once. The mental pain of programming by selecting commands from a drop-down list and filling in form fields. Not being able to define functions, no local variables, the lack of most mathematic functions and operations apart from the main four. Flash forced one to adapt a surprisingly low level programming methodology, alien to many if not to most of its users, but especially the ones then considered primary target group: (web)designers. At the same time, Macromedia's chosen approach to get the beginnings of ActionScript into their tool was quite cunning. Those with a keen interest in interactivity and those who remained stoic in the light of these severe limitations of functionality (and usability!) came up with many creative solutions - sometimes by re-inventing the wheel, sometimes with true original thought. It very much reminded me of my previous dealings with writing applications and games in assembler (or before that in straight hex code). It too was "Xtreme Programming" with a much more literal meaning of the term than it is used currently. Many of us have a story to tell about the Oldskool ways of writing software. Remembering these things sometimes is important to me, as it's not always the very opposite to the way software is being built today. Often we're still being forced to reinvent the wheel, because we rely (too much?) on many other tools created without a long term vision. Looking back sometimes helps us to see things more in perspective.

Of course the lack of essential coding concepts in a tool like Flash was questionable, though limitation is not always a bad thing. I'm certainly not the first one to stress its benefits when applied to creative processes (where I consider coding to be one of them). Yet, in our age of apparently infinite possibilities and constant exposure to tempting mental side tracks, interruptions, consciously choosing limiting factors for one's work requires growing mental strength, focus and effort. This is especially true when we're repeatedly told only being limited by our own creativity (or the lack of it).

Once again less is more. Limit the noise. Often we forget limitation (consciously or not) can nurture and encourage experimentation, improvisation and hence creative thinking. It also can help you focusing more on core ideas of a (new) project and lead to a deeper understanding of a concept or an entire medium than any textbook can offer. I'm sure all those factors were a major influence on the simplicity and resulting popularity of Processing.

I always believed in and practiced "learning by doing". So far I've been challenged the most and learned the most in situations ruled by limitation: lack of time (both in project duration and execution time), available tools, assets, grand ideas, and above all lack of prior knowledge about best practices. However I attempt to take away exactly the latter from each project I've worked on. You could call it learning the Hard Way and sometimes it involves scaling down my own expectations prior to starting work in order to tackle the core parts of a problem successfully.

Though, what does "successful" mean in this case? Trying to be realistic about what you can do and what you can't is a two sided sword. It doesn't mean you should be happy with achieving mediocrity, relative to your true skills. It's more about figuring out and appreciating where you're on your path to ??? (fill in yourself) and then adjusting your goals.

The key is to accept, respect and admit failure. Personally, I think there's a big, positive mental payoff for a successfully completed project. The payoff is even bigger if you've managed to learn something totally new on the way, if your goal was beyond what you'd thought you could achieve - if you have succeeded in the face of limitation and superseded yourself. But even a failure is another piece in the big puzzle and is always part of the equation, at least to an extend.

No big punchline here. A personal era is coming to a close and it was time to reconsider...