An unexpected link between computer science and the ethics of consent in the acutely comatose

Yesterday, Dr Weijer from Western U came to the STREAM research group at McGill to give a talk on the ethics of fMRI studies on acutely comatose patients in the intensive care unit. One of the topics he briefly covered (not the main topic of his talk) was that of patients who may be “awake,” but generally unaware of their surroundings, while in an acutely comatose state of some kind. Using an fMRI, questions can be asked of some of these subjects, by telling them to imagine playing tennis for “yes,” and to imagine navigating their home for “no.” Since the areas of the brain for these two tasks are very different, these can be used to distinguish responses with some accuracy. In some rare cases, patients in this condition are able to consistently answer biographical questions, indicating that they are in some sense, conscious.

One of the questions that arises is: Could we use this method to involve a comatose patient in decision-making regarding her own care, in cases where we were able to establish this sort of communication?

Informed consent in medical ethics is usually conceived in terms of: disclosure, capacity and voluntariness, and the most obvious question to arise in the types of cases we’re considering is whether or not you could ever know with certainty that a comatose person has the capacity to make such decisions in such a state. (Indeed, a comatose patient is often the example given of someone who does not have the capacity to consent.) Dr Weijer was generally sceptical on that front.

Partway through his discussion, I had the impression that the problem was strangely familiar. If we abstract away some of the details of the situation in question, we are left with an experimenter who is sending natural language queries into a black box system, which replies with a digital (0/1) output, and then the experimenter has to make the best evaluation she can as to whether the black box contains a person, or if it is just an “automatic” response of some kind.

For those of you with some background in computer science, you will recognise this as the Turing Test. Over the 65 years since it was first suggested, for one reason or another, most people have abandoned the Turing Test as a way to address the question of artificial intelligence, although it still holds a certain popular sway, as claims of chatbots that can beat the Turing Test still make the news. While many would reject that it is even an important question whether a chatbot can make you believe it is a person, at least in the fMRI/coma patient version, no one can dispute whether there is something important at stake.

How to automatically back up WordPress or ownCloud using cron jobs

Recently I set up WordPress for my research group in the Medical Ethics Unit. We will be blogging our journal clubs, posting links to our publications and upcoming events. In related news, my research group has been using DropBox to coordinate papers in progress, sharing of raw data, citations, and all manner of other information. This was working pretty well, but we have been bumping up against the upper limit of our capacity on DropBox for a while, so I installed ownCloud on the web host we got for the research group blog. I’m pretty happy with how nice it is to use and administer.

Of course one of our concerns is making sure that we don’t lose any data in the case of the failure of our web host. This is unlikely, but it does happen, and we don’t want to run into a situation where we try to log in to our cloud-based file storage / sharing service and find that months’ worth of research is gone forever.

For a few weeks, the following was more-or-less my workflow for making backups:

  1. Log in to phpMyAdmin
  2. Make a dump file of the WP database (choose database > Export > Save as file … )
  3. Make a dump file of the ownCloud database
  4. Save to computer and label with appropriate date
  5. Log in to web server using FTP
  6. Copy contents of WP’s /wp-content/ to a date-labelled folder on my computer
  7. Copy contents of ownCloud’s /data/ to a date-labelled folder on my computer

This worked pretty well, except that it was a pain for me to have to do this every day, and I know that if I ever forgot to do it, that would be when something terrible happened. Fortunately for me, my boss mentioned that he had an old but still serviceable iMac sitting in his office that he wanted to put to some good purpose.

I decided to make a fully automatic setup that would make backups of our remotely hosted data and save it locally without any input on my part, so I can just forget about it. I made it with cron jobs.

Server side cron jobs

