tom alison dot com


Moving the Location of Your Flip Videos

Update, June 21 2009:

It appears the latest update of the FlipShare software (version 4.5) supports moving your library natively. Get the latest software, then go to “Edit > Preferences > Library”.

Move library in FlipShare

Move library in FlipShare

Older method, pre-FlipShare 4.5:

My friend gave my wife and I a Flip Mino HD video camcorder as a gift when we had our first child. So far it’s been quite wonderful. It’s simple to use and we share lots of videos with our family that live far away.

Today I was going through a backlog of videos stored on the Flip camcorder and saving them to my computer. The problem was my hard drive was running low on space.

I figured I could just change a preference in the FlipShare software to point it to a different hard drive where I had lots of space, but no such luck. It turns out that FlipShare is hard-coded to place your videos in a particular directory. I suppose this is to reduce the likelihood of accidentally losing of your videos. But it also raises the question of what to do with your Flip videos when your hard drive starts to run out of space.

It turns out it is possible to move your Flip videos to a new drive. It’s not simple, but here’s how I did it.

Note that I’m using FlipShare version 4.1.2 on Windows Vista. You can upgrade Flipshare here.

Disclaimer:
This requires a bit of hacking. If it doesn’t work for you there’s a chance of data loss. Before doing any of this I recommend you backup your Videos folder, especially the “FlipShare Data” subdirectory.

Moving your default “Videos” folder

FlipShare is hard-coded to store all of your videos in the default “Videos” folder in Windows Vista. You can change the location of this folder.

  1. Close FlipShare if it’s open.
  2. Right-click on your “Videos” folder in Windows
    (my original path was “C:\Users\Tom\Videos”)
  3. Click “Properties”
  4. Click the “Location” tab
  5. Enter the full path of the new location (my new location was “K:\Videos”)

Vista will create the folder in the new location if it doesn’t exist. It will also ask you if you want to copy all the subdirectories of the “Videos” folder to the new location. You do.

There’s a more detailed description of how to change default folder paths in Vista here.

I figured I was all done at this point. I’d launch the FlipShare software, it would see the new path to the “Videos” folder, and I’d be all set.

But it didn’t work out that way. The folders I had previously within the FlipShare application showed up, and the video counts were correct. But none of the thumbnails showed and I got strange error messages when I tried to click on any of the videos.

As it turns out, FlipShare uses an internal database to store the paths to your videos. Even though it could now save videos to the new location on my K: drive, it couldn’t find any of my previous videos because it’s internal database was still pointing to the old “C:\Users\Tom\Videos” location instead of the new “K:\Videos” location.

The good news is that FlipShare uses the open-source SQLite database to store all of it’s data. That means it can be read (and updated), using a SQLite database editor.

I’m not that familiar with SQLite tools, but a quick Google search yielded SQLite Admin. SQLite Admin is an Adobe Air app that makes it easy to view and modify a SQLite database. Download it here.

Updating Your FlipShare Database

The FlipShare database is located in your “Videos” folder, in the “FlipShare Data” subdirectory. In my case the new path to the database file was “K:\Videos\FlipShare Data\flipshare.db”.

At this point I highly recommend backing up flipshare.db

  1. Close FlipShare if it’s open
  2. Open SQLite Admin and open your “flipshare.db” database.
  3. In SQLite Admin, press the “Open Query” button.
  4. Enter the following query as a test to make sure things work the way you expect:
select replace (uri, "[old Videos path]",
    "[new Videos path]") from MediaElementSource

Replace the items in brackets with the values appropriate to your system. After you’ve typed in the query, hit “Execute Query” to run it.

In my case the actual query was:

select replace (uri, "C:\Users\Tom\Videos",
    "K:\Videos") from MediaElementSource

You’ll see output similar to this:

Click for larger image

Click for larger image

Take a look at the paths in your results. Make sure that the paths that are shown are the actual paths to files in your new location. You can open up a Windows Explorer window to verify.

Nothing has been modified yet. The query above was just a sanity-check. To modify the paths, enter the following query (with your data substituted for the brackets) and hit “Execute Query”:

update MediaElementSource
    set uri=replace (uri, "[old Videos path]", "[new Videos path]")

In my case, the actual query was:

update MediaElementSource
    set uri=replace (uri, "C:\Users\Tom\Videos", "K:\Videos")

You’ll now see something like this in your SQLite Admin tool:

Click for larger image

Click for larger image

