1. Extracting text highlighted with Acrobat Pro

    2009-02-05

    As mentioned here and here, I typically do my reading and note-taking-on of academic papers in Acrobat Pro these days. I then typically record my comments in a FreeMind mind map. Until today I’d been creating a content summary in Acrobat, highlighting, and then dragging and dropping each comment individually into the mind map.

    Today, while doing this, I noticed that there’s an “Export comments to Data File” option in the Comments menu. “Hmm,” I thought, “I wonder how easy it would be to read this data file?” It turns out that it’s just some ASCII text with a bunch of (to me) useless information, and the highlighted comments in parseable “Contents([highlighted text here])” containers.

    I wrote a quick and dirty Perl script that pulls the comments into a text file. I can then just copy and paste that file into FreeMind, and it creates all of the leaves for me. This will save me hours carpal-tunnel-syndrome-inducing mousing and frustration. The perl script, for your perusal (improvements welcome) is available here: extract_comments.pl.

    Kindly Let me know if you get any use out of this, and if you find any parsing bugs. It’s in the public domain.

  2. LaTeX Word Count

    2008-11-17

    I’m working on my graduate thesis in the LaTeX document mark-up format, and trying to apply Anthony Burgess’ Martini Method. Basically, set a certain desired word count and let yourself relax after you’ve achieved that word count every day. I started off pretty well with this method, but the next day my wife Amanda went into labor, and my productivity has basically been a train wreck ever since.

    I’m getting back on the horse.

    Anyway, it’s a little tricky to apply the Martini Method when using LaTeX — as a markup language a bit like HTML, it’s full of special words, symbols, characters and whatnot that are not actually part of what you’re writing. A simple Emacs word count will not do the trick. Much as I’d love to count all of those extra words, the point here is to produce a certain volume of output and that would miss the point. Plus, it’s dishonest. There exists a PERL script that will parse LaTeX and count the non-special words. However, someone’s gone even a step further and made a nice web interface for it, with color coding and everything. That interface is here, apparently hosted by one Einar Andreas Rødland in Norway.

    So far, it’s working quite well for me. Unfortunately, it just informed me that I’m not quite to my desired word count yet. More writing!

  3. Oh How I Love Coffee

    2008-05-06

    Coffee, or Caffeine in general… ah… we’ve had a tumultuous relationship. I remember my first real taste of coffee — blended with hot cocoa on a cold Boy Scout camp-out during a Michigan winter. Then there were the several times I mistakenly thought Mountain Dew would make a good breakfast in high school. (That’s a negative, by the way. It invariably resulted in a stomach ache.)

    In college, especially freshman and sophomore years, I tested the limits of both sleep deprivation and coffee consumption. It was possible to get a 20 oz cup of coffee at the cafeteria for something like $1.25, and one refill was free on the same day with the original receipt. There were days when I had 40 or 60 oz of cheap, cafeteria coffee with chicory. Something magic happened when I had consumed that much caffeine — I wrote code for my computer science classes that worked flawlessly, yet it took me hours to comprehend what I had written the next day. The mechanism underlying this increased ability seemed to be a greater “stack depth”, meaning that I could keep more things in short-term memory simultaneously. This allowed me to reliably track a greater number of programming constructs at once, requiring less checking-back of variable names and so forth.

    I quit that level of consumption, cold turkey. I wasn’t doing it all of the time, and fortunately my withdrawal symptoms were limited to minor headaches and tiredness. After quitting I felt much better. The body can only take that kind of abuse for so long. I eventually went back. I love coffee, and decaf just isn’t the same. However, I’ve never reached that level of consumption again. Subsequent periods of abstinence have not yielded the same improvement in quality of life as that first time quitting, probably because I haven’t reached a level of use/abuse that negatively impacted how I felt.

    Generally, I limit myself to two to three servings a day. That level has been found to be harmless, and maybe even beneficial. However, I have just over a week left in Baltimore before I go to New Orleans for Amanda’s graduation from medical school (w00t!), and I have an awful lot to do. I’m giving myself free license to however much coffee and caffeine I want, and my productivity has been skyrocketing.

    I recognize that this level of consumption is not sustainable, and that if I keep it up, I’ll surely pay for it. But wow, does it ever feel awesome for now. If I experience any dramatic shifts in mental or physical state as a result of my use, I’ll tone it down a bit. But for now, I’m just enjoying it and getting a lot done.

    This post brought to you by five cups of coffee.

  4. My GTD Set-Up Page

    2008-05-05

    I’ve added a page to this site describing my GTD set-up, in case anyone might find something useful there. You may find it using the “GTD” link in the menu, or by clicking here.

  5. Your Emails — They are not secure

    2008-04-22

    In other news from the house-hunting front, we’ve been working with lenders to finance the purchase of a house. Lenders want a lot of information. They want bank statements, driver’s license copies, landlord information, tax returns, income statements, current address, credit card statements, letters of employment and so on. Of course, they also want that ubiquitous, unchangeable, universal secret password, the social security number.

    You would think, given the nature of this collection of information, and the rising prevalence and cost of identity theft, that these people would be careful with this information. If you’re cynical or just a realist, maybe you wouldn’t think that. Anyway, you’d be wrong. One of the first lenders we dealt with EMAILED A COMPLETE, FILLED COPY of the application form to us for signatures. No encryption, whatsoever. It was like an identity theft starter kit. After we confronted them about it, they said they had no idea this was insecure, and offered to fax or FedEx the documents instead.

    If you don’t already know this, you really need to know: Email, without any special add-ons, is the opposite of secret. It is the digital equivalent of a postcard — anyone along the way can read it, and you have no idea who will be along the way. Would you tape your social security card to the back of a postcard and send it across the country? Furthermore, there’s no guarantee that an email’s “From:” address is accurate, as you may have deduced from spam email that you’ve received. All it takes to forge it is changing a string of text when putting the message together.

    There are ways to use email to send secure, confidential communications. Probably the most universal and robust way is with PGP or (preferably) GPG. The main reason these solutions aren’t used more widely is that encrypted communication is difficult to do correctly. Keys have to be generated, passwords selected, keys exchanged and signed, managed, and sometimes even revoked. A number of pieces have to fit together, including the encryption engine, mail program plug-ins, and file encryption software. The difficulty of using proper encryption is not, however, an excuse for sending my SSN in plain text via E-mail. When used with good enough ciphers, email can be safe even from the prying eyes of the US Government, who would have to spend hundreds or thousands of years of computer time attempting to crack your key. Furthermore, with or without encrypting the message, cryptographic signatures may be used to verify that the purported sender of the message is in fact the true sender of the message. This eliminates the problem of From address forgery.

    Should you wish to send encrypted e-mail my way, you may find my public key here.