Thursday, January 24, 2013

How to go paperless the future-proof way (without using Evernote)

The short version:

  • Get a Doxie One scanner. For (optional) convenience, get an Eye-Fi SD card for $35, which will send documents from the scanner to your computer wirelessly and automatically.

    Update: If you want to cut your scanning time by more than half, spend a few bucks more and get the Canon P-215 scanner (as recommended by The Wirecutter). It scans twice as fast, it scans both sides of the page at the same time, it has a document feeder, and it has built-in OCR.
  • Scan your documents to your hard drive. Put them all in one big folder. If you want, use the OCR option in Doxie’s software to make your PDFs searchable.
  • Date and tag the documents: use this format for filenames:
    [year]-[month] name of document #tag1 #tag2 #tag3.pdf
  • Get an expanding file jacket. Put all your important papers in there and out of the way, and scan them all once every quarter or so (I usually do my scans once a year just before I do my taxes).
  • Shred the original documents.
  • Keep backups.

When you want to run a search, open your archive folder and run a search. Need all tax-related documents for last year? Search for 2012 #taxes.

No subscriptions. No extra software. Guaranteed to be stay portable and useful for the next 20 years.

Why the hashtags? What about folders?

Using #tags #like #this in the filename is a universal tagging mechanism. It works on Mac OS and on Windows, and the searches on those systems will have no problem finding your files.

Sticking files in a folder hierarchy is a poor way of filing that is on its way out. For example, what do you do if a document is both medical and tax-related in nature? Do you create a Taxes → Medical folder structure, or Medical → Taxes?

Tags allow a document to live in more than one box at a time, are easy to add, and are easy to search for.

Why Not Evernote? Reasons, that’s why.

There have been a couple of great posts by others lately about going paperless, and they’re definitely worth reading. But they all assume you need some kind of fancy software setup, including (most commonly) a subscription plan to Evernote.

I agree it must be nice to have someone else run OCR on my documents and host them for me. But let’s look at the drawbacks:

  • I have to pay someone else $60 a year in case I need to perform occasional full-text searches on my own documents.
  • Long-term uncertainty. Will Evernote be around in 10 years? 20 years? How do I know I’ll be able to get my massive archive back out again when they go out of business?
  • Handing off responsibility for your sensitive documents to someone else’s computers — this is just asking for trouble. Data corruption, security breaches, warrantless searches. Over the next 10 years, it’s almost a given that your hosted service of choice will be hit by at least one of them.

Sunday, July 29, 2012

Accessing BBC Coverage from the U.S.

You live in the U.S., you don’t have a cable subscription but you want to watch the Olympics live? Here’s how to do it.

If you have a Mac, you can just follow these excellent instructions by Brad Gessler.

If you’re a Windows user, follow the instructions below, which I’ve adapted from Brad’s post after a good bit of tinkering. I’m also including some details that he left out.

  1. Brad writes1: “Signup up for a Linode account. After you enter your credit card information and select a Linode server, you’ll be asked where you’d like to boot the server. It’s important that you select London, UK during this step so that you get an IP address from inside of London.” Note that the $20 (least-expensive) server option should be plenty for your needs.
  2. When Linode asks which distribution you’d like to use, leave it at the default (Debian). You can also follow all the defaults for the other setup settings (disk space, swap, etc.). After configuration and setup are complete, follow the steps on the web interface to boot your server up.
  3. Download PuTTY (just download the putty.exe file listed first). This is the program you will use to connect to your Linode server in London.
  4. Configure PuTTY:
    • Main PuTTY screen: Under Host Name enter the IP address of your server, leave Connection type as SSH.
    • In the tree view at left, click ConnectionData. In the auto-login username field, enter the text root
    • In the tree view at left, click ConnectionSSH. Make sure enable compression is checked.
    • In the tree view at left, click ConnectionSSHTunnels. Under Source port, type 8080. Select the Dynamic option and leave the other settings as default, then click Add.
    • Return to the main PuTTY screen by clicking Session in the tree view at left. Type a name under Saved Sessions and click Save (so you won’t have to go through this whole rigamarole every time).
  5. Set up your proxy.
    • If you use IE or Chrome, configure this by going to Network and Sharing Center, and clicking Internet Options. Go to Connections tab, click LAN Settings button. Make sure Use a proxy server for your LAN is checked, and click the “Advanced” button. Enter 127.0.0.1 next to the “Socks” field, and enter 8080 for the port. Leave the other fields blank as shown (HTTP, Secure, and FTP).
    • If you use Firefox, go to “Connection Settings”, select “Manual proxy configuration” and follow the same procedure, entering 127.0.0.1 next to the “Socks host” field, and 8080 for the port, and ensure the other fields are blank.

