Sewing pattern archive for all you textile geeks

From Indie Craft Gossip I heard about a huge pattern archive with pictures and data on sewing patterns from the U.S. dating back to 1860. There aren’t any instructions for sewing, but the pictures and the pattern designs themselves are amazingly cool and funny. I don’t even sew, and it was fun to browse their pages on the “guest access” password. Check out these matching dresses with oven mitts from a 1943 Simplicity pattern:

Matching oven mitts!

The search interface is a little annoying to use, but if you take a look at a pattern or two, you might notice that the urls are all the same and end in a pattern ID number. In fact, each picture on the pattern pages is named after that pattern id. If you would like to use them for private research or study purposes or personal use, that seems to be permitted.

In fact you can do that really handily by making a short shell script,

#!/bin/bash
for n in {1..100}
do
wget -r -l1 -np http://guest:pattern@www.uri.edu/library/special_collections/COPA/garment.php?patID=$n
wait 3
done

This would get you the first 100 patterns and you can search through their metadata on your hard drive with grep instead of using the clunky search boxes on the web site. I would recommend you not get too many at a time because it might be rude to their server, but find a range that you think are interesting, or copy the pattern ID numbers from a particular search. So if you wanted to fetch only patternIDs 14287, 10001, and 20, your script would look like this:

#!/bin/bash
for n in 14287 10001 20
do
wget -r -l1 -np http://guest:pattern@www.uri.edu/library/special_collections/COPA/garment.php?patID=$n
wait 3
done

This is assuming you’re using Linux or on a Mac with Xcode or where you have installed wget.

That wasn’t at all obvious to me at first and I messed around for 2 hours tonight trying to figure out how to do this. First I tried using curl because you can put a range of numbers in brackets to download sequential urls like this:

curl http://guest:pattern@www.uri.edu/library/special_collections/COPA/garment.php?patID=[1-10] -o pattern-id-1#.html

But that doesn’t get the images, which is no fun.
wget alone can get the images but only from a single url:

wget -r -l1 -np http://guest:pattern@www.uri.edu/library/special_collections/COPA/garment.php?patID=10

I tried writing some perl but wget is very annoying when you try to do a system call with it in Perl. Let’s not even go there. Meanwhile there was some really dorky googling of things like “files sequential variable mirror wget”… and “bad port number perl wget system call”.

Then I tried this script called curlmirror which almost worked.

Suddenly I stopped messing with it and wrote a 4 line shell script instead, feeling a little sheepish.

So, if you had set out to do this would you have realized how to do it quickly? Or do you have a better or different way to do it? On a meta level, have you messed around like this in several dead ends and do you find that to be stressful, normal, or downright fun? (I found it a mixture of all three; stressful because it feels like I “should” see the way to make it work, or the best way, immediately. It’s fun because I enjoy dabbling in all these possible methods and learning something.) Would you explain that you did non-working things for 2 hours first or do you think it’s better to just come out with the solution and not say how you arrived there?

Social coding, OMG Ponies

I love pair programming and working on code with other people and talking things through. In short, editing code as a social activity. If you noticed Google’s Mobwrite, it was a large scale collaborative editor, fun to play with, basically a real time wiki. Bespin provides a structure within a browser window to check code out from an svn repository, and edit it at the same time as other people, who appear in a sidebar. You can start projects and give people you “friend” varying levels of access to the code.

I’ve experimented with collaborative coding using screen for pair programming, and during meetings to discuss code. It’s best done in person or with voice and chat at the same time. Bespin looks like an incredibly useful extension of that concept. I hope that there will be effort to make it as universally accessible as possible.

I see Bespin as something that might be especially useful to women coding together, and I’ll see how Dreamwidth project members feel about trying it out. I could also see it being quite useful for people I know at BlogHer to debug WordPress templates. I think that women might more often than men buy into the myth of the lone and lonely programmer, the hermit-like coder genius, where code springs out full grown like Athena from Zeus’s head. But in my experience guys hack together and thus they learn together, while women are not only more often isolated, but are under more pressure to display perfect solutions or not to expose work in progress — a systematic pattern of that kicks in very hard when we’re teenagers.

The soul of open source is collaborating and improving on previous work. I think that collaborating in real time as a friendly social activity, with conversation, will feel more comfortable to some women than checking in code and waiting for feedback. So, I predict that Bespin and tools like it will be a powerful factor bringing women into coding and into open source communities, as a social activity to be done with friends.

Bespin Collaboration from Joe Walker on Vimeo.

Links:
* Stop, Collaborate, and Code
* Collaborating with Bespin
* Bespin Tutorial
* Introducing Bespin
* Collaboration in Bespin