Archive for the ‘ordinary’ Category

This is apparently becoming a series on making various parts of my reference-managing toolchain play nicely together.  One of the great features of Mendeley is that it can automatically sync up your library with a BibTeX file.  One of the annoying things about Mendeley is that you can’t control what fields it puts in that file.  Why is this annoying?  Because apacite overloads the @article entry type to cover both journal articles and newspaper/magazine articles.  These have different APA citation formats, though: one should include the month of publication, while the other shouldn’t.  The only way to control which format is produced is to include or omit the month in the BibTeX entry.

At this point you might be wondering why I haven’t just switched to something a little more sensible for doing APA citations in LaTeX.  I probably will.  But in the mean time, here’s the solution I’ve cobbled together: monitor the library.bib file that Mendeley exports for changes, and then remove all the month lines.  The monitoring can be accomplished very easily on Mac OS X using launchd, and the removing is done with a shell script: 


Latexdiff is a script that produces a word-by-word diff of two versions of a latex file that can be compiled to mark up additions and deletions.  It generally works well for me except for one important caveat: it doesn’t recognize the citation command syntax from apacite, the package I use to get APA-style citations.  Luckily, being open-source, I could just fork the repository and fix it.

Latexdiff uses a latex-aware difference algorithm that treats latex commands as single “words”. The problem is that apacite allows citations of the form

\cite<text before citation>{AuthorYear}

Normally, a \cite command is only followed by arguments in […] or {…}. Latexdiff sees the < and thinks that the command is over and it can safely split things.  But this results in the \cite command being separated from its arguments in the diff which then refuses to compile.

The fix is easy and should be incorporated into the next version that’s released. But in the meantime, if you’re suffering as I was you can clone my fix:

git clone
cd latexdiff
git checkout anglebracket-cite-command
ln -s latexdiff /usr/local/bin/latexdiff   # or wherever you like

At long last, here is a reasonably complete demo version of the online experiment paradigm I’ve been using.

HLP/Jaeger lab blog

I’ve developed some JavaScript code that somewhat simplifies running experiments online (over, e.g., Amazon’s Mechanical Turk). There’s a working demo, and you can download or fork the source code to tinker with yourself. The code for the core functionality which controls stimulus display, response collection, etc. is also available in its own repository if you just want to build around that.

If you notice a bug, or have a feature request, open an issue on the issue tracker (preferred), or comment here with questions and ideas. And, of course, if you want to contribute, please go ahead and submit a pull request. Everything’s written in HTML, CSS, and JavaScript (+JQuery) and aims to be as extensible as possible. Happy hacking!

If you find this code useful for your purposes, please refer others to this page. If you’d like to cite something to acknowledge this code or your…

View original post 96 more words

Dork out

my ride, freshly dorkified in anticipation of winter by Dave Kleinschmidt

It’s funny how a set of fenders, a tool bag, a couple of lights, and a water bottle can take a bike from almost-cool to completely dorky.

Look out for updates on living in Rochester, grad school, etc. in the near future. Or just read my tweets.

(Link: photo from flickr)

Blue Bike and Rain

A couple of firsts today: the first real, rainy test of my fenders reveals that they do indeed keep the water off of you, as advertised.  They do not, however, appear to magically ward off flats, resulting in my first flat as a Bicycle Commuter.  The aforementioned tire event occurred in the middle of the fucking woods, but at least now I live in a place with public transportation, unlike that time in Indiana with the big rusty nail.

Things worked out okay in the end.  I made home in no time, thanks to the apathy of the West Hyattsville Metro station employees who, mercifully, didn’t say anything as I slunk through the turnstiles a full hour into the evening rush hour bike-free block.  City Bikes, where I went to get a tube and fix my flat (having forgotten my pump at home), was playing an all-The Mountain Goats playlist, and to my immense delight I discovered that there is a Safeway right across the street.

There I purchased the makings of mac ‘n cheese, which I am now eating (yes,right now) accompanied by delicious, delicious Dogfish Head Chicory Stout, which cost fully four dollars less than I anticipated at D’vines. So, all in all, not a bad end to the day.

I think that now, dear reader, you may have some idea of how thoroughly domestic my life has become. I apologize for once again dropping off the face of the blogo-earth, but I suspect that there is a limit to how many times one can be entertained by descriptions of someone else’s bikes, food, and beer du jour. Alas for you, these (along with Important People In My Life and some Big Things that I’m not quite ready to blather on about in so public a forum) are the things that occupy me lately, so that’s what you’re going to get, at least until I man up and talk about science or grad school or stuff.


(Link to photo, by The Gelman Library on flickr)

Me and my blinky

BlinkyYesterday I bought a PlanetBike rear blinky-light. I bought it on a whim—a sort of “huh the sun sure is setting early” whim—and didn’t really do any research beforehand, so I don’t have much of a basis for comparing this particular blinky with other assuredly excellent blinkies.

But. This thing is really friggin bright, and I completely love it. More on the blinky, and Bikestation DC…


Two notable things happened today. The first is that I finally ordered an electric kettle on Amazon, so that very soon I will be able to make truly ridiculous quantities of coffee with my lovely 8-cup french press and burr grinder combo. Since my current water heating solution is a tiny, ancient microwave that boils a cup of water in a blazing six minutes, the gigantic french press has been sadly underutilized.

The second is that I stole the Ark’s truing stand and am now in the process of truing my wheels, which I laced last weekend. They are the most beautiful things I have ever seen (except you, Ruth). This is very, very exciting, and hopefully the big fixie project will get wrapped up soon. Hopefully. I’ve got a nice series of photos of the whole process that I’ll put up sometime soon when I can justify procrastinating some more.