Solving a Drupal Timestamp Problem

This is a post that will not be of interest to 99.9% of the people who see it, but since I’ve spent the last two months or so trying to remember how I solved the problem the first time I faced it, I feel the need to put it down in writing.

The Problem (Part 1): Drupal’s webform module makes it possible for submitters to edit their previous submissions, but while it tracks when the original submission is made, it does not do so for subsequent edits.

The Solution (Part 1): I created a hidden field [‘edit-submitted-timestamp’] in the form, and added a bit of javascript in a block at the bottom of the form [document.getElementById(‘edit-submitted-timestamp’).value = Date()] so that every time the form was edited, the browser would insert the current date in the hidden field.

The Problem (Part 2): Just using “Date” meant that browsers would insert the date in an unwieldy format (usually something along the lines of “Wed, Mar 19 2014 09:24 GMT -0500 (Central Daylight Time)”), and worse, did so inconsistently (since the format seems to depend on the user’s browser, operating system, etc.)

The Solution (Part 2): A bit of tweaking to the javascript was necessary to ensure a consistent and sortable date was being inserted. The final script I wound up with is:

<script>
function addDate(){
date = new Date();
var month = date.getMonth()+1;
var day = date.getDate();
var year = date.getFullYear();
var hours = date.getHours();
var minutes = date.getMinutes();

document.getElementById(‘edit-submitted-timestamp’).value = year + ‘-‘ + month + ‘-‘ + day + ‘;’ + hours + ‘:’ + minutes;

}
window.onload = addDate;
</script>

UPDATE: This turned out not to be the best format for sortability (no padding 0s for numbers under 9), so here is the updated Javascript:

<script>
function addDate(){
date = new Date();
var month = date.getMonth()+1
if(month <= 9)
    month = ‘0’+month;
var day = date.getDate();
if(day <= 9)
    day = ‘0’+day;
var year = date.getFullYear();
var hours = date.getHours();
if(hours <= 9)
    hours = ‘0’+hours;
var minutes = date.getMinutes();
if(minutes<= 9)
    hours = ‘0’+minutes;

document.getElementById(‘edit-submitted-timestamp’).value = year + ‘-‘ + month + ‘-‘ + day + ‘;’ + hours + ‘:’ + minutes;

}
window.onload = addDate;
</script>

Higher Ed Web vs. the Academy

This month marks eight years since I made the decision to withdraw from a PhD program at the University of Chicago Divinity School and become a full-time web professional. It was a difficult decision to make, given the five years, the lord knows how much money, and the amount of my own identity I had already invested in the idea that I was one day going to be a religion professor. As the anniversary rolls around, I’m still sure I made the right choice; not the least of the reasons for this has to do with an observation I made recently about the nature of life within the respective spheres of the academy and the world of the higher ed web.

I recently spoke on a panel about potential non-traditional career paths with a Div School master’s degree. The students I met were all very nice, and of course very smart; but there was a certain look in many of their eyes, a demeanor that I recognized all too well from own time there. It was a wary cautiousness, bordering on defensiveness, that immediately brought me back to how it felt to wander through academic conference rooms where a cloud of insecurity seemed to hover in the air, a general fear that a single well-placed question might reveal one as a fraud who had only been admitted to this world of frighteningly intelligent people through some sort of clerical error.

I thought about how different that feeling was than the time I’ve spent at higher ed web conferences, where a strong sense of community and “we’re all in this together” camaraderie always seems to reign, and where being able to play a good hand of Cards against Humanity or belt out a karaoke song without fear tend to be more important than maintaining any sense of professional decorum. I think this difference is due in part to the respective media within which academics and webbies live. The academic process, in my experience, seems inherently individualistic, and thus isolating; from the admissions process to the dissertation defense to the job hunt and beyond, the experience is a largely adversarial one, with a single individual’s work being held up for scrutiny and judgement by more senior authorities or one’s own peers.

