Archive for July, 2008

links for 2008-07-24

24/07/08

links for 2008-07-23

23/07/08

Why can’t we take photos in galleries?

19/07/08

I don’t understand copyright laws at the best of times but I can understand why content owners are nervous about piracy. In the old days when I taped a new album from a mate onto a C90, or sat by the radio so I could record my favourite track,  the quality of the reproduction was pretty terrible. Now electronic copies of music or movies are often identical to the original media. But let’s put music and video to one side. What about art? What about textiles? What about ceramics? What about jewellery? Clearly if I take a photo of a piece of artwork at an exhibition, or a piece of jewellery at a degree show no one is ever going to mistake my photo for the original. Let’s try an experiment. Is this a photo of a Patrick Heron stained glass window or is it the real thing?

There, that was easy. So why ban photography?

I can see why one would ban flash photography – that would be very annoying for those reflecting on the pieces on display. I can also imagine that cash strapped galleries might want to charge for a photography permit – I’d pay.

I’m not saying that galleries should be forced to allow photography (though if the artwork was acquired with public money I would be tempted to force them). Clearly in a private space one has the right to prevent photos being taken. But why do it? It is frustrating for those of us who enjoy capturing things we enjoy either to help us remember them or to try and see them from some new and creative angle.

Some galleries are great – friends in New York have said that most galleries allow photography, and the V&A seems to have a wonderfully enlightened policy. But then on the other end I was amazed that several of the recent degree shows I visited banned photography. For example I loved the Central Saint Martins College of Art and Design show, and put together a trip report for colleagues at work and used the report as a blog post here. I focused on the Communications Design Masters. In truth this was because I love their work, but it helped that you were allowed to take pictures. It made explaining what was hot, what was the zeitgeist, etc much much easier. I also visited the jewellery section as a colleague was interested to know what CSM students were producing (he’d enjoyed the jewellery RCA students had produced last year). So can I show him my favourite piece? Yes, here it is:

 

Well the less said about my sketching skills the better. But photographing it was a no-no:

