Archive for the ‘itp’ Category

Since I didn’t migrate, a documentation of my upgrade

Wednesday, September 10th, 2008

Since I’ve had a WordPress blog for quite some time, and since I actually ended up writing both of my previous responses into my WordPress blog here and then using a nice copy+paste to get the content into HTML, there wasn’t a process to document for this week’s assignment. However, simply saying so seemed as if it would be something of a cop-out, and besides, there was some documentation I could do anyway!

See, due to the roadtrip I took this summer, the blog went un-administrated and un-updated for about four months. This meant that I fell behind a number of WordPress versions, and it was time to get that fixed. Since I didn’t have to install WordPress itself, I figured I’d run the upgrade process and document that.

At some point everyone using WordPress (and not using the “shut up and don’t tell me about updates” plugin) will notice at the top of their management page a notice that they’re out of date and that they should update. When it comes to WordPress it is extremely important that you do this in a timely manner because, unfortunately, WordPress is one of the most poorly secured widely used software packages on the net. There’s so much PHP, and there is absolutely no plugin vetting process. These two things combine to create any number of security loopholes that can be used by Bad People to hack your site. So when WordPress asks to be updated, it’s worth listening.

The process is pretty painless. In fact, it’s very similar to doing a WordPress installation. You download the latest version of the software package. You edit your config.php file (more on this later). You upload everything to the target directory. Then, instead of going to …/wp-admin/install.php you simply go to …/wp-admin/upgrade.php

Finally, you go have yourself a milkshake. (This is an important step, and not to be ignored.)

The main reason you can download the entire software package again and not worry about overwriting the existing files is that WordPress keeps everything you actually care about in the MySQL database that it connects to. All those files you upload to the internet when installing WordPress are just interface: they tell the system how to read and display information in the database and how to put new information there. Once you understand this, then the re-uploading the WordPress files thing makes sense.

What might not make sense is re-creating a config.php file. You did that once already, right? That’s how you made the site work the first time. Your database is the same, so is your username and password. Why can’t you just use that file? The answer is that the people developing WordPress keep changing what’s in that file. For instance, I was upgrading from a pre-2.5 version of the package so my original config.php file didn’t have any of the pass-phrase stuff entered in. WordPress will throw some funky errors if you try to upgrade without first fixing your config file. More interesting, to me at least, than the addition of new options in the config file, is the removal of old options. While I had to add three lines of config to upgrade, I had to removed two old ones. Apparently the WordPress team has someone making sure that they don’t just keep adding stuff, and in my book that’s entirely a good thing.

I went to the upgrade page, clicked a button, and WordPress conveniently checked all my files and then reformatted my database to the new information schema. This is important because many features the system adds requires information to be organized in a different way. Back in version *mumble*, where they introduced tags and categories to the software, the entire organizational structure had to be rebuilt from the ground up because the original design just couldn’t handle the things.

Anyway, all went well, my blog is updated and running smoothly (though I did have to re-install one of my plugins). Now I’m off to get a milkshake.

Thomas

Orality and Literacy Chapters 1-4

Monday, September 8th, 2008

Orality and Literacy is a 1988 book by Walter J. Ong. It is a discussion of the differences in thought patterns in “primary oral” cultures (those cultures without writing, or which have not yet internalized writing) and literate cultures. The first four chapters introduce the basic subject of study and focus on two things: 1) The ways that lack of literacy impact human thought processes, and 2) The way that the development of writing technology change the human thought processes.

Ong supports neither orality or literacy as superior to the other, but he does note that many valuable developments in human society are simply not possible without the development of literacy. The core issues at work behind the shifts in thinking from orality to literacy (and vice versa) are memory and abstraction.

