Friday, December 8, 2023

Rooombaaaaaaa!

One side effect of getting older is that you have fewer epiphanies. 

I'm sure I'm like a lot of people when it comes to personal writing. I jot ideas down, maybe start a story or a diary or something like that, and then I stumble across whatever I started a decade later and feel like some time-traveling version of myself wrote me a letter. It used to be sort of fun to see how my thinking had evolved, but now that I'm older, the only thing that surprises me is that I could have written some of this stuff a week ago and felt the same way.

The post below was something I apparently nearly-finished in August of 2017. I've annotated it because, well, why not?



When it comes to adopting new technologies, I'm almost always a laggard. I didn't get my first computer until sometime in 1997, and I only recently got a smartphone. I think I do a pretty good job getting the most out of these things once I own them, but I'm almost always the last of my friends to buy Thing X because I'm cheap and I'm immune to shownership. Only a few innovations have really made me happy. [2023 me: this is all still true].


3. Nook... stuff. Yes, the original Nook reader aged badly, but it got me back into catching up on the news while riding the train, helped my kid learn to read, and enabled me to finally finish Ulysses, among many self-improvement goals. I would be surprised if the Nook readers and apps were able to stay viable among all the Kindle tablets and apps. Until the Kindle comes with better interactive books or Anna learns to read, though, I'm remaining a Nook loyalist. [Kindle's product line is far superior now, and Anna knows how to read. I'm *still* a Nook adherent, though, although I usually just read books on my phone unless I'm reading in the sun].

2. Tablets. When these things started to pop up, I didn't get the appeal. They seemed to do less than a laptop, and were less convenient than a smartphone. The only reason I bought my first was because the prices were so low for a Nook tablet. My opinion after owning one has changed 180 degrees, though. My Samsung Tab S8.4 has been the perfect mix of convenience and functionality. I work on it on the train, watch movies on it in bed, teach my kid to write and do math with it, and just about everything else. I should just ditch my TV and the rest of the video stuff. Double thumbs up to being able to connect my Samsung S to the TV with an HDMI cable. [I'm still a fan of tablets, although the fact that I can jot nicer handwritten notes on my Samsung Galaxy Note than any tablet has dampened my enthusiasm somewhat. Funny side note: my Tab S8.4 blew off the top of my car a few years ago while I was driving to the train station. I knew exactly what happened while it was happening, but still couldn't find the thing! Some bum probably stumbled across it after buying a few nips at the liquor store and is probably using it to watch Home Alone right now].

1. The Roomba 880.
I remember telling my friends that I was strongly considering buying one of these things. The consensus response was that I was going to waste my money, that these things are expensive and don't pick up anything. I have asthma and dust allergies, though, and my wife and I vacuumed the house maybe twice a year. In fact, I've been fined by multiple landlords for being negligent about the carpets. I came to terms with the reality that I was just not a vacuumer and that I needed a better way, so when Consumer Reports issued a glowing summary about the Roomba 880, I put it on my wish list.

The thing has exceeded my wildest expectations. It's surprisingly heavy for a thing that's the size of a large pizza, and it takes a ***long*** time to complete a room. But when it's done, all I can think is "wow!" Our carpets have seriously never looked better. It is not for people with low self-esteem: the 880 has some sort of way of detecting that it is vacuuming a particularly dirty section of your floor, and then it loops over that section again and again and again until it's clean. If your floors are really dirty, it'll just keep vacuuming until it can't hold any more dust or dirt. This is embarrassing: you'll keep emptying the storage bin and recharging the thing until you reach a "#@!% it" point where you realize that cleaning your neglected carpets is a marathon, not a race. After three or four months of running it in the master bedroom, it still can't finish the room without becoming engorged beyond capacity.

And I'd be lying if I didn't say that I loved the noises it makes. In a fit of inspiration, the Roomba engineers designed it to emit Atari 2600-esque sound effects when it starts (a beep-beep-beep 'lets get started!') and when it finishes (a heroic 'we did it!' ditty). More than a few times, I've just sat with my kids on the bed watching the Roomba do its magic. It's like watching tulips emerge after a long winter.

iRobot recently came out with the 980. I'm not shelling out the big bucks for another one of these things until it shampoos or steams the carpet, but I'd be lying if I said I wasn't curious.

