Archive for May, 2005

NYTimes affiliate program…

Wednesday, May 18th, 2005

Via the Six Apart Pronet blog, TimesSelect as a blog business opportunity?:

“We want to create a second robust revenue stream,” he explained, filling me in on some of the details and answering key questions about the timing, advertising and the blogosphere. One aspect of the plan is specifically for bloggers — an affiliate program a la Amazon.” (Martin Nisenholtz of Times Digital)

This is wicked smart – I even said so a few months ago…

On code and words…

Wednesday, May 11th, 2005

Lately, I’ve been doing more coding than writing; in fact, at times it feels as if a large switch has been thrown in my mind, and my default mode is now the former, rather than the latter.

As practices, coding and writing can be quite similar – in both cases, though I might sketch an idea out on paper beforehand, the bulk of the work is done sitting in front of a computer screen, making sequences of characters appear in a text-editing window on my computer’s screen. Arguably, part of the reason that one tends to crowd out the other (one way or another) is the sheer similarity of the two actions…there’s only so much time that one can sit and type on a keyboard, and the activity will naturally come to be associated with whatever you use it for the most.

This is the thing that concerns me – when I sit down at my computer these days, my mind begins to automatically ease into coding mode. I say that this is a concern for one main reason; though I enjoy both, I fundamentally identify more as a writer than a coder.

The difference, as I see it, is less one of practice than of intent. As I said, both coding and writing involve stringing together symbols, but with different normative goals; there’s a richness to prose, meant to be read in many more ways than the spare efficiency of code written solely to achieve a discrete task when executed. I find coding to be a more mechanistic process, constructing a Rube Goldberg-esque machine which, when set in motion, is ultimately assessed on one criterion – does it work? Prose, on the other hand, can aspire to more than mere functionality.

I don’t mean to denigrate code – there can be an elegant beauty or astonishing intricacy to a well-crafted function, but in the end, it’s meant to be executed, and execution seems fundamentally different from reading. It might just be a question of the user’s intent…we come to a program expecting it to work, but we come to a book looking for more than the pure conveyance of information.

The thing I’ve been noticing is that the more time I spend coding, the more my prose begins to resemble code. As I’ve begun to associate my keyboard more with coding than writing, my writing has become more functional, less joyous. In some ways, this isn’t anything new – my trajectory throughout graduate school was toward a simple formula, “writing = argument,” and the upshot of this “tyranny of the thesis” is an unfortunate state of affairs in which I’ve grown to see writing in mostly instrumental terms. The words become a means to an end, not really much different than lines of code, and the more code I write, the harder I’m finding it to recapture a mode of writing as more than purely informational. On the fringes of my conscious mind, I can tell that I’m grasping to bring back a sense of joy (or at least something more than workmanlike trudging) into my prose, but I can’t seem to find it.

Even more unsettling, I’m finding that my coding skills are getting sharper and sharper, but my writing feels as if it’s getting muddier. It’s shouldn’t come as a surprise, really – I’ve been exercising the former on a daily basis, while my experience with the latter has mostly been limited to revisions on my dissertation, a project of which I’m more or less tired by now (this work falls solidly into the “green vegetables” mode of writing – I’m doing it more because I know that it’s good for me and my career than because I really want to do it). Maybe things’ll improve once I get this damned manuscript out the door, and take the time I’ve been learning to carve out of every week and apply it to fresh ideas and fresh projects…

Page-by-page authentication in MediaWiki

Wednesday, May 4th, 2005

In the interests of centralizing information, we’ve started an internal wiki at the Center that will eventually function as a sort of dynamic handbook to our facilities, staff and projects. The choice of a wiki was ideal, because each staff member can flesh out the documentation on his or her projects, and since it’s for internal use, we can take the general good intentions of users for granted.

However, there are some pages that will need to be restricted to certain users (things like payroll/budget information, or staffing discussions), so I went ahead and wrote a small plugin that allows any user to restrict access to a wiki page by embedding the allowed usernames within a special tag (working off of a really useful blog post outlining MediaWiki plugins).

Here’s what you do. Save the following code into a file called “accessControl.php” in your MediaWiki /extensions directory


< ?php
// MediaWiki extension that enables access restriction on a page-by-page
// basis
// Added 5/3/05 by Josh Greenberg
// [based on code snagged from http://daryl.learnhouston.com/?p=125]