Early in the book Ong makes quite a big deal about the orality of non-literate language itself being important and necessary to the issues he is discussing. I feel that this is a mistake, though it actually has little bearing on the rest of his thinking. Ong seems to feel that the absolute impermanence and invisibility of spoken speech is a big part of what influences its development. He may well be right, but I do think it is unnecessary to put so much weight on the spoken word when it might have been the case that we all ended up communicating with sign language, or via smell. The dominance of spoken language is not really a historical accident, but is certainly attributable to the specific situations of early humanity: the need for long distance, large audience communication. Sound is just better at that than most media.

As I mentioned, this erroneous focus on aural transmission does nothing to dull Ong’s real point which is that oral conversation is impermanent. Oral records exist literally only in memory. It is impossible to go back and examine a conversation even as it is in progress. (This contrasts fascinatingly with things like email or IM conversations where the entire record of discussion is available verbatim at all times.)

According to Ong, and I certainly think he is correct, the need to remember everything forces an entire set of thought organization and speech patterns on primary oral cultures. Everything worth knowing must be easy to remember because otherwise not enough people will remember it for it to continue being useful to society. This means that things worth knowing must be set into formulaic phrases in order to allow them to better fix themselves in memory. What’s more, these phrases must be repeated constantly in order to reinforce that memory. Primary oral speech patterns are thus full of formulaic phrasings which are oft-repeated.

In addition to forcing this sort of highly mnemonic structure on language, primary oral situations also generate a sort of low-abstraction thought pattern. Since oral language is impermanent it is used only in immediate situations. When I talk about something (Ong uses the example of a tree) in an oral situation I mean a specific tree. Or, perhaps, I mean a tree in a specific location (as in “we should plant a tree here”). Even when recounting events that have occurred in the past I convey the situation in which they occurred: “We were out in the backyard and I was saying we should plant a tree there”. With such a direct level of connection between spoken utterance and direct experience high level abstraction doesn’t occur.

Ong’s book comes at a fascinating time historically. He makes clear distinctions between chirographic (cultures with hand-writing) and typographic (cultures with printing presses) cultures. Though literacy obtains in each, the impact of literacy on thought changes as writing technology does. Writing in the mid and late 80s, Ong missed the explosion of the next big writing technology: the internet.

The reason the internet pertains here is that, while Ong doesn’t seem to make a big deal of this, perhaps because he does not fully recognize it, the entire orality/literacy duality turns on one class of technology: memory aids. Writing is the first, easiest, and perhaps most flexible memory aid ever produced. Chirographic cultures are able to use it primarily for aiding personal memory: writing thoughts as they occur. But production is too slow and expensive to generally externalize one person’s or group’s memory to the culture at large. The printing press adds to the advantages of chirography the ability to mass-produce certain works and thus make them generally available. This allows certain thoughts to become generally stored in the cultural external memory.

The internet, and computer technology in general, allows for even more off-loading to external memory. And, perhaps more importantly, allows one to carry and/or access an entire library near-instantaneously. In a purely typographic culture one might know that one has access to an idea or thought, but must find the book which contains it and then find that thought. We are rapidly moving to a point where anyone can instantly search their library (or Wikipedia for that matter) for just the thought they are looking for. This large-scale near-instant access of printed material is beginning to produce yet another shift in thought processes.

The key observation Ong has is that as memory becomes less and less important humans are able to devote less and less of their linguistic and mental structures to it. This allows language and thought to shift in other directions, focusing on solving other problems. It’s a shift that I suspect we’re about to undergo again.

Thomas

Reaction to the NYC Waterfalls

Friday, September 5th, 2008

For those who aren’t familiar, and I suspect that’s true of many people, the NYC Waterfalls are a public art project. The basic construction is a scaffolding system with a set of pumps placed near the East River. Water is pumped up to the top of the scaffolding and allowed to fall. The effect is, in some ways, quite waterfall-like, hence the name.

