Tuesday, February 24, 2009

Carrying around my Dropbox (on removable media)

I keep a small set of files with me at all times; these are my essential files I keep backed-up so even if my computer dies, I can recover my basic information... my personal to-do list, contact list, etc. I can access these files at work, at home, and even on my phone. (Unfortunately, I just learned that a Mac will not read the file system, so I've got to find a way to deal with that). I've tried a few tools to help me keep my files in sync (Darcs, SVN), but recently I switched to Dropbox; it does a fantastic, trustworthy job automatically, so I highly recommend it.

Unfortunately, I've hit a couple of snags trying to keep these files with me. This post is all about what I've done to solve these problems.



I need to access my Dropbox files from removable media (even on Windows).

I read (and edit) my files on my phone sometimes; I haven't had a data-plan, so I've been copying files on and off an SD (or recently a microSD) card that I can edit on-the-go. By default, Dropbox will not allow you to install your files on a removable drive, so I cannot put these files on my micro SD card that I keep with me and use on my phone. (Actually, I could copy the files, but now that I can edit files on my phone I want to be able to plug the card into a computer and let it sync them all automatically.)

On *nix and the Mac, there's no problem installing to a different location.

On Windows, things are tricky. There are 3 tools on the Dropbox site that might help with this: Dropboxen, DropboxPath, and DropboxDataWrapper. I finally got DropboxDataWrapper to do what I want:

  1. Shutdown your running Dropbox.
  2. Run DropboxDataWrapper as indicated and specify the path on the external drive where you want the files.
  3. At the end, be sure NOT to check the box saying "I want to choose the location"; after you click "go to my dropbox" it'll complain about not finding things in the default location, but you'll see it running and you'll see it download things just fine to the path you specified. Note that if you right-click on the Dropbox service and select "Open My Dropbox", you'll get an error about the wrong location, so you'll always have to browse to that folder manually.
So by default, Dropbox will sync up my files from my default location, but then I can stop Dropbox, plug in my card, and run DropboxDataWrapper to sync it up.

(FYI: I couldn't get Dropboxen to work at all, and DropboxPath just changed my current path but didn't allow me to run Dropbox for my both removable disk and the default location.)

This isn't perfect: I've found a computer where DropboxDataWrapper didn't work right the first time, but I didn't have time to investigate so I quickly gave up and tried something else.





I need to be able to update my removable media from any OS (Linux and Windows).

After I saved my files to my card, things are great except that I had 2 versions of my Dropbox on there, one for Windows and one for Linux. Thankfully, each OS uses different configuration files, so I found I could put them all in one location and things are working; when I get on Windows and plug in, my files sync up, and then later when I get on Linux they sync up there, too. Here's how I set it up:

  1. Change all your Windows files and directories to writable. I did this at the level of my Dropbox folder:
    chmod -R u+w .

  2. Copy the .dropbox files from your Linux files on the external card into the same place in the Windows files on the external card. I only had three: one at the same level as Dropbox, one under Photos, and one under Public.
  3. Make a folder somewhere else to hold your Dropbox files. (You cannot do this on your card if it's formatted with a Windows filesystem because the next step will fail; Linux won't allow you to create the symbolic link.)
  4. Inside that folder, create a symbolic link to the Windows "My Dropbox" folder.
  5. Copy the .dropbox folder from your Linux files on the external card (at the same level as the Dropbox folder) into the Windows files on the external card (at the same level as the "My Dropbox" folder).

Now, it looks like each OS has a different version of some .dropbox files when I have shared folders, so we'll see what happens with those.




Hope this helps. I'll update this post if I learn more.

Friday, December 12, 2008

online money managers

This past month I started tracking all my expenses online, partly because we've hired a financial planner and she keeps asking how we spend our money. (Rude, I know.)

I started with Mint.com (because a vendor of my employer recommended them), and I'm very happy with their service. They:
  • They import from all my accounts (so far).
  • They categorize each expense automatically (and they're usually correct).
  • I can change the categorizations, and save the preference so that future expenses with the same description are categorized the same way.
  • I can split expenses and categorize parts separately.
I only have two complaints so far:
  • I cannot manage my cash.
  • While I can add my own categories, I cannot change or remove the predefined ones.
Coincidentally, today I found two other services that do much the same thing. I won't be switching yet, but I'll be watching for mothers:
  • Wesabe.com is very interesting because they want to make it a community that gives suggestions to one another; in addition, they have some APIs to help you work with your account data... they just want to make it really easy to analyze your finances and get help managing them. The current show-stoppers: they require a Mac or Windows install, so I cannot manage things from whatever computer I'm on; they currently only work with "USAA, Citibank, Chase, Wachovia, CapitalOne, and Bank of America"; and their APIs don't yet aggregate account data.
  • Egg.com seems to offer services similar to Mint, plus in-house financial services like loans, savings accounts, etc. The current show-stopper: it requires a Windows ActiveX install.

Thursday, December 11, 2008

Ancient teleconference demo... of mouse, screen-sharing, hypertext, and more!

Yesterday was the 40th anniversary of what The Register calls "The Mother of All Demos". They're not kidding. You can see it in a video that captured the presentation. Here are some highlights:
  • It starts out with 1 minute 30 seconds of text explaining how the whole production was set up, after which he jumps into his demonstration.
  • He starts showing the hyperlinking at 15:50.
  • He explains his mouse and his one-handed text entry device at 27-30 minutes in.
  • Someone else joins in to work on the same screen at 57 minutes in.
It's fascinating to watch, with all the glitches he hits and the things he has to explain along the way. Be sure to read the article and the explanatory text at the front of the video to get a full appreciation of this demo. It's history right before your eyes.

Tuesday, December 9, 2008

Jolly Old Mathematics

So I was reminiscing with Jen about Helaman Ferguson and creative math, so I had to google for fun with math for this Christmas season. I found a few lists (this is probably the best one), but here are the specific activities that looked like the most fun out of the dozens I perused:


Happy Holidays!

---

While I'm here, I've got to mention two cool fractal sites, even though they're not Christmas-oriented:

Tuesday, November 18, 2008

a few notes about the Java ClassLoader

I found a case today where the clazz.getResourceAsStream(String) retrieved a resource but the clazz.getClassLoader.getResourceAsStream(String) failed to find it. Weird.

I never figured it out, but I came up with the following as I tried:

  • There is no way to get all the entire path that is being searched. I always come to this point and try, but it's a hard fact of Java. I did find this blog entry that explained how you might patch the ClassLoader.toString() methods. But read on...
  • Even for URLClassLoader classes, it looks like it'll search through directories that are not found by the getURL() method (so that previous blog entry won't catch them all). I found this by running some unit tests in Maven with the method that follows, and it was retrieving things from the 'classes' and 'test-classes' directories that didn't show in the getURL() results.
  • If you try a call to getResource(""), it'll show some of the directory paths that are in the search path. I don't know for sure that this is true because I can't find it documented, but it seems to work. So the following method will show all the URL and path resources up the line from a given loader:

private static void showAllResourcePaths(ClassLoader loader) {
try {
String indent = "";
for (ClassLoader nextLoader = loader; nextLoader != null; nextLoader = nextLoader.getParent()) {
System.out.println(indent + " loader " + nextLoader);
for (Enumeration<URL> urls = nextLoader.getResources(""); urls.hasMoreElements(); ) {
URL url = urls.nextElement();
System.out.println(indent + " path: " + url);
}
if (nextLoader instanceof URLClassLoader) {
System.out.println(indent + " URLs: " + Arrays.asList(((URLClassLoader) nextLoader).getURLs()));
}
indent += "-";
}
} catch (Exception e) {
e.printStackTrace();
}
}

  • Using that method will show you most of what you want because, in my tests, all the class loaders in the ancestry turned out to be URLClassLoaders.

What is the difference between the clazz.getResource and clazz.getClassLoader().getResource methods?

Monday, November 17, 2008

online to-do lists

I've been keeping my to-do list in a text file on my phone, and that together with my phone's calendar and my email are the things that pretty much run my life. Someday I'm sure that there will be a way to have all of those things integrated the way I want, most likely through an online service. To do so, they'll have to:
  • make it easy to make notes wherever I am, ideally with Jott
  • allow me to attach a "context" (and a time estimate)
  • integrate with a calendar
  • allow for task dependencies
Today I figured it was time again to check around and see if today is that day. It looks like it's not. The dependency feature is the hardest to find, and I'm a bit surprised it's still not very widespread. Here's some of the info I've gleaned from about a dozen sites:

Remember The Milk is integrated with Jott for free, which makes it most attractive for a trial; I'd like to try Hivemind for their dependencies, and I will if I do a paid subscription to Jott (eg. pay-as-you-go, because Jott is critical but I use it rarely).