[Six  years later, I still love the Roomba, but it toils in less glorious environs. Cristin and I now support the immigrant economy by having cleaners decide if the main sections of our house are worthy of inhabitants. The Roomba's not yet retired: COVID forced me to relocate my office to the basement, and 880 keeps me company. Like King Kong Bundy working the indy circuit after his glory days in the WWF, the Roomba continues its diligent work in relative obscurity, earning its keep by vacuuming cobwebs, dead spiders, and the occasional carcass of a mouse. There's a more interesting blog post about how I feel about the whole housekeeping thing. For this posting, it's enough to say that if I were to start a new posting about about my favorite innovations today, I'm ashamed to say that I'd probably still put the Nook, tablets, and the Roomba at the top of my list.]

 

The Roomba 880 vacuumed up after this match.

 

 

Monday, November 15, 2021

Importing your EndNote Library into Zotero with PubMed IDs

I'm neurotic about integrating PubMed IDs (PMIDs) into my reference manager. They're required for NIH grants, Harvard Medical School CVs, and many journal submissions. And I'm disciplined about getting most of my references from PubMed. Exporting from PubMed ensures that my EndNote references include doi's, PMCIDs, and PMIDs. The last item is stored as an "Accession Number." I also attach pdfs of articles to each reference. I'm a huge fan of EndNote, despite the unappealing layout of X20.

Recently, I was forced to embrace Zotero. This article is not meant to be a comparison of reference management software, but I'll say it has some nice aspects that are lacking in EndNote, including (a) a price tag of zero, if you don't need much online storage, and (b) integration with Google docs (Zotero also has some major disadvantages). Fortunately, a person can transfer most of an EndNote library, including pdfs, into Zotero pretty easily...

I say "most" rather than "all" because Zotero doesn't systematically import PMIDs. It's a **huge** turnoff for someone like me because I've spent years curating my EndNote library, and I don't care to do this again from scratch. I experimented with exporting from EndNote as .ris rather than .xml files and playing with plug-ins that would auto-populate PMIDs as long as you had an article's doi. The latter works, but you have to run the plug-in one reference at a time.

I finally just toyed with the javascripts, and got the batch export/import to work exactly as I hoped, storing PMCIDs and PMIDs in the Extras field. This format is essential if you want to use the "National Library of Medicine (grant proposals with PMCID/PMID)" style. If you're a mediocre programmer like me, using EndNote on a Windows machine, and looking to transition to Zotero, you're likely to find the instructions below helpful! I'm sure I'm not the only one who struggled with this process!


Step 1. Enable your system to edit and save javascripts as javascripts

If your system is like mine, it'll save any modifications you make to a javascript file (.js) as a text file (.txt). An easy workaround is to make extensions visible and to sure your edited filename ends in ".js" rather than ".txt". Here's how to do this in Windows 10:

Step 1a: Go to the File Explorer Developer Settings (e.g., click on the Windows key, type "File Explorer," and click on "File Explorer Developer Settings")

 

Step 1b: Show settings for "Change settings to show file extensions"

 

Step 1c: Uncheck "Hide extensions for known file types"

 

Step 1d. Click OK


2. Modify the "translators" javascript for "Endnote XML.js" to import PMIDs

Step 2a. Find the file in your Zotero folder.

In Windows, the translator scripts are typically stored in "C:\Users\[your user name]\Zotero\translators." Find "Endnote XML.JS"

 

Step 2b. Copy and save the original file somewhere safe

I don't know what happens if you botch the editing of this file, but it's probably bad. Save yourself some agony and copy and paste the original version somewhere safe in case you screw something up. That way, you can copy and paste the original version back into the "translators" folder.

Step 2c. Open the file in an editor of your choice

I suggest just right-clicking on the file and opening with Notepad.

Step 2d. In the version saved in "translators," edit the importNext function to translate PMIDs

Simply copy and paste the blue text below into the function somewhere. I included a screenshot of where I stuck the code.

} else if (field == "accession-num") {
                    newItem.extra = (newItem.extra || '')
                        + `PMID: ${node.textContent}\n`;

 

Step 2e. Save the file, and make sure it has a ".js" file extension

My computer annoyingly turned any edited file into a ".txt" file. If you've made file extensions visible, you can simply change the ".txt" to ".js" with File Explorer.


3. Export your citations from EndNote into your Endnote.Data folder

In your EndNote library, highlight the references you want to export into Zotero. Then click File->Export and export into an .xml file using the "EndNote Export" output style. **If you want the associated attachments to export with the reference, be sure to save the .xml file in the .Data folder associated with the EndNote library. See the attached screenshot below, which I named "P" simply because I was exporting references whether the first author's name began with the letter 'p.'

 

 

4. Import the .xml file into Zotero

This step is simple: File -> Import. You'll probably only have one option to use (i.e., "A file (BibTex..."). Select the .xml file you created. I copy the files to the Zotero storage folder to simplify the syncing process, although this can take up a tremendous amount of storage on your drive. Whether to "Place imported collections and items into new collection," doesn't matter much.

 

 

Voila! You're good to go! If everything worked right, your imported references that have pdfs, PMCIDs, and PMICs should look in Zotero like the screenshot below.


 

 

Leave comments if you have any additional suggestions or questions. Also, note that these instructions may become moot when Zotero 5.1 goes live as PMID and PMCID fields will standard fields in the newer version.