The first time I saw the waterfalls was while my dad was in town at the beginning of August. We had hopped the Q-train, I think on the way back from Central Park or something. The train goes across the Manhattan Bridge, and it has an excellent view of the Brooklyn Bridge. One of the waterfalls (there are four) is erected beneath the Brooklyn Bridge on the Brooklyn side. He asked what it was, and I wasn’t sure. That particular waterfall, due to its placement, looks almost like part of an industrial process. It’s hard to see it as free-standing as opposed to some auxiliary structure attached to the bridge.

I didn’t think anything more of it until we got to our first meeting of Comm Lab here at ITP where one of the week one assignments is to visit the waterfalls and write a reaction. Upon realizing that this was an art project, my initial reaction was relatively negative. A sort of “you’re spending public money on what now?” thing.

Having hopped on the IKEA ferry which goes by three of the four waterfalls, and viewing them myself, I was less than impressed. They’re sort of cool, yeah, but nothing spectacular. They don’t evoke the same sense of wonder that real waterfalls do. I suspect that this is due to the lack of waterfall context. Part of what makes waterfalls so awe-inspiring is the sharp cut in the landscape that accompanies them. The sense of insane natural power involved in carving rock and all that water rushing down. When it’s man-made some of that impact is somehow gone.

That said, I can’t actually be unhappy about the waterfalls for one simple reason: while we were waiting in line for the ferry I watched this family a couple of places in front of us. One of their children was a boy who looked to be maybe seven or eight. (Sadly I’m really bad with ages of this sort, which is deeply ironic considering how much time I spent working with kids in the age bracket.)

Anyway, there was this kid, and he was so excited by the prospect of getting on the ferry. He wanted to see the waterfall! He wanted to go to the waterfall! He wanted to play at the waterfall! (I suspect that playing at the waterfalls is not actually permitted, but he didn’t care about that.) So while I, with my world traveling and my viewing of massive natural waterfalls may find the constructed forms lacking and almost a mockery, there is value in them nonetheless.

That value is for the city of New York. I suspect that it’s something I’m going to have a hard time maintaining a proper view of. ITP is an international community, it is peopled by the well-traveled and in many cases by the travel-obsessed (like myself), but New York City itself is like any other place: a huge percentage of the population never leaves. There are kids, probably thousands of them, who will never come closer to a waterfall than this in their entire lives.

While the New York waterfalls may be sad ghosts of the real phenomena they try to emulate, there is power and suggestion in them anyway. A kid seeing them, and applying sufficient imagination, may grasp some of the wonder that comes from such structure. Perhaps they will not experience the same thing that (say) Niagara can instill, but then again maybe they will.

Thomas

Physical Computing Lab 1

Thursday, September 4th, 2008

In less I hate the world news, here’s my first real project at ITP. Physical Computing Lab 1 is really more of a “get your feet wet” lab than anything else. The linked lab there is actually more complex than the one we actually were requested to execute.

We’re using the Arduino chipset and codebase for digital control, and the first project was just a “learn about digital design, do a tiny bit of programming”.

We were asked to design a system that, when a switch is activated an LED flashes on and off; when the switch is not activated, the LED stays off.

Most people come out of high school with at least a rudimentary understanding of electricity and thus know how to right a switch-to-light bulb circuit. That’s the first lesson that has to be unlearned for people doing digital work, and that’s probably the important bit (beyond “you can do it”) that this first lab teaches. See, in digital circuit design, inputs and outputs are independent circuits. Instead of rigging the switch to the light circuit, you design a switch circuit connected to the controller and a LED circuit connected to the controller. Their only link is that controller. It looks something like this:

Conceptual Diagram

This means that two separate circuits need to be designed: an LED circuit and a digital switch circuit. The LED circuit is simple, and doesn’t require explanation of the difference between analog and digital switching, so let’s start with that.

An LED circuit is almost precisely identical to the classic light bulb circuit. It takes power from some source, feeds it through an LED, and runs that to ground. You’ve probably seen this before. There, is, however, an important exception here. See, the current that the Arduino puts out is actually too high for a standard LED and would burn it out. This means we want to slow that current down so we use a resistor. 220ohms is about right for our purpose here, so we end up with a circuit that looks a lot like this:

