It’s just data

Interface Constraint - Visualized

<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
 
<svg id="body" width="600" height="600" viewBox="0 0 600 600"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:xlink="http://www.w3.org/1999/xlink">
 
  <title>outlet</title>
 
  <defs>
    <g id="plug">
      <path d="M100,0 c0,0 -100,100 0,200 l200,0 c0,0, 100,-100, 0,-200"
         style="fill:rgb(128,128,128)"/>
      <path d="M150,50 l20,0 l0,50 l-20,0 Z"/>
      <path d="M230,50 l20,0 l0,50 l-20,0 Z"/>
      <circle cx="200" cy="150" r="20" />
    </g>
  </defs>
 
  <g>
    <use xlink:href="#plug" x="50" y="80"/>
    <use xlink:href="#plug" x="50" y="300"/>
    <path d="M50,20 l400,0 l-20,20 l-360,0" style="fill:rgb(64,64,64)"/>
    <path d="M50,20 l0,550 l20,-20 l0,-510" style="fill:rgb(128,128,128)"/>
    <path d="M50,570 l400,0 l-20,-20 l-360,0" style="fill:rgb(160,160,160)"/>
    <path d="M450,20 l0,550 l-20,-20 l0,-510" style="fill:rgb(96,96,96)"/>
  </g>
</svg>

If only systems integration could be this simple...

Posted by Jason at

Simple? Hmm...

Posted by Arien at

I’ve always been horribly confused by American sockets. They’re fine if you have a three-pronged plug, but I never know which way round a two-pronged plug is meant to go.

(Picture for the SVG challenged)

Posted by Simon Willison at

Further background on this: prior to a flight out to Oregon, I downloaded Batik.  Not knowing anything about SVG, I created this picture using only vim.

Posted by Sam Ruby at

Hmm.  Modern North-American plugs actually have a slightly larger left socket than right socket, with the neutral contact on the left and the live one on the right.  See wikipedia

Posted by David Ascher at

Sam Ruby: Interface Constraint - Visualized

8-)...

Excerpt from del.icio.us/distobj at

Sam Ruby: Interface Constraint - Visualized

8-) (link) [del.icio.us/distobj]...

Excerpt from Web Things, by Mark Baker at

Sam - nice work - I didn’t even know about the Batik project.  Any plans to share the source code for your ‘interface’ generator?

Arien - as for the simple comment, well, the fact that the range of interfaces (~13) can be summed up in one reasonable length web page is somewhat of a indication of the relative simplicity.

That said, the page does highlight one point - the electrical outlet interface contract seems to be somewhat broken.  Based on the ‘Electricity around the world’ guide, it looks like the same outlet interface may supply electricity at different voltages in different countries.

Posted by Jason at

Jason: interface generator?  The only tools I used were a text editor, the batik-rasterizer, and a browser.

What amazes me is that a few years later, I can post the results without explanation; and people will not only know what to do with it — they will also instantly recognize the resulting graphic despite the rather crude rendition.

Zero Training.

Posted by Sam Ruby at

Sam - maybe I was being a bit too subtilely tongue-in-cheek when I used the term ‘interface generator’ ;) 

I see the Batik rasterizer converts SVG files into a raster format, but I was a little thrown off by your comment about ‘not knowing anything about SVG’.  Did you use the other components of Batik to help create the initial SVG doc, or was it a case of just immersing yourself in the spec and doing some good old-fashion experimentation?

Posted by Jason at

Jason, I copied an example (I no longer remember which one), and slowly morphed it until I got the desired result.  In the process, I referenced the spec only for very specific and targeted questions.

Posted by Sam Ruby at

I copied an example (I no longer remember which one), and slowly morphed it until I got the desired result.

i.e., Monkey see Monkey do. :-)

Posted by Santiago Gala at

Sam Ruby: Interface Constraint - Visualized

deusx : Sam Ruby: Interface Constraint - Visualized - “Not knowing anything about SVG, I created this picture using only vim.”...

Excerpt from HotLinks - Level 1 at

Uniform Interface

Wow. Self-cloning robots. Check out the vid. As a trained AI guy, I’ve had to study the theory, but when you see one, it’s equal parts cool and creepy. Maybe it’s a T-alpha. But as a metaphor for SOA or REST uniform interfaces, it will rock. I don’t know how you could look at that movie and feel the same way about custom interfaces afterwards as you did before. Wall sockets don’t quite capture it. [via Richard]...... [more]

Trackback from Bill de hÓra

at

Uniform Interface

Wow. Self-cloning robots. Check out the vid. As a trained AI guy, I’ve had to study the theory, but when you see one, it’s beautiful. And creepy. The word I’m looking for is sublime. Maybe it’s a T-alpha. But as a metaphor for SOA or REST uniform...

Excerpt from newgenfilms.com - a new generation digital application. at

Add your comment