Category: Technology’s Betrayal


Thursday 2011/12/01
1:39 PM

Categories:

Drupal, Technology's Betrayal, Web Dev

Drupal’s Ctools Object Cache

Not sure why (there are so many things I don’t know about Drupal, frankly) but occasionally when creating/cloning a View, I’ll get the following error message when saving:

PDOException : SQLSTATE[23000]: Integrity constraint violation:

I’ve taken to using a workaround gleaned from this thread on drupal.org. I examine the database using Sequel Pro, find the ctools_object_cache table, and find the row entry for the View I’m trying to create. Deleting that row and attempting to save again usually does the trick. My guess is that the operation creates the temporary entry in the Ctools object cache, but when saving fails you still have the entry in that table. So attempting to re-save results in a collision with that cached object.


Thursday 2011/07/07
12:04 PM

Categories:

Technology's Betrayal, Web Dev

Big Dump MysQL Importer

Filed away for future use: Big Dump, a MySQL import utility. I was having trouble with importing a big SQL file to a database on a shared hosting plan—the import kept timing out. Big Dump gets around this by splitting large files and importing them sequentially. You set the config for your database, upload the php file and SQL to your webserver, and let it run.


Monday 2011/06/20
2:14 PM

Categories:

Drupal, Technology's Betrayal, Web Dev

Drupal Features Module and Nodequeues

A little thing I’ve noticed with the Drupal 7 Features module and Nodequeues: the View automatically created by a nodequeue doesn’t show up in the “Views” listing when creating a Feature. You have to manually create the View, and then it’ll show up in the listing.

If you haven’t used Features before, they’re a way of collecting your configuration changes into a module that can be applied to an existing site. Since the changes are pushed into code as a module, that means they can be applied to a site without disturbing the database. This way you can apply changes to a site that’s already live and full of content.


Monday 2011/06/06
12:20 PM

Categories:

iOS, Keyboards, OS X, Technology's Betrayal, Writing

Blogging on the iPad

I wrote the last post “Not If, But When” on the iPad, using the iOS WordPress app. That was my first attempt at writing more than tweets on the iPad. I noticed a few things: I found that typing a long-form piece was a slower experience, but completely workable. I was frustrated, however, by the lack of any clear way to create links. After some more experimentation I found that starting to type “http://” makes the app ask you if you want to create a link. It would be nice to have a dedicated button, or at the very least a quick introductory message showing how to create one.

I wrote this post by starting it as a draft in Mars Edit, and then continuing it in the WordPress iOS app. I can imagine that my usual process will most likely involve the reverse: starting a post in iOS and finishing it in Mars Edit.

I still don’t see how to create curled quote marks with the software keyboard; I imagine that hooking up a Bluetooth keyboard is the only way to get those. I just installed a Markdown plugin on this blog, and using that syntax on the iOS app surprisingly works. So that gives me support for things like emphasis and blockquotes. Not bad.


Thursday 2011/06/02
10:35 PM

Categories:

Apple, OS X, Technology's Betrayal

Not If, But When

Last week Jordan’s four-year-old white plastic MacBook started to freeze up. Fearing the worst, I immediately cloned her machine to an external drive. A few days later the dreaded folder with a ? appeared (has that replaced the sad Mac face?) and it refused to boot up. I ordered a 250GB, 7200rpm drive off Amazon as a replacement. I guess that 250GBs is the new entry-level for laptop drives.

When the drive arrived today I dropped it into my toaster dock, fired up Super Duper! and cloned the backup drive back to the new drive. It took about one hour. Once I found my Torx screwdriver it was just a matter of popping the battery off, taking off three screws, pulling out the drive bay, and swapping the dead drive for the new one. I put everything back into place, fired it up, and…the ? folder popped up again. But only for a second. The Apple logo showed up after that, and the machine booted up cleanly.

The whole experience reinforced what I always tell my friends: hard drives will fail. Not IF, but WHEN. I think I’ve had three hard drive failures over the last ten years, including this one. Cloning your drive regularly can get you back up and running much faster than trying to take your computer in to your local computer repair shop and hoping they can dredge some data out of your dead drive.

What could I have done better? I should have been backing up to a laptop drive, so that I could have just popped that in instead of waiting a week for Amazon’s super saver shipping to deliver the replacement drive. I also need to start cloning both of our laptops on a more regular basis. I’ve gotten lazy with mine, since I also have online backup via Backblaze. A local, physical backup is still preferable to online backup for quick restores, however.