Now every thing is set up.

Whenever you want to watch Olympics on BBC:

  1. Make sure the proxy is turned on as in step 5 above — these settings will be saved from last time, all you have to do is turn it on again.
  2. Open PuTTY, double-click on your saved session, and enter your password when prompted. You can minimize the terminal window once you’re sure you’ve logged in.
  3. Browse to http://www.bbc.co.uk/iplayer/tv/bbc_one_london/watchlive to watch the Olympics live, or go to http://www.bbc.co.uk/sport/olympics/2012/live-video to pick and watch specific events.

When you’re done: Tunneling all your web traffic through a London server will make the rest of your browsing slower (and waste your Linode account’s bandwidth) so you should close PuTTY and turn off the proxy server setting from step 5 above when you’re not watching the Olympics.

Thanks to @mja for the original tip about Brad’s post, and the one about where to go directly to watch specific events.

Other approaches

I did attempt to use a VPN service to do essentially the same thing, but it was far too slow.

Update, July 30 2012:

  • If you use Chrome or Firefox, installing a “proxy switcher” extension for your browser will make between enabling and disabling the proxy setting much easier. Use Proxy Switchy for Chrome, or QuickProxy for Firefox.
  • A couple more good articles about this issue have popped up:
    • A post by Colin Nederkoorn, in which he initially advocates the VPN method, but also mentions the Unblock Us service. He’s not sure how it works (and neither am I) but he says it works great.
    • Dan Parsons advocates setting up OpenVPN on your Linode server, but I haven’t seen any reason why one should go to the additional step of installing OpenVPN when a simple SOCKS proxy seems to work fine.

  1. Full disclosure: I’ve copied the Linode signup link from Brad’s original post, which means it still includes Brad’s referral code. I thought this was fair since he was the one who first posted the basic solution. In his post he expresses a wish to find some way to use his referral code to donate to the EFF; I’ll keep an eye out, and if he finds a way to do that I’ll update this post’s link as well. 

Tuesday, July 10, 2012

How To Get Inexpensive Data Roaming For International Travel on Verizon

Update, Sep 17 2012: Also read this excellent article: Which iPhone 5 for a Global Traveller?

If you’re a U.S. Verizon customer with a smartphone, here’s the lowdown on keeping data roaming charges to a minimum for any trips outside the country.

Keep in mind, it’s not uncommon for Verizon to alter the options they offer. If this article hasn’t been updated in more than 6 months1, things may have changed; in that case, look around further online or call customer service and ask them how best to handle it.

Be sure to leave a comment with your findings!

The penny-pincher method (for trips of less than three weeks)

My wife is from Canada and we do this regularly during our visits to family there.

The way Verizon charges for data outside the U.S. is (currently) very simple: They charge for global data in chunks: $25 gets you a somewhat-measly 100MB. You can’t pay in any smaller increments.

Here’s what to do. Call customer service ahead of time2, and ask them to add one 100mb block of Global Data, but only for the days you’ll be outside the US. Give them the days you want it to go on and off your account (i.e., the days that you’ll be crossing the border). This will pro-rate the cost by the number of days you are on the plan, but it will also pro-rate the amount of data you get.

For example, supposing you’ll be out of the country for 11 days. Here’s how the costs for this method would work out (for each line, remember):

  • Cost: ($25 / 31) x 11 = $8.87
  • Data: (100MB / 31) x 11 = 35MB (round down to nearest MB)

Now (in this example) you’re only paying $9 extra per phone instead of $25. On a two-phone account, that would be a savings of $31.

The trick is staying under that low data ceiling (35MB in this example). If you use more than the chunk of prorated data you’ve already paid for, you’ll automatically get an additional 100MB — and charged the additional $25 as well, meaning you’ll probably pay more than you needed to3.