First, I set up some cron jobs on the server side. The first one waits until midnight every day, then dumps all the MySQL databases into a gzipped file on my web host, then zips up the WordPress /wp-content/ and ownCloud /data/ folders and puts them in the backup folder as well. The second server-side cron job empties the backup folder every day at 23h00.

  • 0 0 * * * PREFIX=`date +%y-%m-%d`; mysqldump -u USERNAME -h HOSTNAME -pPASSWORD –all-databases | gzip > /path/to/backup/folder/${PREFIX}-DBNAME-db.sql.gz; zip -r /path/to/backup/folder/${PREFIX}-wordpress-files.zip /path/to/wordpress/wp-content/; zip -r /path/to/backup/folder/${PREFIX}-owncloud-files.zip /path/to/owncloud/data/;
  • 0 23 * * * rm -r /path/to/backup/folder/*

A few notes for someone trying to copy this set-up

  • Your web host might be in a different time zone, so you might need to keep that in mind when coordinating cron jobs on your web host with ones on a local machine.
  • My web host provided a cron job editor that automatically escapes special characters like %, but you might have to add back-slashes to make yours work if you’re manually editing with crontab -e.
  • You might want to put a .htaccess file in your backup directory with the following in it: “Options -Indexes” (remove the quotes of course). This stops other people from going to your backup directory in a browser and helping themselves to your files. You could also name your backup directory with a random hash of letters and numbers if you wanted to make it difficult for people to steal your backed-up data.

Local cron job

Then on the local machine, the old iMac, I set up the following cron job. It downloads the files and saves them to a folder on an external hard disc every day at 6h00.

  • 0 6 * * * PREFIX=`date +%y-%m-%d`; curl http://www.your-web-site.com/back-up/${PREFIX}-DBNAME-db.sql.gz > /Volumes/External HD/Back-ups/${PREFIX}-DBNAME-db.sql.gz; curl http://www.your-web-site.com/back-up/${PREFIX}-wordpress-files.zip > /Volumes/External HD/Back-ups/${PREFIX}-wordpress-files.zip; curl http://www.your-web-site.com/back-up/${PREFIX}-owncloud-files.zip > /Volumes/External HD/Back-ups/${PREFIX}-owncloud-files.zip;

If you were super-paranoid about losing data, you could install this on multiple local machines, or you change the timing so that the cron jobs run twice a day, or as often as you liked, really. As long as they’re always turned on, connected to the internet and they have access to the folder where the backups will go, they should work fine.

Stoop-n-scoop

This isn’t a super-secure way to back up your files, but then we’re more worried about losing data accidentally than having it stolen maliciously. I don’t think the world of medical ethics is cut-throat enough that our academic rivals would stoop to stealing our data in an effort to scoop our papers before we can publish them. That said, I’m not about to give away the exact URL where our backups are stored, either.

The practical upshot of all this is that now we have at least three copies of any file we’re working on. There’s one on the computer being used to edit the document, there’s one stored remotely on our web host, and there’s a copy of all our files backed up once a day on the old iMac at the Medical Ethics Unit.

McGill wins the Canada Cup again—surprise ending this time

McGill wins the Canada Cup ... again!
McGill wins the Canada Cup … again!

For the second year in a row, McGill University left the Canada Cup as the national champions in the sport of quidditch. For the record, there have only ever been 2 Canada Cups. There were some really intense and close games—ones that were too close to call until the final snitch grab—which made them very exciting to watch.

I went to the Cup this year as one of the golden snitches. This tournament was remarkable for a couple reasons. First off, it was very well organised. I can honestly say that I haven’t been to any tournament that was better-run than this one. The weather was ideal: brisk and sunny. The grounds were perfect for off-field snitching: a million places to hide. It was great. Also, there were about a million snitches, too. Almost every quidditch tournament I’ve been to has been lacking in snitches, and this one had an overabundance.

This was why I felt so honoured to be able to snitch for the consolation match (the match to determine 3rd and 4th place). I didn’t want to snitch the finals, since McGill was playing, and I just don’t want questions like, “did you let the McGill seeker catch you?”

The consolation match ended up going later than the final match, and I enlisted some of my McGill snitch friends to engage in some on-field mischief.

When I came back to the field, the score was 30-0, which meant that the snitch-catch tied the game. It’s sometimes said in quidditch that the only player who’s guaranteed to lose every match is the golden snitch. Tonight I made history, because the only possible exception is that of a tied game: When a game is tied, it goes into overtime in which the snitch does not leave the field, and at the end, the team with the most points wins. Overtime ends after a period of 5 minutes or by a snitch-catch. The five-minutes of overtime came and went, and by the end of it, I hadn’t been caught.

Carleton, the team that won, hoisted me up on their shoulders. I won the game! As the golden snitch! This almost never happens. It was the perfect conclusion to a fantastic tournament: my team won (congrats McGill!) and I won too!

Below is a video of me snitching another game earlier in the day. It’s not as consequential as the consolation match later in the day, but it gives you an idea. :)

Rethinking Research Ethics: The Case of Postmarketing Trials

Good news!

Toward the end of the year in which I was working on my thesis, my supervisor had me write up a shorter version of my thesis for an attempt at publication. This was no small feat—imagine trying to compress a 90-page master’s thesis into 2 pages!

After my RA-ship ended, my supervisor, Jonathan Kimmelman, and Alex John London took the paper, made some substantial edits, and submitted it to a couple journals. The paper was accepted, and as of this week, it was published in Science.

Needless to say, I’m thrilled. :D

I graduated this week

Backward compatibility

I'm getting hit by a tube
I'm getting hit by a tube

I like graduation ceremonies. Don’t get me wrong—hearing the names of a couple hundred students read in order of academic programme isn’t my idea of a wild party, but I’m glad such things exist. There’s a couple things that I like about graduations.

Convocation is the ultimate example of backward compatibility. There’s something positively medieval about them. As the Principal said, the tradition of graduation ceremonies at McGill predates Canadian Confederation. If a person from even ten centuries ago was magically transported to Place-des-Arts on the morning of November 23rd, 2011, that person would probably be able to recognise what is going on, just by seeing all these acamedics in their robes and the giving of certificates.

When I graduated from Western, the procession of professors, chancellors, etc was preceded by a guy carrying a big gold mace. Maces are symbols of power, and historically speaking, they were there to serve the purpose of keeping everyone in line, in case the meeting got out of hand. And at some point in history, someone thought, “Carrying around an implement for bludgeoning rabble-rousers is something that we have to keep doing forever. Just in case.”

When I got the actual paper with my degree printed on it, I discovered that it was all written in Latin. According to the paper, I have a “Magistrum Artium” now. I’m going to take a picture of my degree and get my little sister (whose Latin is much better than mine) to read it at Christmas break.

At McGill by tradition, undergrads are tapped on the head by an academic cap as they graduate. Grad students used to have their hands shaken by the Chancellor, however in the wake of the Swine Flu scare, hand-shaking fell out of fashion. (Not based on any evidence, mind you—Swine Flu is not transmitted by hand-to-hand contact.) Hence, the Chancellor hits graduate students with a tube as they pass him on the stage.

That was the weirdest thing. It was like a knighting (“I dub thee “Magistrum Artium”) except it would have been a whole lot awesomer if they had tapped me on the shoulder with the sword of Gryffindor or something. Actually, I’d settle for the sword of James McGill.

Academic regalia

Hood and robe for MA at McGill
Hood and robe for MA at McGill

What’s also fun (but expensive) is the academic regalia. This time, they let me keep the hat, at least!

I can wear it whenever I want to look smart and make people pay attention to my ideas.

Every programme/faculty/level of achievement has a different robe/hood/hat that they wear to graduate. For a MA at McGill, you get a black robe with funny sleeves that you can’t actually put your arms through, a mortar board and a baby blue hood that goes around the neck. In the attached photo, I’m trying to show what the hood looks like a bit. That’s the interesting part.

Not only do the students all wear different things, but because each professor wears the academic regalia of the school where she earned her PhD (not the school she works at), many professors will have different robes/hoods/hats. Some are boring, some are very eye-catching. The profs who did their PhD at McGill all have funny black McGill hats.

Framing my degree

I looked at the prices of the fancy “McGill” frames that were for sale just outside the theatre and asked them how much they cost. They said they were $200 apiece.

When I stopped laughing, I realised that they were serious and moved on.

Part of me wants to go out and find a “Dora the Explorer” frame for my degree. Something really tacky to keep it in, at least while I’m looking for a frame that won’t require another student loan for me to buy. The only problem with that is that if I do that as a joke while I’m looking for the “real frame,” it might become the “real frame.”

The McGill principal’s report

Hey everyone: Check out the McGill principal’s report. Why? Because McGill really loves the photo I took of the statue of James McGill. Note the “additional photo credits” on the page I linked to, and on the inside of the cover of the PDF version of the report.

For those of you keeping score at home, this is now twice that a publication by McGill has used my photo of the statue of McGill. :)

A scary email to receive less than a week before the thesis submission deadline

I bet you thought I was done posting about my thesis. Last Friday (6 days ago), I received this email after I had the pleasure of submitting my thesis electronically.

[Your supervisor] approved your e-thesis on September 23, 2011 at 11:51.

If your thesis has been accepted by all your supervisor(s), it has been sent to GPSO for processing.

If your thesis has been rejected, please make the changes requested by your supervisor(s) to your original document*, and create a new pdf, delete the file on the server, and upload the new file.

You can track the progress of your thesis on Minerva.

Hooray! It was good news to receive this email, and I tweeted about it immediately, of course.

Then, this morning, I received the following email.

Dear Benjamin, … We [at the philosophy department] have been told that you haven’t submitted your thesis electronically, and this is one of the graduation conditions. Can you do this immediately? The conditions have to be met by Tuesday, 4 October. Best wishes.

October 4th is on Tuesday (5 days from now). I’m pretty sure that my thesis has been submitted electronically. Here is my evidence:

  • Minerva lists my thesis as being uploaded and approved
  • I received the aforementioned email from the e-thesis computer

So I really don’t know what this fuss from the philosophy department is all about, but now I’m nervous that something’s messed up.

E-thesis final submission

This week, my goal was to make final submission of my thesis. All the actual work on the document was finished. I just needed to figure out how to hand it in. As per instructions on the GPS website, my thesis has to be submitted in PDF/A format.

For those of you who are unaware, a PDF/A is not the same thing as a PDF. What’s the difference? It’s more expensive of course.

The thesis has to be converted to PDF/A using special software to ensure that it can still be opened in the future. So, in order to submit my thesis, Graduate and Postdoctoral Studies recommends that I buy Adobe Acrobat Pro, at a cost of $101.38 with tax—and that’s the reduced student price.

And the most frustrating thing about this? According to the instructions, “Standard PDF files will be rejected unless the thesis was written in LaTeX.” For those of you who are regular readers of my blog, you will recall that up until February, I was using LaTeX to typeset my thesis, and it was a painful and scary transition for me to move to Microsoft Word part-way through.

So ultimately, it came down to a choice between trying to convert my thesis back to LaTeX, or spending $100 to avoid all that hassle.

Laziness won, of course.

On Thursday, I went in to the bookstore and bought the software. When I first installed it and tried to convert my thesis, I got an error. Acrobat couldn’t convert my thesis. This seemed strange, since there wasn’t any strange formatting in it. I fiddled with the settings, tried restarting, but the very expensive software wouldn’t do it. Fortunately after a half hour, it auto-installed an update and after that, the conversion went as planned.

So as of yesterday, I have submitted my thesis to McGill. It’s over! Those are all the requirements for my master’s in bioethics! The only thing that’s left is my supervisor clicking “accept.”

By the way, one of the most satisfying things about making final submission of my thesis is the fact that I can take the ugly EndNote app out of my computer’s dock. It was such an eyesore! :P

Answering my readers’ questions

Everyone gather ’round. It’s that time again! It’s time for me to answer my readers’ questions!

And by that, I mean, it’s time for me to see what strings of words people have typed into Google that brought them to my blog. Then I look through the search keywords that are (more-or-less) well-formed questions and answer them as best I can. It’s the least I could do, since they took the time to visit my site with these questions on their mind.

“Why can’t the space shuttle leave conventionally from an airport?” (July 26)

Mostly because it’s not an airplane. Those booster rockets that the space shuttle normally uses for take-off are not decorative.

“If I fired a laser beam at my hand would it come out the other side?” (Aug 4)

Yes.

“How to castle in chess with friends?” (July 31, Aug 7, 14, 17)

Begin a chess game with a friend, castle normally.

“How do you move your king and castle at the same time?” (July 26)

You probably meant “How do you move your king and your rook at the same time?”

“Rook” is the name for the pieces that start at the corners of the board.

In chess, “castle” is a verb. It’s the verb that means to move your rook and king at the same time, two spaces toward each other, provided that the intervening spaces are not occupied and that neither the king nor rook has been moved before in the match (and that you’re not trying to castle out of check).

“Cheat on MCAT tips?” (Aug 1) / “How to cheat the MCAT?” (July 30)

Are you really asking me to help you to cheat on the MCAT? Get out.

“Has anyone ever cheated on MCAT before?” (July 28)

No. No one in the history of mankind. No one whose motives were so pure as to aspire to medical school has ever even considered cheating to attain such a goal.

“Grammar is one of the greatest joys in life, don’t you find?” (Aug 8)

Actually, now that you mention it, grammar is the greatest joy in life.

“How to avoid getting your bike stolen [in] Montréal?” (Aug 25)

Sell bike, and buy Bixi pass with the proceeds.

“How to get your thesis bound at McGill” (July 27)

You gotta do it yourself, I’m afraid. You can get Acco-Press binders at the bookstore.

“How to take someones fortune?” (Aug 21)

Twitter-stalking.

“I bought wrong grammar?” (Aug 10)

You sure did.

“I might have strep throat I don’t got insurance?” (Aug 7)

That’s quite the predicament! Are you a Canadian citizen?

“Is there a Montréal métro pass for mature students?” (Aug 19)

Nope. No such thing. Once you’re 25, you pay full price, whether you’re a full-time student or not.

“What happens after you accept a TA-ship offer?” (Aug 4)

Heh … Do you really want to know?

“What is giving you the most problems with Microsoft Word?” (July 26)

Thank you for asking! Mostly crashing, interface glitches and the fact that there’s no separation between content, formatting, comments and meta-data.

“Where can i get hasperat?” (July 28)

Bajor, if you want it authentic.

But if you would make the brine for a really strong hasperat—I mean eye watering, tongue searing strong—you’d make an old man very happy.

I submitted my thesis today

ACCO-Press bound thesis
ACCO-Press bound thesis

When I woke up this morning, I was three steps away from submitting my thesis:

  1. Get French translation of my abstract
  2. Print thesis
  3. Get my supervisor’s signature

Well, it turns out my translator’s computer crashed, and so I didn’t get the French version of my abstract until exactly 12h today.

I printed my thesis—all 87 pages—bound it in ACCO-press binders, applied the necessary stickers, packed everything up and then wondered why I hadn’t heard back from my supervisor. He’s generally very fast at responding to emails, and last night he offered by email to sign my thesis submission form this afternoon, so it was surprising that he hadn’t got back to me.

I called his office. I called his home. I sent another email. I decided to do a stakeout at the Biomedical Ethics Unit and see if I run into him. When I was putting on my shoes, I considered for a moment whether I should put on my running shoes or my regular shoes. I had this nagging feeling like somehow I would end up sprinting to the James Administration Building at the last second, and that I would be happy to be wearing running shoes. Then I dismissed that thought. All I had to do, after all, is get my supervisor’s signature and then walk across the street and submit it. Putting running shoes on would be silly.

I put my regular shoes on and went to the Bioethics Unit to look for my supervisor. I ran into the administrative assistant who informed me that he was having a terrible day. A few seconds later I got a phone call from him.

Apparently my supervisor had a minor car accident and spent the morning in the emergency room. He invited me to his house to have the forms signed. This would not normally have been a problem, but Villa-Maria station (where he lives) is closed until September 6, and so I went to Vendôme station and hired a cab to get me to his place.

I saw the back of his car when I arrived. There were indentations that I’m sure were never intended by the manufacturer to be there. My supervisor and his family are all right, I think, but understandably this has been a bad day for them.

The forms all signed, I sprinted to the nearest Bixi station and decided that it would be fastest to just ride the Bixi all the way to campus. This may or may not have been the case, but I made it back to campus in 25 minutes, which is probably better than what it would have taken to get to a métro, wait, transfer at Lionel-Groulx and then walk from station McGill to the James Administration Building.

On arrival, I was hot, sweaty and breathing heavily, but I still had the presence of mind to turn on the Voice Memo app on my phone, so that I could secretly record it when the person in the Graduate and Postdoctoral Studies office said, “Yes, everything appears to be in order.” (Thank goodness for iPhone headphones that have a built-in mic for clandestine voice recording.)

I guess I’m paranoid because I’ve recently had two separate experiences where I handed in everything on a document checklist only to receive a mystifying message later on, indicating that I failed to submit all the required documents. I don’t plan to use this recording for anything but soothing my own nerves, for the record. It just feels good to hear someone say that I submitted everything.

So after all that, I have now made initial submission of my thesis. Hooray!