Web professionals, on the other hand, must quickly accept that our field changes so quickly—total paradigm shifts can occur within months, rather than a generation—that we are dependent upon our community for help. Very few of us can possibly know everything we need to know in order to do our jobs well, and most of us either are lucky enough to either work in teams or are constantly asking colleagues for, say, a bit of javascript help or some quick design feedback for our latest project. Building the web, I would argue, is inherently collaborative, more like putting on a play than writing a book, and thus cultivates a sense of the need to share, to help one’s peers, knowing that you yourself will almost certainly need their help in the very near future.

To be clear, I’m in no way claiming that there is not a sense of community among academics in a given field or a given graduate school cohort; I know that many of my friends who have remained in academia gain much from their support networks within the academy. But I would argue that the structural differences I’ve just described make that sort of community far more difficult to create and maintain within academia. If higher education is interested in improving the quality of life of its budding professionals, it could do worse than taking a page from the folks who build its websites.

Pressing Rewind on UChicagoLaw’s Audio

Cross-posted on the University of Chicago Law School Electronic Projects Blog.

This week we launched an overhaul of how audio is stored, presented, and discovered on the UChicagoLaw website.

Chicago was a pioneer among law schools in terms of posting audio content, when it started posting recordings to the Faculty Blog back in 2005. Since then, we’ve assembled a library of over 400 files, that have been downloaded somewhere north of 1 million times. Dedicating all of that bandwidth to audio was starting to take a toll on the rest of our website, so we decided to take a cue from NPR and start migrating our files to Soundcloud. Two months later (and yes, I moved each one of those 400+ files by hand), our Soundcloud page is finally ready for prime-time. We’ll keep posting audio to pages on our website, but we’ll now be doing so as embedded Soundcloud widgets instead of via a player run through the audio module on our website. In addition to improving our site’s performance, we expect that using Soundcloud will make our audio easier to share (look for the “share track” link on the individual widgets) and make it more accessible to those on mobile devices, as well as expose our content to a whole new audience in the Soundcloud community.

The move has required some changes. Our podcast feed will now be served from Soundcloud rather than our own website, and we are only permitted one feed per account, so we will be retiring “Open Minds: The Student Events Podcast,” due to low subscription numbers. We will still be posting recordings of student events to Soundcloud and our website, however.

We’ve also made some tweaks to how users can find audio on our website by making it easier to reach the audio archives homepage from every audio page on the site, as well as by showing links to the five most recently added audio files on each of those audio pages.

So, bottom line: what does all of this mean for the methods by which you can stay up-to-date with all of the all of the great audio content the Law School is creating?

On our site: Visit our Audio Archives page to browse through the hundreds of audio pages located there. You can also find a link to the Audio Archives on the homepage of the website, where you will also see newly available audio listed in the “News & Media” scroll.

On Soundcloud: If you happen to be a member of Soundcloud you can follow us there; even if you don’t have an account, you can add comments directly to points in time of the audio file, or view playlists we’ve set up for things like Chicago’s Best Ideas or the recent conference on Crime in Law and Literature.

On iTunes: You can subscribe to our Faculty Podcast and get a new talk by our distinguished faculty or very special guests downloaded automatically to your phone or computer every two weeks.

On any other podcatcher or rss reader, or even email: You can subscribe just like iTunes, but Apple-free.

Have questions, comments, or concerns? We look forward to hearing them.

A Tale of Two UXs

One of the many tasks that the modern web professional often finds themselves responsible for is what is known in the business as “user experience,” or UX. While those of us who design websites often tend to think of UX as pertaining specifically to one’s experience with a website’s interface, the godfathers of UX and usability, Don Norman and Jakob Nielsen, propose a more encompassing definition: UX, they write, “encompasses all aspects of the end-user’s interaction with the company, its services, and its products.” I recently had two experiences that focused on companies’ websites but highlighted how a website should (or should not) tie into the users overall experience of the company.