You’re almost there but not done yet. FlipShare also stores the paths of your video thumbnails it it’s database. If you don’t update the thumbnail paths to point to the new location, FlipShare will simply crash when you try to open it.

To update the video thumbnail paths we’re going to proceed similar to above. First enter this query and hit “Execute Query” to preview the results of the update:

select replace(PreviewImagePath,
    "[old Videos path]", "[new Videos path]") from MediaElement

In my case, the actual query was:

select replace(PreviewImagePath,
    "C:\Users\Tom\Videos", "K:\Videos") from MediaElement

Here’s what it looks like:

Click for larger image

Click for larger image

Again, check to make sure that the paths shown point to actual locations in Windows.

To go ahead and make the changes, enter this query and hit “Execute Query”:

update MediaElement set PreviewImagePath =
    replace(PreviewImagePath, "[old Videos path]", "[new Videos path]")

My query was:

update MediaElement set PreviewImagePath =
    replace(PreviewImagePath, "C:\Users\Tom\Videos", "K:\Videos")

And here’s what it looks like in SQLite Admin:

Click for larger image

Click for larger image

Now close SQLite Admin. Open up FlipShare. All of your videos and thumbnails should be intact, now referenced in their new locations. New videos that you copy over from your Flip camcorder will also be placed in the new location.

Enjoy and keep making videos!


Pastebins

I came across my first pastebin while following the SpamAssassin mailing list. Users of the SpamAssassin mailing list face an interesting problem. They frequently need to share examples of spam with one another in order to help debug SpamAssassin. But the SpamAssassin mailing list is hosted on the same servers that run all of Apache’s mailing lists. Hence the SpamAssassin mailing list is filtered by SpamAssassin itself.

The consequences of this are logical, though ironic. If you want to share the contents of a spam message with the SpamAssassin mailing list, it will most likely get blocked by SpamAssassin. Doh!

So what recourse does someone investigating a spam message have? Answer: post the spam message to a web site, and send the link to the posted message content to the mailing list.

This is where a pastebin comes in. A pastebin is a web site that allows you to publish a snippet of code, a server log, a spam message, or any arbitrary piece of text. You can then share the link with people so they can review it.

The utility of a pastebin extends far beyond my SpamAssassin example. They are frequently used by developers on IRC channels. Pasting a 60 line code snippet into a chat window and telling someone “Hey look at line 32 for me” does not work. Lines wrap in weird ways, monospace fonts are not guaranteed, and line numbers are not preserved.

Similarly, if you want help with an HTML or Javascript issue, you’ll have a hard time pasting your code snippet directly into a web site. Most sites, for security reasons, will strip some or all of the HTML tags, and will almost certainly not let you paste Javascript that might execute when it’s rendered on the web page.

Here’s a list of a few of the pastebins out there and what they can do:

pastebin.com

This is one of the older pastebins and was the first one that I was introduced to via the SpamAssassin mailing lists. It allows you to do several cool things:

Here’s an example of a paste in pastebin. This is a snippet of Python code that generates awful poetry. It’s derived from an exercise in Programming in Python 3.

http://pastebin.com/f71708aec

I created a follow-up to this paste where I added a comment line and highlighted it:

http://pastebin.com/f4feb6a1c

Pastebin provides a diff between the two pastes here:

http://pastebin.com/pastebin.php?diff=f4feb6a1c

gist.github.com

Github now provides a pastebin. They are called gists. There are a few nice options:

Here’s a sample gist: http://gist.github.com/120863

snipt.org

snipt.org has a lot of the features of the previously mentioned pastebins, including syntax highlighting, embedding, access to the raw text, and private snipts. It also offers a few unique options:

Here’s my awful poetry python script with the “Glitter Bomb” theme:

http://snipt.org/kqj

SyntaxHighlighter

This is not a pastebin, but offers syntax highlighting and line numbering of code snippets that you include on sites that you host. It’s written in Javascript and offers support for multiple syntaxes. As of version 2.0 it also provides theming support via CSS.

There are SyntaxHighlighter plugins for popular content management systems like Wordpress, Drupal and MediaWiki. I came across an example SyntaxHighlighter in a great post on human-readable sorted du output.

There’s a lot more pastebins out there. See the Wikipedia entry on pastebins for more detail. If you’re thinking of starting your own, pay attention to the “Abuse and spam” section on the Wikipedia page.


Weekly Links : May 29

Found this week: “fail” is the new schadenfreude, malwebowent trolls, avoiding burnout, enjoying the silence, the paradox of cancer in whales.

