wheatblog

personal weblog of James "Wheatbread" Martin

New year, new host

I finally got my fill of Dreamhost. I’m in the middle of moving all my sites over to A2Hosting.com. So far, I’ve migrated jamesnotjim.com, hadenthomasmartin.com, and, if you’re reading this, wheatblog.com.

There are still several more sites to go, but I haven’t had any major issues yet. Most of the remaining sites will be easy. The two exceptions will probably be bassplaying.com (since it runs on Drupal) and wheatdesign.com, since it is old, full of cruft, and mostly held together by htaccess redirects. In fact, now would be a good time for spring cleaning, but I want everything up and running on the new servers before I turn out the lights at Dreamhost.

I’ll go into the reasons behind my hosting switch in another post. I just wanted to put this one up to test thing and to alert you to any outages.

Popularity: 25% [?]

Cp2DB: Adobe Captivate Quiz Reporting with PHP/MySQL (Version 2)

A lot of people liked my initial effort at creating a PHP/MySQL reporting solution for quizzes created with Adobe Captivate 4. The holiday break gave me a little extra time to work on the project, so I’m happy to release a new version. I even created a separate page for the project, but I’m still be using the blog to keep you informed about it. (Based on very limited testing, this code seems to work for quizzes created in Captivate 3 as well.)

New Features

  1. Captures both “Core data” and “Interaction data” (explained below). Version 1 only captured “Core data.”
  2. Relational database structure. Version 1 captured everything in one table.
  3. Debug mode. Allows you to see the contents of the array pre- and post-submission.

Core data is aggregate data for the entire quiz. It includes values for the user’s overall score, along with the maximum possible score, the minimum possible score, the total time the user spent on the quiz, and whether he or she passed the quiz (based on a pass/fail percentage you define in Captivate’s quiz preferences).

Interaction data is data specific to each question/interaction in the quiz. It includes the user’s answer, the correct answer, the result (i.e. was the user’s answer correct or not), the time spent on that question, the interaction type (e.g. T/F, multiple-choice, etc.), and some other metadata specific to the question.

In order to store all of this in a useful way, I’ve expanded the database a bit. It now has three tables (one for core data, one for interaction data, and one for person data). I’ve expanded the score submission form to include an optional employee ID, but, behind the scenes, I will be using the user-submitted email to uniquely identify the user. This provides a way to connect user data to quiz data without resorting to a login/authentication scheme of some sort.

Here are the steps for setting it up:

  1. Create a quiz in Captivate 4.
    (I’ve included a sample project: cp2db_v2_rc3.cp.)
  2. Choose Quiz –> Quiz Preferences.
    Under the Reporting category:
    Select the “Enable reporting for this project” checkbox.
    Select the “E-mail” radio button and specify an email address.
    Under “Report to LMS as,” select the “Score” radio button.
    Under “Reporting Level,” select “Interactions and score.”
    Under the Pass or Fail category, set a pass/fail percentage.
    Click the OK button to confirm your preferences.
  3. Save and publish your project as a Flash (SWF).  Be sure “Export HTML” is checked in the publish options.  If you save your project as foo.cp, the HTML file will be named foo.htm.
  4. Download and unzip the Cp2DB files.
  5. Open sendmail_v2.js in your favorite text editor. Select all and copy the entire file to your clipboard.
  6. Locate and select the sendMail() function in foo.htm. It should occupy lines 27-42.
    (If you are using the sample project, the code has already been pasted into cp2db_v2_rc3.htm, so you can skip this step.)
  7. Use paste to replace the default sendMail() function with the new-and-improved one on your clipboard.
  8. Save your changes to foo.htm.
  9. Create a MySQL database called cp2db. It will contain three tables: tblcore, tblinteraction, and tblperson. You will find the SQL for creating the tables and fields in db_schemas.sql.
  10. Edit insert_v4.php. On line 20, change “localhost,” “username,” and “password” to your MySQL host, username, and password values.
  11. Edit the same values in lines 66-68 of display_v4.php.
  12. Upload your Captivate oputput files (i.e. foo.htm, foo.swf, and standard.js), insert_v4.php, and display_v4.php to your web server and test your quiz. Once you have submitted some data, you can use display_v4.php to pull it back out.
  13. Once you get it up and running, take a look at the code in insert_v4.php and the new sendMail() function. There’s a setting for turning the new debug mode on and off. (You’ll want it on for testing, of course.)
  14. Feedback is welcome. Use the comment thread of this post for your bug reports, feature requests, and other feedback.

Known Issues/Limitations

  1. For now, Cp2DB only handles the multiple-choice question type. If there’s sufficient interest, I’ll work on adding other interaction types in future releases.
  2. As far as I know, it only works with Captivate 4. I haven’t tested it with earlier versions.
  3. The script for echoing out the database data is still in its fledgeling stages. A fully-functional back-end remains to be written. I’ll work on that for the next version.

Standard Disclaimer

As before, this code is beta at best. There are no warranties expressed or implied, and you should have someone with better coding chops than me look it over before you put it into production–especially out in the wild. I hope you enjoy it, find it useful, and can leverage it to solve your own problems. But if it blows anything up, that’s on you.