If you’re going to be out of the country for more than 20 days, the savings from this method become too small to be worth the hassle; you might as well just get the 100MB.

Either way, here’s how to make sure you don’t use up your “cheap” data:

  • Save your data usage for when you’re at a wifi hotspot (any data you use over wifi doesn’t count against you). This includes websites, email, Instagram, Facebook, etc. — pretty much app that communicates in any way. Some games don’t use data, but many do. Light usage of these things is ok, but the more you can save for wifi, the more likely you won’t break your data cap.
  • Don’t watch videos when not on wifi (Netflix, YouTube, Vimeo, etc.)
  • Don’t stream any music when not on wifi (Spotify, Pandora, iCloud, Amazon, etc.)
  • If you’ll need maps during the day, look them up ahead of time while on wifi, making sure to zoom in and out to download the tiles at various zoom levels
  • (For iPhone users) Turn off Push for email — instead set it to Fetch Hourly (or Fetch Manually).
    Go to SettingsMail, Contacts, CalendarsFetch New Data, turn off the Push option and set the frequency to Hourly or Manually.

What about the inconvenient and totally free method?

Depending on your phone, it’s possible that you may be able to avoid any extra overseas data charges altogether by turning off cellular data.

When your phone is connected to a network of any kind, it is constantly “sipping” data. True, it’s a miniscule amount, but as soon as it sips even one kilobyte while you’re out of the country, you get that $25 charge for a block of 100MB of roaming data.

On an iPhone, you need to turn off cellular data under SettingsGeneralNetwork. (Turning off “Data Roaming” will not work — it’s notoriously unreliable.) Another option, if you want to avoid voice roaming charges as well, is to turn on Airplane Mode and then re-enable WiFi. Remember you can’t place or take any cellular calls in Airplane Mode, but you could use Skype or FaceTime to make calls while connected to WiFi.

The catch with this method is that it can never actually eliminate your risk. Unforeseen circumstances can very easily require you to grab an email or place a call when you’re not near wifi, and even if it’s technically possible to change your phone’s settings back and forth in just the right ways, you always risk slipping up even for a second and incurring that $25 charge. Personally I’d much rather be realistic and plan ahead so I can be flexible without breaking the bank. For short trips especially, I really don’t believe it’s worth the mental hassle, unless you want to take the challenge as sort of a game with yourself. Shoot, if you can prove you did it, I’ll personally send you a $10 Starbucks gift card.4

What if I’ll be out of the country for more than three weeks?

Then you really need to read this article: World travel with the unlocked US Verizon iPhone 4S — check out the comments as well.


  1. As I said, I have family in Canada so I shouldn’t have a problem keeping this post updated with any changes I encounter. 

  2. From your Verizon phone, dial 611, or dial (800) 922-0204. Press 0 at the menu to just get right to a live person. You’ll be asked to state your reason for calling and told about higher-than-normal wait times, but this is just to deter you into trying the website instead; the wait usually isn’t very long. 

  3. Supposing you did use up your “small” chunk and got hit with an additional 100MB chunk, but your total roaming data for the month was still under 100MB, you should be able to call customer service and at least get credited for the “small” chunk. I’ve had to do this once, with no problems. 

  4. Here’s the rules: No Purchase Necessary. There’s only one prize, a $10 Starbucks gift card given away by random drawing. To enter the drawing you must blog or tweet something positive about this blog (referencing my Twitter account @joeld) and provide me privately with proof that 1) you’re a paying U.S. Verizon customer in good standing with a smartphone data plan as part of your regular account, 2) that you incurred $0.00 in data roaming charges during any given billing period, and 3) that you personally were out of the country with your smartphone ( powered on ) for at least two days during the billing period in question. The ideal way to satisfy these requirements would be a copy of your driver’s license, a copy of your Verizon bill, and a photo of you holding your powered-on smartphone open to an information screen showing that phone’s own number, and clearly showing an identifiable non-USA landmark in the background. The photo should be signed and dated by the person who took it (not you), along with their contact info. The drawing will take place within 1 week of the first qualifying entry. Good luck! :-D 

Friday, June 1, 2012

Fix severe delays when loading Excel 2003 files from network drives