//Add the hook function call to an array defined earlier in the wiki
//code execution.
$wgExtensionFunctions[] = “wfAccessControl”;

//This is the hook function. It adds the tag to the wiki parser and
//tells it what callback function to use.
function wfAccessControl() { global $wgParser; # register the extension with the WikiText parser $wgParser->setHook( “accesscontrol”, “controlUserAccess” );
}

// The callback function for user access
function controlUserAccess( $input ) { // Grab currently logged in user global $wgUser;

// Create array of users with permission to access this page $usersAccess = explode(”,,”, $input); // Trim leading whitespaces from usernames foreach ($usersAccess as $userEntry) { $userEntry = strtolower(ltrim($userEntry)); } // Put up an error message if current user doesn’t match // accesscontrol list if (!in_array(strtolower($wgUser->getName()), $usersAccess)) { echo ‘‘; exit(); } return $output; } ?>

Then, add a line to the bottom of your LocalSettings.php to tell it to include the plugin:

include("extensions/accessControl.php");

That’s it for the installation. To restrict access on a page-by-page basis to specific users, just include the names of the allowed users within an tag (separated by double commas) in the body of that page. Thus, if you wanted to restrict access to the people with usernames “Fred”, “janedoe” and “Josh Greenberg”, you would use the following syntax:

<accesscontrol>Fred,,janedoe,,Josh Greenberg</accesscontrol>

Be careful with this! If you’re restricting access to a page, make absolutely sure that you’re including your own username within the <accesscontrol></accesscontrol> tags, or else you won’t be allowed to reload the page to fix your mistake. If you find yourself locked out of a page that you need access to, you’ll have to disable the plugin.

On choosing an e-mail address…

Monday, May 2nd, 2005

Just sent off a proposal for a lunchtime discussion session at this year’s annual meeting of the Society for Social Studies of Science, and was struck by a small dilemma as I was composing an e-mail to the conference organizer – in short, I hesitated over my choice of which e-mail address I should use to send the message.

There are two main address that I use for correspondence, one ending in epistemographer.com and the other ending in gmu.edu. I tend to use them relatively interchangeably for day to day work correspondence, though I do tend to use the @epistemographer.com one for my personal life (not that work and personal life don’t tend to bleed into each other quite a bit). In composing the 4S e-mail tonight, I initially lingered over the “Account:” drop-down less for any deep, philosophical reason than for a simply technical one: the George Mason mailservers have been embarrassingly spotty recently, and mail sent to that address can take up to several hours to show up in my inbox.

However, after ticking off the epistemographer.com address and pressing "send", I realized something odd - I was the only one of my proposed co-panelists (cc:-ed on the e-mail) whose e-mail address wasn't a university. I felt momentarily self-conscious, as if I were somehow going to be seen as an impostor, an interloper from outside who didn't carry the same stature as a bona-fide credentialed professor. I remembered the stigma that an aol.com address carried in many communities, and started thinking of how incredibly important an e-mail address is in general, but to academics in particular.

Think about it – the work we do is less defined by the particular institution for which we work than most other professions, yet our e-mail addresses (our dominant means of professional communication) tend to clearly identify us with a particular institution. If a lawyer or a CEO changes firms, her change in e-mail address makes perfect sense; she doesn’t need to maintain her old workplace identity, and in her professional life can wholly attach herself to her new employer’s name. For academics, however, the politics of e-mail addresses seem more murky – we’re less fee-for-service contract workers than free agents who happen to find shelter in one institutional home or another, and when we leave one institution for another (or for no institution at all), our main working identities may remain fundamentally unchanged. Unfortunately, the institutions might disagree, forcing us (especially those in the post-graduate-itinerant-scholar mode) to change our public “face” whether we like it or not.

The safest thing to do as an individual scholar seems to be to build up a set of structures that would allow you to maintain your identity independently of your particular institutional context. In a sense, I think this is what I’ve been unconsciously doing with my epistemographer.com domain and e-mail address…asserting more control over my public identity, and making sure that I have control over the public persona I’ve created (and its various names/addresses) no matter where my career happens to take me. At the same time, however, I’m wary that my carefully-constructed persona might be seen as somehow lacking, inferior to a more directly-credentialed public identity that would wear its university affiliation on its sleeve.

I’m thinking that one of the best pieces of advice I could give to a first-year graduate student would be to pick out and register a domain name that is professional yet unique, and start building it into an identity that is under nobody’s control but their own. It might well be the best $30 investment they’d ever make.