Archive for the ‘wpf’ Category

Quick rant about calling a ‘language’ “Processing”

29/06/08


“437 scientific potatoes”
from yesyesnono(?)

I’m just deciding whether to use Processing or the Windows Presentation Foundation (WPF) for my book visualization (bookviz) project with Linda. The advantages of us using WPF are that:

  1. I’ve already got some familiarity;
  2. It’s a part of a fully fledged programming language so I can hone performance, robustness, etc;
  3. I know how to glue in data sources;
  4. There’s a good integration story with the design tool Expression Blend (which Gavin, Nic, and I have been using); and
  5. There’s the potential to webalize the resulting application via Silverlight.

But there’s one big disadvantage. WPF is part of C# and the .Net Framework and learning that is well beyond the scope of a twelve week internship for a designer (don’t ask Richard about forcing designers to use object oriented languages unless you have your asbestos suit on!) So if we go the WPF route then all the code will be written by me. That’ll be fun but it may prove a bottleneck, and in would be less fun than writing code together.

Enter Processing. Processing is a ‘language’ designed by Ben Fry and Casey Reas when they were both in the Aesthetics and Computation Group at the MIT Media Lab. I think that it wasn’t always called “Processing” but use to have the cutesy hacker spelling “Proce55ing”. More on that later. I’ve put “language” in single quotation marks (single inverted commas) because what is interesting about Processing isn’t the language syntax, it’s just a cut down version of Java, but the API and the environment. The advantages of us using Processing are that:

  1. Ben Fry and Casey Reas designed the language so that it would be easy (or easier) for designers to use as a “software sketchbook”, so we could potentially share coding tasks;
  2. There’s a buzz about Processing, especially amongst the information aesthetics community (the designy end of information visualization);
  3. Other people at work have been playing with it; and
  4. The visualizations produced in Processing, like the one that heads this post, are often beautiful and subtle.

But like many information visualization projects our bookviz work is information intensive, and so will make extensive use of SQL queries and a SQL Server 2008 database. Hence I need to get whatever we choose running against SQL. If we go the WPF route I have an embarrassment of riches (and acronyms 😉 ). I could use ADO.Net, OLE DB, Windows DAC, LINQ, … But if I choose Processing what should I use? The obvious way to find out is to check the Processing site: http://www.google.com/search?hl=en&as_q=SQL&as_sitesearch=processing.org Only that search reveals that most Procesing integration with SQL is to MySQL not Microsoft SQL Server. Never mind I can just search the SQL Server discussion groups.

Now I am stuck. Of course the search http://groups.google.co.uk/group/microsoft.public.sqlserver.programming/search?hl=en&group=microsoft.public.sqlserver.programming&q=processing returns over 10,000 results, but how do I distinguish those that use the word “processing” as a verb from those that use it as a noun? If it had a curious spelling, like “Proce55ing”, the job would be easy. As it is I cannot search outside the Processing site itself because (obviously) the word “processing” is already heavily used on programming discussion boards! Arghhhhh.

It reminds me of the early days of C# when Google searches were made difficult because Google would drop the “#” from the search term and return lots of results about the C language. In the unlikely event that I ever invent a language I’ll make darn sure that it is easy to search for. That does remind me of my favourite language name. Years ago we were musing about object oriented languages over lunch when Paul Sanders’ wife (sorry – senior moment on her name) suggested that the object oriented version of COBOL ought to be called “ADD 1 TO COBOL” 😉 (N.B. Wow – that joke has even make it to Wikipedia’s COBOL page!)

NB Before signing off this post I just want to record one other apprehension about Processing: the way it handles fonts. Rather than render fonts dynamically one first loads the fonts into the Processing environment so that each each letter of the alphabet is stored as an image. Is that right? I need to think about that. What happens to kerning? What about tiny font size? Can one use font of fractional size? What would 0.55 point font look like? What size font does Brad Paley use around the outer ellipse of TextArc? In one of the processing books Reas and Fry cite LettError‘s Beowolf font, which prints each letter differently every time the letter is printed. How does that square with preloading fonts as character images? Too many questions 😦

Note to self: fixing “cannot locate resource window1.xaml” exception in vanilla WPF project

05/02/08

Visual Studio 2008 Screenshot

I’ve had this problem come up a few times. If I start a new WPF project and delete the default window1.xaml and add in a different starting page I forget to fix App.xaml to reflect the change. That’s the file with the line startupUri=”Window1.xaml” in it.