I was recently made aware of a problem where Excel 2003 would take several minutes to load a spreadsheet from a network drive. What made it even worse was that several of these sheets were referenced inside a CAD drawing (meaning AutoCAD would open Excel in the background for each spreadsheet referenced), and the load delay for each individual spreadsheet made it was near-impossible for the drawing to ever finish loading.

I found three possible solutions to the problem.

The first (which I used) was to create or modify the following registry key using regedit:

[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Security\FileValidation]
"EnableOnLoad"=dword:00000000

The second option is to uninstall the Microsoft Office File Validation Add-in from the Control Panel.

The third is to upgrade to Excel 2007 or later.

Friday, May 25, 2012

The iPhone Hot Battery Drain, Fixed with a Lightweight Email Setup

Recently my iPhone 4S suddenly began exhibiting symptoms of the famous “hot battery drain” problem, where the phone would become much warmer to the touch then normal, the battery would drain more quickly, and the phone would charge much more slowly than normal.

It’s been known for some time now that this is often an iOS 5 bug caused by a contact sync process that gets out of hand1. In the process of fixing this problem for myself, I discovered an alternative to the commonly-used practice of using an extra Exchange account for syncing Gmail contacts. This new setup has dramatically increased my battery life even beyond what it was before I started having the battery drain issue.

Note: I use Gmail, and I like all my contacts to be available from there. These instructions are thus somewhat Gmail-centric, but you should be able to improve your battery life by following the general principles shown. If you have tips for other email/contact setups, please let us all know in the comments.

First, solve the battery drain issue. The following steps solved the problem for me2:

  1. Remove all the messaging accounts on your phone, including iCloud. Remove all Calendars, Contacts, Notes and Bookmarks from the phone (so you don’t have duplicates when you re-add the accounts later).
  2. Power down your phone (the normal way, by holding down the power button and sliding to power off).
  3. Let it cool off, and start it up again.

You now have a blank slate: no email, calendars, or contacts. A blank slate means a chance to clean up and streamline.

  1. Re-add your iCloud account. Wait long enough for contacts and calendars to sync, check to make sure.
  2. Re-add your Gmail account as a Gmail account. This means it will only pull in mail (and calendar), not contacts.
  3. Clean up your Gmail contacts by opening your contacts in Gmail (i.e., open the website on your computer), clicking the More button at the top, and clicking Find and merge duplicates...
  4. Purchase the Contacts Sync For Google GMail app. Yes it’s $4.99. It’s worth it.
  5. Run the app, making sure to read the User Guide to make sure it will be syncing contacts the way you want it to. (I used 2-way, so all my contacts live in both my iCloud and my Gmail accounts.)
  6. Finally, go to the Settings app, and go to the Mail, Contacts, Calendars section. Click on Fetch New Data. Make sure Push is turned off, and select the Hourly fetch schedule.

Now you have all your contacts synced by an app that knows how to do its job better than iOS does (seriously, check out the reviews), and you have an email connection that is lightweight and uses minimal battery life.

For what it’s worth, I also have an Exchange account for work that syncs mail, contacts, calendars and reminders — also on the hourly fetch schedule.

Wait, won’t there be a big delay for receiving emails this way? No, not really. The fact is that whenever you open an email inbox in the Mail app, your iPhone instantly re-checks the account for new mail anyway. The Fetch setting only limits the background checking that the phone does when you’re not looking, so setting it to hourly just means the red “new email” number on the Mail icon won’t update itself more than once an hour3. You can always get an up-to-the-minute check by just opening the Mail app.


  1. No one seems to be sure why, however. The most extensive troubleshooting that has been made public seems to leave a lot of unanswered questions. 

  2. I based this off of this thread at Apple support — they seem to work even though they were posted as a solution to a similar problem that was before iOS 5. 

  3. Seriously, how often do you really need to check your email? More than once an hour and I’d say you have serious productivity issues. 

Monday, April 23, 2012

How to Easily Use OpenType Fonts in LaTeX

I became interested in LaTeX out of a desire to be able to produce high-quality PDFs for self-published books. Someday I hope to be able to produce books of comparable quality to these humanities books typeset in TeX. This idea became even more feasible when I discovered the text content could be written in Markdown and converted to LaTeX with pandoc (More information in this article).