Why is everyone saying “fail” all of a sudden?
Christopher Beam, slate.com

“Why has fail become so popular? It may simply be that people are thrilled to finally have a way to express their schadenfreude out loud. Schadenfreude, after all, is what you feel when someone else executes a fail. But the fail meme also changes our experience of schadenfreude. What was once a quiet pleasure-taking is now a public—and competitive—sport.”

The Trolls Among Us
Mattathias Schwartz, nytimes.com

“Two female Yale Law School students have filed a suit against pseudonymous users who posted violent fantasies about them on AutoAdmit, a college-admissions message board. In China, anonymous nationalists are posting death threats against pro-Tibet activists, along with their names and home addresses. Technology, apparently, does more than harness the wisdom of the crowd. It can intensify its hatred as well.”

Burnout
Scott Boms, alistapart.com

“Ultimately, burnout results from a lack of equilibrium. When you lose your balance, physically, you fall over. Burnout is very similar, except that once you’re down, it can be a real challenge to get back up.”

In Praise of Silence
Lane Wallace, theatlantic.com

“But what concerns me as much or more about incessant connection through Twitter, texting, Facebook, Crackberrys, and yes, even 24/7 instant news … is that all those technologies enhance an already bad inclination humans (and especially Americans) have. And that is: an overweening desire to be distracted from being alone in silence … or having to come to terms with whatever we might find there, if we slowed down enough to let it catch us.”

Why don’t all whales have cancer?
John Nagy et al., oxfordjournals.com

“Larger organisms have more potentially carcinogenic cells, tend to live longer and require more ontogenic cell divisions. Therefore, intuitively one might expect cancer incidence to scale with body size. Evidence from mammals, however, suggests that the cancer risk does not correlate with body size. This observation defines “Peto’s paradox.” Here, we propose a novel hypothesis to resolve Peto’s paradox. We suggest that malignant tumors are disadvantaged in larger hosts.”


Infant Growth Charts in WolframAlpha

A bit over a month ago I was searching for infant growth charts because I was concerned my daughter wasn’t gaining weight sufficiently. At our previous check-up our pediatrician told us she had dropped 1 standard deviation on the standard growth curves since the last visit.

It was nothing to be overly concerned about. Weight gain rates fluctuate in the early months of an infant’s life. Nonetheless, as a new father I was anxious to see how well she was doing a few weeks later when my wife had her weighed at a local group for new mothers.

I used Google to search for growth charts. It returned a bunch of interactive tools, many of which did not work well or were difficult to interpret. The PDF files on the CDC site were useful, but excruciating to find.

Flash-forward several weeks later. My daughter’s weight is doing fine; our pediatrician had already verified that at our subsequent visit. But I was fooling around with WolframAlpha, trying to find some interesting data beyond what percentage of the population is named “Tom”. On a whim I typed in “infant growth” and found exactly what I had been looking for a month back: a concise and easy-to-interpret answer to the question of what percentile my daughter was in based on her age and weight according to the standard growth curve.

WolframAlpha defaulted the data to the set appropriate for a 12-month old, but it was easy to change via a simple input box at the top of the page. And while the small version of the growth plots were a bit tricky to read, the distribution charts where nice and clear. The best part was the accompanying data tables that showed the median weight, as well as the range one and two standard deviations out.

Weight distribution for infants age 4 months

Weight distribution for infants age 4 months

WolframAlpha has received a lot of flak for not being useful outside of a small realm of users. A lot of that is justified – for now. When used with the expectation of a conventional search engine, you’re much more likely to find irrelevant or no results than anything useful. But if you want to ask a somewhat arcane, data-driven question – like how many seconds old you are – WolframAlpha does produce results.


Books Worth Reading

Managing Humans: Biting and Humorous Tales of a Software Engineering Manager Books Worth Reading

The management section of software bookshelves typically has a bunch of books explaining various methodologies like Agile and XP. They’re typically written by consultants and tend to be a little heavy on process and dogma.

“Managing Humans” is the total opposite. It’s a humorous collection of anecdotes about the people and personalities that inhabit the software development world in both start-ups and larger corporations. And you don’t need to be a manager to enjoy it. For some samples, check out some articles from the author’s blog; 1.0 and The Nerd Handbook are both fun reads.

Rainbows End Books Worth Reading

I’m not an erudite science fiction reader, but this 2007 Hugo Award winner is excellent. It’s author, Vernor Vinge, helped define the notion of the Singularity and Rainbows End provides an entertaining look at what that slippery concept might look like twenty years from now.