Diagram of the LED circuit

Of course I didn’t have a 220ohm resistor handy, so I did the next best thing: I grabbed a pair of 100ohm resistors and linked them in series. When you line resistors up like this in a circuit, you add their resistance together. It’s quite convenient. So the actual circuit I built looks like this:

Alternate LED circuit diagram

My actual design is very exciting. It looks like this:

Image of my LED circuit

With the LED circuit completed, the next step was to design a switch circuit. The traditional analog switch is simple: a switch with a power source at one end and ground at the other. Unfortunately, digital switches are a bit more complex. See, digital switches are constantly looking for an input. If they sense one then they are “on”, if there is no input then they are “off”. For analog purposes an open switch doesn’t let enough current across to do anything significant, but in a digital switch system an open switch may still allow static electricity or power generated by magnetic interference flow to the sensor, confusing it. This means that all digital switches need to be grounded in order to keep them at zero current when they are open.

It’s the “when they are open” part that gets problematic because we need to ensure that when the switch closes that the current doesn’t flow into the ground, but into the digital sensor. We accomplish this with a huge, ginormous resistor. When the switch is open there is a single loop: sensor to ground. This means that no matter how big the resistor is, the loop stays closed and the sensor is grounded out. When the switch is closed, however, the current from the switch has two potential directions: to the sensor, or to ground. By putting a large resistor on the ground side we ensure that the power flows to the sensor, switching it on.

Another diagram (it’s worth noting that in this particular circuit the system is so low on resistance that you can use just about any resistor you want here):

A diagram of a digital switch

Since I didn’t feel like getting out an actual switch, I built my own… sort of. I simply left an exposed section of wiring at the end of my power lead, and another one between the resistor and the micro controller. The switch is “closed” whenever I touch the exposed wires together, and “open” the rest of the time. It looks like this:

This totally \"awesome\" switch I designed.

Now all we have to do is connect our two separate circuits to the controller. We already know how to do this with the switch since it’s wired to an input, and doing it with the LED is just as simple. Since we want the LED to be an output of the circuit instead of an input, we want to connect the power end of the LED circuit to one of the controller pins.

What we get looks something like this:

Combined circuit diagram

What we have here are two circuits linked by a micro controller. The first circuit is a simple light: when the controller gives the signal, the light turns on. The second circuit is a simple switch: the controller constantly listens to see if there is power flowing across the switch or not. Using my amazing breadboard-less skills, it looks like this:

The modern sculpture of my complete design!

Now that we have our exciting digital system, we need to do something with it. There are all sorts of possibilities now because we have a switch and a light. We could make the light simply turn on when the switch is closed, we could make it flash, we could even make it flash at a rate based upon how long the switch has been closed. For now let’s just do something simple, but at the same time let’s do something that actually requires a micro controller to do. That means no flash rates based on how long the switch has been closed, but it also means no simple “close the switch, turn on the light” since we can do that in pure analog systems. Leaving us with the second option: “when the switch is closed, the light pulses”.

With the circuit designed, the actual command system is entirely software-based. Arduinos use a very simple codebase, so here’s all we have to code up:

void setup()
{
pinMode(2,OUTPUT); // Set this pin as an output,
// It is where we plug in the LED
pinMode(3,INPUT); // Set this pin as an input,
// It is where we plug in the switch
}

void loop()
{
if(digitalRead(3)) // If there is current on the switch's pin
{
digitalWrite(2,HIGH); // Output current to the LED
delay(1000); // Wait one second
digitalWrite(2,LOW); // Stop outputting current to the LED
delay(1000); // Wait one second
}
} // Repeat the loop code indefinitely

Load that code into the Arduino and you’re all set to go. With a little work, you too can have an amazing circuit like mine. Here’s a nice 30 second video of it in action:

Thomas