Popularity: 55% [?]

Open content and the future of education

A lot of colleges and universities, big and small, are putting content online for free these days. Not long back, this meant teasers of various sorts, but, of late, more and more players–especially some of the big name institutions, are putting entire courses online. And, these day’s it’s often not just introductory courses. There’s quite a bit of higher-level stuff out there. Yale’s Open Yale Courses site is a good example. There are several full-length courses in each of a dozen or so categories. There are enough schools doing it these days that other sites, like Academic Earth, have popped up just to aggregate the free materials that are out there. If you use iTunes, Apple’s iTunes U provides a nice interface to a lot of what’s available.

If you have any autodidactic tendencies, happen to be bedridden, are a shut-in or an unapologetic misanthrope, this must be the best of all possible worlds. But even for the more-or-less well adjusted knowledge junkie, this is a real find. We live in a time of plentiful information and infotainment, but a lot of what’s out there for free isn’t really worth your time. There’s a lot of surface, but not much depth. A lot of the content on the web is like an infinite magazine rack. And, just as in the real world, the US Weekly and People-grade fluff occupies more space than the more substantive fare.

At first, you might rightly wonder “what’s their angle?” And, while there’s a try-before-you-buy marketing component, that alone wouldn’t justify the time and expense it takes to capture and render the content, much less the work that goes into organizing and maintaining in some sort of content management system and the bandwidth costs that go along with that. I think you have to chalk it up, at least in good measure, to one of those ideas that’s so old-fashioned it will almost feel corny when I type it: the public good.

The first mission of higher education, after all, is to teach people. It can be easy to lose sight of that, sometimes, with all the bureaucracy and politics that go along with it. Colleges these days are often run a lot like businesses. And, while there’s certainly common ground between the two (you gotta keep the heat on somehow), educational institutions worth their salt have higher aspirations than the bottom line. Teaching at its best aspires to make the world a better place by creating a better informed and more thoughtful public, one student at a time. Educational institutions, at their best, are simply the necessary infrastructure that enables good teaching.

I suspect a lot of institutions who are not yet in this game resist because they don’t see how they can profit from giving things away. But they have little to worry about on that score. Even if you could watch an entire degree programs’ worth of video lectures, there’d still be no transcript to point to and no degree on your wall, unless you pony up for online classes, submit work for evaluation, and pay your tuition. That’s fine, I think. If all you want is the knowledge, it’s there for the taking. If you need a credential to move down a career path, there are more options for that than every before. Either way, I welcome it.

Popularity: 23% [?]

And the winner is . . . BackBlaze

After my recent hard drive failure, which ended happily with the successful restoration of my files from my Time Machine backups, I decided to get serious about backing up and look into some off-site, online solutions as a secondary backup in case of some worst-case scenario (e.g. fire, flood, theft–it hurts to even type those words!).

I read up on every web-based backup plan I could find and tried out several of them on my own machine. Most of the online backup services have a lot of features in common. Many of them offer “unlimited” storage, meaning they’ll mirror everything on your drive (except, generally, system files and application files). But these are generally mirrors, not archives. So, if you delete a local file, it will eventually (generally, after 30 days) be deleted from the backup as well. Most of them run about $50/year if you pay annually. There are some metered services out there, but I prefer a fixed cost, so long as it’s reasonable.

I eliminated Mozy pretty quickly because I read far too many comments about people being unable to restore files they had previously backed up (which is worse, when you think about it, than having no backup at all). I disliked CrashPlan’s GUI, so I pitched it fairly quickly (and, as an added bonus, the uninstaller is like something right out of the 1980s). Apple’s MobleMe iDisk is pretty slick, but as it only allows 20GB of storage, it’s about twice as expensive as the other options.

At first, I was pretty happy with Carbonite. I tested that one out for nearly two weeks and I liked quite a few things about it. The interface is nice (it installs as a system preferences pane with an associated menu bar icon). But there were were a few problems:

  • Video files are excluded by default. You have to opt them in one-by-one. I don’t need new maintenance items on my to do list; I need a set-it-and-forget-it solution. This was a big issue for me.
  • They pay Rush Limbaugh to pimp their service. That fact alone doesn’t mean its a bad service, but it does mean that of my money would be going in that lying, hate monger’s pockets, and I can’t abide that.
  • Connected drives (i.e. USB2 drives and the like) and networked drives are excluded, and there’s no way to opt them in. This isn’t a problem at present, but it will be eventually.

Then I discovered BackBlaze, which seems to give me everything Carbonite did, and more:

  • The interface is nice. It installs as a System Preferences pane with an associated menu bar icon.
  • Video files are included by default. In fact, all files except operating system files, application files, and temporary files are included by default. You can exclude any file or directory you like. Otherwise, it grabs everything.
  • File restoration is accomplished via the BackBlaze web site. You log in, select the files you want to restore, and click go. A few minutes later, you get an email with a link to the zipped version of your files. The directory structure is maintained. This means that, once your files are backed up, you can use BackBlaze to nab a copy of a file from their site to your current location, even if that’s a different machine running a different operating system.
  • Connected drives are included. There are a few caveats: they have to be present at least once every thirty days or BackBlaze will think they’re deleted and delete the backups associated with them. Time Machine drives aren’t eligible and neither are networked drives.
  • Estimates how long it will take your backup to complete and has a throttle control so you can devote more of your bandwidth to speed up the process.
  • Can, for an additional fee, copy your backups (up to 400GB) to a USB2 drive and FedEx them to you. I hope I never need this feature, but it would be nice in an emergency.