The first experience was with a company that not a few people seem to love to hate, Comcast. We had had a lot of problems with our internet service going out, often multiple times a day, and the only way to fix it was to disconnect and reconnect the cable box. We had multiple service calls to address the issue, none of which seemed to actually fix the problem. When the tech failed to show up at one of these service appointments, and Comcast’s idea of how to make it up to us was to give us a coupon for a free on-demand movie that turned out to be expired and was never honored, I was about ready to switch to the only competition in our area, AT&T’s U-Verse. But the holidays were approaching, it seemed like a hassle to switch, and eventually the internet problems seemed to mostly resolve themselves through no apparent intervention by the company.

At that point I was ready to stay with the devil I knew, so when we finally upgraded to an HD TV, I went on Comcast’s website to add HD service to my package… and that’s when their website lost them a customer. Having logged into my account on Comcast’s website, I clicked “upgrade my services,” and was shown a list of available packages. After doing some comparisons between them, I chose one to order. I was then required to live-chat with a customer service rep who would, I was told, ensure that I understood the terms & conditions of the package I’d chosen, etc. As it turned out, the rep informed me, I was not eligible to order the package I had chosen, which was only for new customers. “Then why,” I asked the rep, “was it displayed to me as an available choice?” “Because the website only knows where you are, not whether you’re already an existing customer,” he told me, despite the fact that I had clicked “upgrade my service” from within an existing account. He then proceeded to list a number of packages for which I was actually eligible, but the whole process had already taken 45 minutes and I no longer had the time or patience at that moment to sort through another set of fine print. So I signed off the chat, figuring I’d come back later and do the whole thing over again; when I signed off, however, a customer satisfaction survey popped up. Feeling distinctly dissatisfied, I decided to fill it out and clicked ok… at which point the thing threw a database error, and I clicked over to the U-Verse site and signed up for installation.

Compare that with a recent experience with Grubhub, a site I probably patronize too often for my own good. The site usually works so flawlessly that I almost never have any reason to interact with their customer service, but when I noticed that we no longer appeared to be within the delivery area of one of our favorite Thai restaurants on GH, even though we were well within the are described on their website and could still order delivery via a number of other online services, I opened a live chat with their customer service. Their rep was in many ways the complete opposite of the Comcast rep I had chatted with; he “spoke” in real language, as opposed to Comcast’s carefully scripted and insincere-sounding responses (“We understand your frustration and are sorry for the inconvenience,” etc.) and just generally seemed like an actual human being, while the Comcast guy might not have actually passed the Turing test. It turned out that Grubhub couldn’t help me—only the restaurant can change the delivery area in Grubhub’s listings—but the experience was such that I’m willing to call the restaurant to request that they update their Grubhub delivery area.

Think about that: my experience with the Comcast website and customer service lost them a customer, while with Grubhub my experience has been such that I am willing to do work for them—to help them make more money—for free. It may well be that this is simply a matter of scale: Grubhub is still new, relatively small, and nimble, while Comcast is a bloated former near-monopoly likely trying to integrate dozens of legacy systems, but the fact of it is that providing a positive user experience is at the core of what Grubhub does, rather than something tacked on after the fact, and that this can make all the difference in keeping or losing a customer.

A 2013 Mixtape

Yes, friends, it’s that time once again, the time where everyone and their mothers list their year’s favorite everything. As usual, here is a playlist of some of my favorite songs of the past year.

The YouTube playlist below includes at least portions of each of the songs on my list, though some of them are fragments of live performances; you can also check out the Spotify playlist below that, which includes studio recordings but is missing four of the tunes included in the Youtube list (this modern media economy is confusing, innit?).

Anyway, I hope you’ll enjoy and let me know what you think of my selections in the comments. Have a great 2014!

Interview on Workspiration.org

Last week, I was contacted by the publisher of Workspiration.org, “a collection of nerdy interviews asking people from all walks of life what they use to get the job done” published in Russian and English. My interview is now up.

A #ConfabEDU Wrap-up

I just returned from the first ever Confab Higher Ed, in Atlanta. I’ve been to a number of conferences over the years, but this is the first one I’ve attended that focused specifically on the content side of web work. I’d always heard that Confab events are very well-organized and the talks well-curated, and this was certainly borne out in Atlanta; a hearty congrats on job well-done to the Confab folks and to Georgy and Rick from MeetContent.

