Inventing New Uses for Dropbox

After buying my third computer (I have a work desktop in my office, a personal laptop, and a personal tablet), I became a big fan of Dropbox. The service is a paradigm of cloud computing: I get a folder on all my computers that acts like a normal Windows folder, but syncs up with a remote server every time a file changes. I immediately started using the service for, say, my dissertation-related files – which are now accessible from all three computers. As a plus, Dropbox downloads and keeps a local copy of all files in the folder, so my dissertation exists in four identical copies (all my computers plus the Dropbox server – which gets backed up on its own!) so I don’t ever have to worry about that work disappearing into some black hole if my hard drive crashes. And since I got a Droid Incredible, I can even access files in my Dropbox from there. Yippee!

I just came up with a devious new use of the software to add to all that. I do a lot of Matlab simulations these days, and they run fastest on my work desktop. However, these simulations take a long time, so I’d like to be able to set them up and get their results in short, intermittent checks while I’m traveling for the holidays. (Hey, I’m trying to move my research along efficiently and finish up my degree! Really!) But I haven’t been able to get Windows Remote Desktop to work – it seems that my department at Cornell keeps those ports closed and I haven’t been able to find a way around it.

So here’s what I did: I wrote a Matlab script that checks for the presence of other Matlab scripts in an input folder in my Dropbox. It then runs any scripts it finds, captures their output, and deposits that into another folder in my Dropbox. (I encapsulated the run command inside a try/catch block which also plops any errors into the output folder.) The script then deletes the file from the input folder and loops. If I put a file named “stop” in the input folder, the script cuts itself off. I think next I will add some code looking for a file named “clean” and responding to that by clearing all variables except those used in the wrapper loop.

From any of my computers, I can now write a Matlab script to do some simulations and copy it into the “input” folder. When my work desktop syncs up with Dropbox, the Matlab loop catches the script and runs it. I can check the Dropbox output folder later, again on any of my computers, to see what happened!

Maybe this little trick will be useful to someone else out there, so I decided to share it. Happy Hanukkah, grad students of the world!

This entry was posted in Gadgets, Graduate school, Research. Bookmark the permalink.

Leave a Reply