BackBlaze, like several of the other online backup services, offers a free fifteen-day trial. That wasn’t long enough to back up my entire hard drive. But it was long enough to back up a wide variety of files, test out a few restores, read a few more reviews, and get familiar with the software settings. It was enough to convince me that $50/year wasn’t too much to pay for some added piece of mind.

I think using online backup as your only backup solution is a profoundly bad idea (but, if that’s all you have, it’s still a lot better than nothing.) USB2 drives and backup software are cheap. They also fail at a fairly high rate. But having a local backup is a good first step, and having a redundant remote backup is extra insurance, since all drives fail eventually.

Popularity: 31% [?]

Lessons learned: the iMac lives

My iMac is back up and running, after a few days at the Apple Store to replace its internal hard drive, which failed. I was able to migrate all my data from my Time Machine backups. I haven’t tested extensively yet. The first thing I fired up was iPhoto, as the thing that worried me most was my photos and videos of Haden. And I haven’t noticed anything odd.

Migration Assistant Weirdness

Before it grows entirely fuzzy, I wanted to note a few things that didn’t go entirely according to plan. One of these was Migration Assistant, the software included with OS X that helps you migrate from one machine to another, or, in cases like mine, from a Time Machine backup. When I got my iMac back home, I walked through the Migration Assistant’s steps, and it started copying things over. It started with my documents, then it transferred my applications, and then it got to a final stage, called “transferring files to support applications.” And that’s where it stayed, claiming, for many hours, that it required less than one minute to complete.

I called Apple Care, and we ended up cancelling the transfer. Logging into the transferred account revealed that the data was transferred, but there were several question mark icons on the Dock, none of which would launch anything (even though they showed names of the apps that should have been there, when hovered). So we logged back into the generic account that the Apple Store created (a passwordless user named “james”), deleted the migrated account, and started Migration Assistant a second time. But, this time, we excluded one category of data, under my user account, labeled “all other data” (or something close to that). In my case, this was 9GB of stuff, including, evidently, some of the mysterious “files to support applications” that were hanging up the Migration Assistant.

This time, the Migration Assistant did its work. And I logged off of “james” and onto my restored account. So far, I’ve had to reinstall two things: my printer software (I have one of those ubiquitous HP all-in-one things), and iWork ‘09 (Pages launched, but it warned me that it was missing files and needed to be reinstalled). I suspect there will be other applications that will need to be reinstalled.

Time Machine Weirdness

A scarier issue, but one so far of no consequence, was that a lot of my old Time Machine backups disappeared last week, before I contacted Apple, after I booted from the system DVD and attempted to restore from a Time Machine backup. What I think happened was that, since Time Machine was still on, my restored system started creating a brand new backup of my system (which was, at this point, still sitting on top of a soon-to-be-dead hard drive). This process never completed. But, in the meantime, Time Machine carved out space for the new backup, dropping off the old ones.

Dropping old backups isn’t a problem in and of itself; that’s part of how Time Machine works. What was disconcerting was that so many dropped off at once, with no warning. In the midst of all this weirdness, seeing something that drastic change on my only backup, put me in a highly anxious state (I feel that Apple Care owes me, at a minimum, a new bottle of Tums). In my case it hasn’t been an issue (fingers still firmly crossed, wood knocked). I just no longer have the ability to roll back to what my box looked like a year ago. The backups that remain go back about three months.

The Road Ahead

Spending a week worrying that you might have hosed your internal hard drive and your backup of the same tells you a lot about what really matters to you. In my case, the one thing I don’t ever want to lose is my iPhoto Library. I’m fairly paranoid when it comes to data. Unlike most people I know, I actually have a backup system. And, it’s fair to say that Time Machine saved me this time. But I want to get even more paranoid. I’m investigating two additional options:

  • Buying SuperDuper! and setting it up to create a clone of my Time Machine drive on a regular basis. This would give me a second option if my Time Machine drive were to fail.
  • Subscribing to an off-site online backup service. The three I’m currently investigating are Carbonite, Mozy, and CrashPlan. One of these would provide a bit of last-ditch assurance, in case some catastrophe were to happen.

Word to Your Mother

First, if you don’t have a backup strategy, get one. Even better, be paranoid like me and get two or three. There’s really no such thing as too many backups. Second, if you buy an Apple computer, buy Apple Care along with it. It’s a sound investment. This would have been a lot less fun if I, in addition to all the stress and strain of worrying about possible data loss, had a hefty repair bill to deal with as well. Finally, don’t trust drives. They’re totally expendable. The only way to live your life in a digital age and sleep well at nights is to have enough backups that you don’t care when a drive dies.

Popularity: 27% [?]