Just about all of the sessions I attended left me with something to chew on, but my favorite single session was probably Felicia Pride’s “Transmedia in Higher Education.” Of course, it’s hard not to win over the recovering comparative mythologist in me when you’re talking about storytelling and technology, but I found Felicia’s discussion of using complementary content in different channels to be a fascinating reminder that the “Create once, publish everywhere” model that has become the content strategy mantra is not the only way to think about the content we’re producing.

One of the social needs that conferences seems to fulfill is commiseration, the acknowledgement that all of us gathered in this place face a number of common challenges, and there was certainly no lack of that at #ConfabEDU. My (somewhat, but *only* somewhat) tongue-in-cheek contribution to the #confabfeelings hashtag going around the conference was “Verging on despair at all the barriers in the way of doing good work.” It is really, really, hard to do strategic work when you are constantly putting out (often imaginary) fires or doing time-consuming projects for the sake of, say, a faculty member’s vanity. When strategy is something you have to sneak in around the edges, instead of the guiding force of everything you do, it’s not much of a strategy. I would loooove to have an institutional message architecture (as defined by Margot Bloomstein, “a hierarchy of communication goals that reflects a common vocabulary. Concrete, shared terminology, not abstract concepts.”) written on the wall of the office, and when someone asks us to, say, design a poster that no one will ever see, be able to point to the wall and ask them how this project fits in that architecture.

The golden nugget that I came away with is this: content strategy is really people strategy. The person planning how the content will fit together and be distributed is rarely also the the one creating or maintaining that content. If you can’t get buy-in from the folks who actually own the content, can’t get them to take ownership of and pride in that content, your website — and your users — are going to suffer.

How Much Does a Website Cost?

It’s a scenario that I imagine has happened to every web professional: you’re at a party, chatting with relatives or acquaintances, and the subject of your profession comes up. “Oh,” says one of the group, in between dips into the guacamole bowl, “I’ve been thinking I need a new website for my business. How much would that cost, about?”

Any web pro worth their salt will know that such a question is literally impossible to answer without a good amount of additional information. Imagine going to an architect and saying, “I need you to build me a building. How much would that be?” Naturally, we would not expect them to be able to just rattle off a quote and then get to work.

Just a few of the questions I’d expect that architect to ask, which also hold true for websites, are:

  • What kind of things do you want people to be able to do there? A car showroom and an office building are both places of business, but designed for very different interactions. The same is true for, say, an e-commerce site where the customer is actually placing orders for widgets and a piece of “brochureware” that is intended mainly to inform people of the services you provide, and the costs will likely be dramatically different.
  • Are there particular materials that you want or need to use? Just as brick and steel will have different utility in different buildings (and have different costs), so will different technologies. Building a basic HTML and CSS website is a whole different ball of wax that implementing a content management system built on PHP.
  • Do you have the know-how or resources to maintain complex systems behind the scenes? A fancy graywater recycling system would likely cause more problems than it solves if the owner fails to maintain it, and the same is true for many web technologies. Before you even start building your site, you should have a plan in place for its maintenance, and a good web designer will help you do that.
  • How will people find your business? A restaurant near a highway, for example, is likely going to require a big, eye-catching sign near or on the building, intended to lure people through the doors. An office building in the same spot, however, might not need to draw such attention to itself since it doesn’t rely on street traffic for business. Again, the same is true for websites: do you need to spend a good deal of time and resources optimizing your site for search engines, or integrating social media into your web presence? Or will your customers be driven to your site in some other way?
I could go on (and I’d love to hear your own suggestions for such questions in the comments), but the basic takeaway is this: for most businesses, a website, like the building within which you conduct your business, should not be an arbitrary decision or an afterthought: it should be an integral part of your overall business strategy. The best web professionals will do more than simply push pixels around the screen for you; they will help you articulate that strategy and figure out how to present it to the world.

Concealed Carry v. Crime, Part II