Typographically, the example books I linked to above are more the exception than the rule: the vast majority of LaTeX documents use the same boring default font, Computer Modern, that was originally packaged with the software in the 1980s. Using Computer Modern in a self-published book would be almost as bad as using Times New Roman or Arial.

If you try to figure out whether and how you might be able to use your computer’s normal fonts with LaTeX, you will soon come across a lot of extremely complicated and incomplete documentation about how to convert TrueType or OpenType fonts into a format LaTeX can use.

The happy truth is that these instructions are now obsolete: you now have easy access to OpenType fonts on Windows and Mac platforms, thanks to a new version of LaTeX called XeTeX. XeTeX includes a package called fontspec that gives full access to all system fonts, as well as advanced features for OpenType fonts, such as ligatures and small caps. XeTeX is available for Mac, but what most people don’t say is that this font-accessing goodness can also be used on Windows since XeTeX is included with Windows distributions such as TeX Live and MikTeX.

That being understood, here’s how to use your system fonts in your TeX documents (source):

  1. Use the xelatex command in place of pdflatex
  2. Add \usepackage{xltxtra} at the beginning of your preamble (some XeTeX goodies, in particular it also loads fontspec, which is needed for font selection).
  3. Add \setmainfont{Name of OTF font} in the preamble.
  4. No step 4.

Note: If you are using the aforementioned pandoc to generate your TeX documents, you do not need to do step 2 — pandoc already includes the fontspec package in its default template. Also, you can set the main font by adding the option --variable=mainfont:"font name" when calling the pandoc command.

Thursday, April 19, 2012

Publish multiple Markdown files to HTML in Windows

I wrote this script as a means of setting up a dead-simple “knowledge base” in HTML format.

The idea is to write documentation as a collection of plain-text files in Markdown format and have a no-fuss way to publish them as HTML, re-publishing changes as necessary.

In order for this script to work, you need to be on Windows, and you need to install a program called pandoc.

How to use it:

  1. Save a copy of this script file in any folder containing a bunch of Markdown-formatted text files. Include a stylesheet.css file in this folder as well if you want the HTML files to have CSS styling.
  2. Run the script (double-click it) — it will silently create updated HTML files for every text file in the folder. Only text files whose HTML counterparts are out of date or nonexistent will be processed.

You can either copy and paste the code below into Notepad and save it as a .vbs file, or you can download the latest version in a zip file. The code in the download will be more extensively commented, and may also contain enhancements developed since this post was written.

Here’s the basic code (provided under the terms of the Artistic License 2.0 — http://www.perlfoundation.org/artistic_license_2_0):

Set objShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")

strThisFolder = objFSO.GetParentFolderName(Wscript.ScriptFullName)
Set objStartFolder = objFSO.GetFolder(strThisFolder)
strConverterCommand = "pandoc -f markdown -t html -c stylesheet.css -o "

Set objFilesToUpdate = CreateObject("Scripting.Dictionary")

Set colFiles = objStartFolder.Files
For Each objFile in colFiles
    If objFSO.GetExtensionName(objFile.Name) = "txt" Then

        ' Check if HTML version of this text file exists in this folder
        strHTMLName = strThisFolder & "\" & Replace(objFile.Name, ".txt", ".html")
        If objFSO.FileExists(strHTMLName) Then

            ' If it exists, compare the timestamps
            Set objHTMLFile = objFSO.GetFile(strHTMLName)
            If objFile.DateLastModified > objHTMLFile.DateLastModified Then
                'If the text file is newer, add this text file to the list
                objFilesToUpdate.Add objFile.Name, strHTMLName
            End if

        Else
            ' If the file does not exist yet, add this text file to the list
            objFilesToUpdate.Add objFile.Name, strHTMLName
        End if
    End if
Next

' Update all the text files in the list.
colFilesToUpdate = objFilesToUpdate.Keys
For Each strSourceFile in colFilesToUpdate

    objShell.Run strConverterCommand & objFilesToUpdate.Item(strSourceFile) & " " & strSourceFile, 3, True
Next

Possible Future Improvements:

  • The script isn’t very helpful about telling you how long the process is going to take. I looked at several options for providing a progress bar or some kind of status output, but ultimately VBScript is just really sucky at this.
  • Pandoc is a very powerful converter. One could easily tweak the script to add options for producing LaTeX or even PDF files.