(N.B. The jeweller, Clio Alphas, has some wonderful photos of this piece on her flickr stream if you do want to see why I liked the necklace she’d designed so much: http://www.flickr.com/photos/23358770@N05/2518700286/)

I had the same problem at the RCA show. Some designers let you take photos despite the sinage but others didn’t. This was especially frustrating in the fabrics section where I saw some great things that I’d have loved to have shared. One designer had made a fabulous fabric that combined geometric patterned thick felt with fluorescent plastic squares  matching the pattern, but slightly offset. Inevitably I’m struggling to describe the piece without a picture. The designer felt that allowing photos would enable people to steal her ideas; but I feel the buzz created by people discussing your work online far outweighs the potential for espionage.

More scary knitting – is it the uncanny valley again?

19/07/08

The joys of multidiscipliarity. I’ve already mentioned that one of the psychologists in our group, Dave Kirk, has picked up our technological work on surface computing to ask questions about how different materials are perceived (and could be perceived as part of computing systems). This led him to lay down the challenge ‘show me something scary made of wool’. A few of us in the group tried, and I’ve already catalogued my failures in another post. But it’s such an intriguing idea – to find something woollen and scary or to understand why we cannot – that I’ve been trying to enlist friends and, well, anyone who’ll listen. Jofish came up trumps by bringing an amazing seamstress/weaver (what is someone called who crochets for a living?) cozycoleman to my attention. Cozycoleman has some brilliant work for sale. In fact I immediately fell for her crocheted chess set and brought the last one.

(Don’t worry – she does sell the pattern.)

So how did Dave respond? Success! When asked if he was scared he replied “if I’m honest yes” 🙂 But this is where the plot thickens. It wasn’t the shocking anatomical nature of the educational birthing doll I used at the head of this post that got him, it was a later one from the same set. This one.

Cozycoleman isn’t out to shock. Her goal with these dolls is to help children understand birth. My intuition is that these dolls would do just that. I’m especially taken with the removable umbilical chord:

But looking back to that seated doll there is something spooky. I’m reminded of Mrs Bates from Psycho – someone who isn’t quite human. So perhaps the unsettling nature of these is that they are trying to look human and in so doing become scary. In his work on everyday perceptions of machine intelligence Alex has mentioned the concept in robotics of the “uncanny valley“. This hypothesis (by Masahiro Mori) states that we can cope with robots until they become too much like humans, when the slight differences unsettle us. He hypothesises that robot designers could work away and eliminate those differences, thus climbing back out of the valley. I’m not convinced. But back to wool. Armed with this new idea, that woollen humans would indeed be scary I’ve found some other examples on the blog http://mochimochiland.com/weblog/

First Anna (who writes http://mochimochiland.com/weblog/) found a very unsettling granny on a filler bag she’d brought, and she wrote about it in this post (http://mochimochiland.com/weblog/2008/07/creepy-polyfil/):

And now she’s found another great creepy scene, and written about it in this post: http://mochimochiland.com/weblog/2008/07/knitted-knitting-group/

Summing up, I think the uncanny valley may hold at least one key to how to make wool scary.

links for 2008-07-18

18/07/08

New Designers 2008

10/07/08

This year I cannot make it to New Designers 😦

In a way it’s a good thing since I keep promising myself I’ll learn to focus, and working with Linda on our book visualization project is so exciting that I am certainly getting some of that. But the build up to New Designers has been really fun this year so I was excited. In previous years Richard, Alex, and I have been really excited about the product design work coming out from Polly Duplock, Jon Rogers, Sean Kingsley (whose sexy legs are pictured above), Andy Law, and Pete Thomas’ students on the Innovative Product Design course at the Duncan of Jordanstone College of Art & Design in Dundee. The student’s degree show site is still up, so you can check that out to see just how cool their work is this year. It would be hard to pick a favourite I was most looking forward to seeing again, but Andy Ross’ “Bone Project” may be the one.

Interestingly last time Richard and I were up at Dundee (for the degree show) we had a chance to see lots of the first and second year’s work so we know that the next few years will be interesting too. For example here’s a book of cut out folding picnic crockery from Jacqueline Frary.

 

Another stand I was really looking forward to seeing was the work from Brunel‘s Multimedia Technology and Design course. It’s been my final year this year as their external examiner so I had the chance to see some of the work from the students there. Again there were several I was really looking forward to seeing again. Jason Peacock‘s video to Josh Pyke’s “Fill You In” is superb, and I couldn’t wait to see how Chris Wilmot had reduced his immersive VR positioning system to fit in their stand at New Designers! But the project I was most looking forward to getting into again was Rukaya Johaadien‘s “Impressionism

Rukaya riffs off impressionism, looking in particular at their fascination with water and with how a scene changes with the passage of time, the changing of the seasons. Rukaya hacked the Wii remote and built a digital brush that paint through a video of her local canal so that future frames are revealed as the brush strokes. Beautiful work, reminiscent of Hiroshi Isii‘s I/O Brush. If you are at New Designers do hunt this project out.

There’s lots and lots more that I’d have loved to have caught up with. Anglia Ruskin’s book illustration work is always fantastic. But I started this post talking about my new found focus, so I should stop blogging and get back to visualizing books 🙂

links for 2008-07-10

10/07/08

Getting Processing working with SQL Server 2008

09/07/08


"messy times"
from el frijole(?)

(N.B. If you read down to the comments you’ll notice that Michael Friis has written a shorter and far more readable version of this process with my erroneous steps removed at http://friism.com/processing-and-sql-server-in-windows )

I’ve just spent a day getting Processing (aka Proce55ing) working with a Microsoft SQL Server 2008 database. It wasn’t hard, just a bit fiddly, so I thought others might appreciate it if I documented my route. Partly because of the Processing language’s open source heritage most of the discussion about databases on the Processing site centres on MySQL, but with a few changes it can be made to work for SQL Server too.

STEP 1
I already had Microsoft SQL Server 2008 installed.

STEP 2
Next I downloaded the SQL Server 2005 JDBC Driver and unzipped it to the suggested default location. Ignore the 2005 in it’s name – it works for 2008 as well though does not confer the additional 2008 features. Following the set-up instructions I added "C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.2\enu\sqljdbc.jar" to the CLASSPATH environmental variable, though I think this might work without that step.

STEP 3
I used the code in Ben Fry’s book "Visualizing Data". It’s on page 291 in the section titled "Using MySQL with Processing". I adjusted it slightly – Ben hides the construction of the connection string inside the Database class’ constructor.

Here’s the helper class (added in a second tab)

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

class Database
{
  Connection conn;
  String connectionURL;
  
  public Database (String connectionURL)
  {
    this.connectionURL = connectionURL;
        
    this.conn = connect();
  }
  
  public Connection connect()
  {
    try
    {
      Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
    }
    catch (ClassNotFoundException e)
    {
      e.printStackTrace();
    }
    catch (InstantiationException e)
    {
      e.printStackTrace();
    }
    catch (IllegalAccessException e)
    {
      e.printStackTrace();
    }    
    
    try
    {
      return DriverManager.getConnection(this.connectionURL);
    }
    catch (SQLException e)
    {
      e.printStackTrace();
      return null;
    }    
  }
  
  public ResultSet query(String query)
  {
    try
    {
      Statement st = this.conn.createStatement();
      ResultSet rs = st.executeQuery(query);
      return rs;
    }
    catch (SQLException e)
    {
      e.printStackTrace();
      return null;
    }     
  }
}

and the main code is …

import java.sql.ResultSet;

void setup()
{
  Database db = new Database("jdbc:sqlserver://localhost:1433;databaseName=Book;integratedSecurity=true;");
  ResultSet rs = db.query("SELECT TOP 100 * FROM Words");
  
  try
  {
    while (rs.next())
    {
      String word = rs.getString(1);
      println(word);
    }
  }
  catch (SQLException e)
  {
    e.printStackTrace();
  }
}

But this threw an error: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect, and so I thought I’d try to get it working in the NetBeans IDE first.

STEP 4

At first I couldn’t get the code to build and needed to add a few import statements (e.g. this should have been a clue that I was using the wrong SQL library but there you go). Then I found Nipawit Luangaroon’s excellent post all about accessing SQL Server from NetBeans in which he gives clear simple instructions on adding the correct library to the project’s CLASSPATH:  http://www.linglom.com/2007/03/04/accessing-sql-server-on-netbeans-using-jdbc-part-i-create-a-connection/

STEP 5

Then I got a different error message: WARNING: Failed to load the sqljdbc_auth.dll com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. This time the online documentation came to the rescue: http://msdn.microsoft.com/en-us/library/ms378428.aspx I needed to copy the file sqljdbc_auth.dll from "C:\Program Files\Microsoft SQL Server 2005 JDBC Driver\sqljdbc_1.2\enu\auth\x86" to "C:\Windows\System32".

STEP 6

Still not quite there. The error message I got this time was back to com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host  has failed. java.net.ConnectException: Connection refused: connect. So I needed to check if the SQL server was running on the port I expected. I tried "telnet localhost 1433" from the cmd prompt which fail with "Connecting To localhost…Could not open connection to the host, on port 1433: Connect failed". Actually I’m missing out a step.

STEP 7

Install telnet. Vista doesn’t seem to have telnet enabled by default but if you go to Control Panel -> Programs and Features -> Turn Windows features on or off -> [check] Telnet Client -> OK

STEP 8

To find out what port SQL Server 2008 is running on I went into the management studio and expanded "Management" in the Object Explorer and then opened SQL Server Logs -> Current. That had a line saying that the server is listening on port 1434 (I thought it was on 1433). So my line of code became

Database db = new Database("jdbc:sqlserver://localhost:1434;databaseName=Pullman;integratedSecurity=true;");

Done 🙂

It’s all working now and I’m a happy bunny. I don’t know how many other folk are working through the same path but I thought I’d post it just-in-case it’s useful.

———- Revision ———-

I’ve just been struggling to get this working on Linda’s laptop. I think I missed out documenting a step. You seem to need a library directory containing sqljdbc.jar in the Processing libraries folder. For me that means creating a directory named sqljdbc inside C:\Program Files\processing-0135-expert\libraries. Within that directory create another called library, and inside that copy sqljdbc.jar from C:\Program Files\processing-0135-expert\libraries. Without this I get the same exception I’m seeing on Linda’s laptop: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver but with it the sketch works. I’ll check that fix works on Linda’s laptop too tomorrow.

links for 2008-07-09

09/07/08

Note to self: Western European Windows ASCII extensions come from code page 1252

06/07/08

I’ve just spent more hours than were available trying to work out how to get the StreamReader in my book-parsing C# code to recognise characters beyond ASCII. Here are some notes so I don’t spend so long next time!

  1. ASCII is seven bit so the characters covered have encodings 0 / 00 / 0000000 through to 127 / 7F / 1111111 (decimal / hexadecimal / binary). Wikipedia has a useful lookup table here: http://en.wikipedia.org/wiki/ASCII
  2. I’ve been reading in a text file that contains characters beyond this range. For example em dash (—), ellipses (…), quotation marks (“”, not the straight ones), etc
  3. Since computers usually use eight bits to store ASCII characters the additional space (0x80 through 0xFF) is used to encode such additional characters.
  4. But how does I tell which code page I am using? I could see the symbols when I opened the text files in word, notepad, or Visual studio. I could even tell the hex representation (from browsing ‘Insert Symbol’ in Word or opening the text file in Visual Studio’s binary editor), but which ASCII extension was it, and how could I get my C# code to use it?
  5. The library documentation for the .Net System.Text.Encoding class contains a long list of supported encodings and their associated code pages. Half-way down was a hopeful looking “Windows-1252 Western European (Windows)”
  6. Now things heated up. Wikipedia has a page showing the encodings in code page Windows-1252 and ‘Bingo!’, the character I was looking for (em dash) had the encoding I was seeing (0x97).
  7. Finally a quick search for “csharp StreamReader 1252” revealed the code I needed. I replaced
         using (this.bookStream = new StreamReader(fileName))
    with
         using (this.bookStream = new StreamReader(fileName, Encoding.GetEncoding(1252)))
    and all works fine!