Some months ago, I posted a design project that charted changes in violent crime rates versus changes in concealed carry laws. It was pointed out to me that, since many of the categories of violent crime included in the FBI’s Uniform Crime Reporting tool include attempted crimes (see the UCR’s definitions), it was possible that the negative outcomes in violent crime rates that I noted could have been the result simply of an increase in reported attempted crimes resulting from, for example, victims shooting their assailants.

While this seemed unlikely to me, and while I don’t have time to build additional infographics representing new data, it was worth looking into. The best way to do so, as far as I could tell, was by examining the murder rate, which does not include attempted murders; therefore, the crimes included would be successfully completed crimes that would almost certainly not have otherwise gone unreported. If the negative outcomes in overall violent crime rates were masking what were in fact positive outcomes by way of an increase in the reporting of attempted crimes, then we should see more positive outcomes in states’ murder rates.

Digging into the data (I’ve updated the spreadsheet where I tracked all of this) we do in fact see a slightly higher number of positive outcomes: seven states had positive changes in 5-year average murder rates compared to the change in the national average, as opposed to four positive changes in overall violent crime rates. However, as with the overall violent crime rate, far more states had negative outcomes.

Positive

  • National average increased, state average decreased: 2 (FL, OR)
  • National average decreased, state average decreased more: 4 (AK[2], CO, MN, TX)
  • National average increased, state average increased less: 1 (ID)
Negative
  • National average decreased, state average increased: 5 (AK[1], AZ, GA, MO, OH)
  • National average increased, state average increased more: 3 (MS, PA, WV)
  • National average decreased, state average decreased less: 13 (AR, KY, LA, MI, MT, NM, NV, NC, OK, SC, TN, UT, VA)
Overall, states that switched from no-issue to shall-issue laws had an average change 15.58 percentage points worse than the national average (compared to an average of 10.13 percentage points worse in overall violent crime rates), while those going from may-issue to shall-issue fared an average of 8.86 percentage points worse (compared to an average of 7.68 percentage points worse in overall violent crime rates). So, if the national murder rate was going up over a given time period, the average state that transitioned to more permissive concealed carry laws saw its murder rate grow faster than the national rate; if the national rate was going down, transitioning states saw their murder rate fall more slowly than the national average. Again, this suggests that more permissive concealed carry laws not only do not prevent murders, they may in fact exacerbate them.
Finally, as before, I looked at how no-issue states’ rates compared to the national average, and in all but two years (1982 and 1999) between 1981 and 2010, the murder rate in no-issue states was equal to or less than the national rate, indicating that the inability for citizens to legally carry concealed weapons does not necessarily encourage more murders.

The Law School’s YouTube Channel

Cross-posted at the University of Chicago Law School Electronic Projects Blog.

Sometimes, when choosing social and software platforms, one chooses… poorly. That would seem to have been the case with the Law School’s choice of video distribution, a choice that we are happy to rectify today with the official launch of our YouTube Channel.

While it might seem we’re a bit late to the YouTube party, the problem is that we were actually a bit too early. When the Law School began regularly recording video of events like our Chicago’s Best Ideas lecture series back in 2008, YouTube had a 10-minute limit to videos that users could upload. Since most of our videos are of hour-long lectures, we had to find a new solution. We tried Google Video (this was before Google bought YouTube) but it didn’t work terribly well. Eventually we found Blip.tv, which did pretty much everything we wanted it to: allowed for long-duration uploads, integrated with our Drupal site, allowed for ad-free display, and so on.

While we did claim a YouTube channel and used it for various projects here and there, we stuck with Blip as our main video platform through the years, even after YouTube dropped their 10-minute limit and universities (including our own) began flocking to the service in droves, since we had already sunk so much time and effort into establishing our Blip presence. But a couple of months ago, Blip began mandating pre-roll ads before every video, a practice we found unacceptable for our non-profit institution. So, after five years and just under 60,000 views on their platform, we’ve decided to pull the plug on our Blip channel. I’ve spent the last few weeks porting our hundred and forty-odd videos over to YouTube, and look forward to all of the opportunities that the new (to us) platform provides: easier sharing, more opportunities for conversation, and so on.