## Wednesday, December 15, 2010

### on carbon footprints and biased judgments

I recently bought a new SUV.  I was in the market for a new car, and really liked the styling of the Toyota FJ Cruiser, not to mention its utility for carrying all the various stuff that I need to carry.  When I announced my purchase on Facebook, it occasioned a number of humorous jabs from my friends, which I was sure that I deserved; after all, I had just bought a monstrous gas-guzzler (17 MPG in town, 21 on the highway)!

These comments also inspired me to think more about how we judge the impact of our choices on the environment. Everyone knows that driving a fuel-efficient, low-emission vehicle is better for the environment than a gas-guzzler, because this issue is prominent in the news as well as car advertisements.  However, a large body of psychological research has shown that our judgments about things like this are often biased.  Rather than basing our judgments on statistics (as we should if we want them to be accurate), we often use rules of thumb, or "heuristics" as they are known in psychology.  For example, when asked to judge how common something is, we often base our judgments on how readily an example of it comes to mind.  This "availability heuristic" is the reason why people's judgments about the prevalence of crime often don't match crime statistics; even when crime is going down, news reports of criminal acts easily come to mind and bias us to think that crime is actually increasing.

When it comes to the impacts of our behavior on the environment, the recent popularity of hybrid cars has made the environmental consequences of driving highly available in our mind, and thus we think of driving as a major component of our carbon footprint.  However, some analysis using the various carbon footprint calculators on the web shows that we may be overestimating the relative benefit of buying a fuel-efficient car in comparison to other lifestyle choices that we make.

According to the carbonfootprint.com calculator, my FJ Cruiser will produce about 3.25 tons of CO2 over a year of driving my average of 6000 miles. If I had purchased a Toyota Prius, I would produce 1.17 tons over the same year, a savings a just over 2 tons of CO2.

That sounds like a big reduction in CO2 emissions, but how does it compare to some other choices that we might make?  A round trip flight from LAX to JFK produces 2.41 tons of CO2 per passenger when the effects of water vapor are taken into account.  Thus, a single airline flight obliterates the benefits of driving a hybrid for a year.  Another choice that has a big environmental impact is eating meat.  According to the Nature Conservancy's calculator, eliminating meat from one's diet reduces one's yearly carbon footprint by 3.2 tons; again, more effective than buying a hybrid.

The choice that has the largest environmental impact by far is having children.  According to a study published last year, the lifetime carbon footprint of an American child is estimated to be more than 9,000 tons of CO2.  Thus, the environmental impact of having just one child in the United States is equivalent to 1,450 people each driving a Cadillac Escalade 10,000 miles over one year.  Another way to look at it is that the yearly CO2 savings due to all of the hybrid vehicles sold in the US in 2009 (290,272 according to HybridCars.com) is enough to offset the lifetime carbon impact of about 64 American children.

How can we improve our ability to make accurate judgments in situations like this?  First we need to be aware of our biases, but this is difficult: Research by Emily Pronin from Princeton University has shown that humans often have a "blind spot" regarding their own biases. Research subjects in one of her studies (who were randomly chosen passengers at the San Francisco airport) rated themselves as substantially less biased than the "average passenger."  Once we realize that we are all biased, we can start to try to overcome those biases.  One way to overcome biases is to slow down; when we take the time to take in more evidence regarding a judgment or decision, we are more likely to rely upon information that is less biased than the "gut feeling" that our heuristics provide for us.

## Sunday, November 21, 2010

### My personal computing history

My generation may be the last to ever have known a world without ubiquitous computing.  It’s now almost impossible to imagine a computer being a thing that sits in the corner at the school library and gets used only by a few geeky kids, but in my high school that’s exactly what it was.  I’ve recently been trying to reconstruct the history of different computers that I played with and owned back in those days; here is my first pass at a personal computing history, helped in large part by the awesome amount of computer history information that’s available online.

My first exposure to computers came during 1981-1983 when I was in high school, though several different paths (the order of which is slightly hazy me at this point).

The first system that I remember programming on was the TI 99/4A, which was a “home computer” released in 1981 (we probably got it around 1982-1983).  It came with relatively little software, but I do remember playing a number of games including “TI Invaders” which was their clone of the Space Invaders game.  The programs were released on cartridges, more like a video game system than a personal computer.  The machine came installed with “TI BASIC” which was a pretty rudimentary version of BASIC.  We didn’t have a hard drive, but it was possible to save programs to cassette tape.  I don’t remember much about what kind of programming I did on this system, though I’m pretty sure it was all text-based.

Around the same time, my father purchased a computer for his accounting office, back when this was just becoming common.  It was a Northstar Advantage, which was resold with a GBC logo.  This machine was released in 1982, right after the release of the first IBM PC.  It ran an operating system called CP/M, which was similar to but predated Microsoft’s DOS. The apps that I remember using included WordStar (word processing) and dBASE (a database program). I don’t think I actually programmed on this system, but it was my first experience with command line interfaces (PIP, anyone?).

 Apple IIe

In our high school there was an Apple IIe in the library that was almost always free.  I was ostensibly on the tennis team when I was a senior in high school, but given that I wasn’t very good at tennis, the coach was happy to let me go to the library and play with the computer instead.  This system had a great advantage over the TI at home, which was that I could save programs to 5 ¼” floppy disk.  This is the first machine that I remember doing any graphics programming on, though I’m sure that it was incredibly rudimentary.

In the summers of 1984 and 1985, I worked at a local bank helping them to automate some of their records.  The bank had just recently purchased a new IBM PC/AT which was the second generation of IBM PC’s.  It had such amazing features as 16 MB of RAM and a 20 MB hard drive.  I primarily used Lotus 1-2-3 (an early spreadsheet program).  However, in the moments between real work, I would also take advantage of the machine’s modem to dial into a number of BBS sites.  It’s hard for me to remember exactly what I found on these sites or how I even found out about them, but it was basically like a very earlier version of the web that one could call into for free.  I think I mostly used them to download software.

 Macintosh SE/30

During most of my college career I did not have my own computer; very few students did. If we needed one, we would go to the computer lab on campus, which is where I was introduced to Macintosh (Plus or SE) computers.  In my senior year of college the Mac SE/30 was released, and my parents were nice enough to plop down several thousand dollars to buy me one before I headed off to graduate school, along with an ImageWriter II dot-matrix printer.  This machine was my workhorse throughout graduate school.  I addition to writing papers, I was my platform for learning other languages including PASCAL and C.  It was the system on which I wrote my first simulations, which would be published here (though the actual simulations for that paper were run on a Sun UNIX system at the Beckman Institute because it was so much faster than my SE/30).

 PowerTower Pro

When I arrived at Stanford for my postdoc in 1995, it was definitely time to upgrade.  I was lucky enough to be in the market during the short period in which Mac clones were available, and I bought a Power Computing Power Tower Pro, which was one of my favorite computers ever.  It was this machine on which I first started playing serious with Linux (using mkLinux IIRC). The PowerTower Pro is the last machine that I’ve owned that I think could be legitimately called “historical”, so that’s where my story ends for now.

## Saturday, November 13, 2010

It’s a reality that if you want to make it in academic science, you have to be ready and willing to travel a good bit.  Between conferences, talks at other universities, grant review panels, and other various events in the US and abroad, I generally end up flying between 50,000 and 100,000 miles a year.  Students and postdocs often ask me how I can stand to travel so much, and this post will lay out some of the strategies that I use keep myself sane while on the road.  I should note up front that many of these strategies are not exactly “budget travel” ; my feeling is that I travel enough that it’s worth investing in some things that make it pleasant, but I realize that this may conflict with the realities of student or postdoc salaries.

Pick an airline and stick with it

I think that airline loyalty is probably the most important thing one can do to make traveling more pleasant.  Most airlines have loyalty programs for people who travel at least 25,000 miles (that’s about 5 rounds trips from LA to DC, for example), and achieving this level of frequent flyer “status” comes with some very nice benefits.  Foremost is access to priority check-in and priority security lines.  The benefit of priority security varies between airports, but in many places (like the United terminals at LAX or O’Hare) it can save a very long wait to get through security during busy times.  As your status increases, so do the benefits; in particular, once you reach “gold” status (50,000 miles on most airlines) then you become much more likely to get upgraded to first class, which is always a nice perk.  Some airlines (like United) give preferred seating (with extra legroom) to frequent flyers, which makes using your laptop much more bearable.  Another benefit is that you have priority for rebooking when problems occur.  Finally, another benefit of loyalty is that it gives you a chance to learn the airline’s terminals and systems, which can be really useful when you are running late or things go wrong.

I was a frequent flyer with United for many years, but recently switched to Continental after moving to Austin – I’ve been quite happy with both overall, and fortunately with their merger these are becoming one airline.

When another institution invites you to come and give a talk, it’s perfectly legitimate to tell them what airline you want to fly on (and even what flights you want to take), and give them your frequent flyer number.  This has the nice side benefit that your itinerary will show up on the airline’s online system, so you can see schedule changes and check in online.

Be sure to sign up for text alerts from your airline, which will let you know about delays or upgrades.  Also, when problems arise, it’s often better to call the airline directly rather than waiting in line to speak to a customer service representative when the lines are long.

Join the club

If you’ve spent any time in airports you have probably wondered what goes on inside the “Red Carpet Club” or other airline lounges.  The short story is that it’s a place where you can pay to get away from the craziness of the terminal, and if you are going to fly regularly it is money well spent.  It’s not cheap (generally about $400/year) but if you are flying 20 round trips in a year then that’s just$10 for each one-way trip – well worth the price IMHO.  Perks include free wi-fi, snacks, and drinks (usually just beer) – unless you are in a European airport, where it generally includes a full spread of food and a full bar (though not always free wi-fi).   But perhaps the most important benefit of the club is that there are customer service representatives that can help with flight problems – this is especially useful when large disruptions occur due to weather, resulting in long lines at the customer service desks out in the terminal.

Keep calm and carry on

NEVER check a bag unless you absolutely have to. It is certainly possible to travel for weeks with just a carry-on bag, if you pack carefully and take advantage of hotel laundry services while on the road.
I have two bags that I use for most of my trips.  My primary bag for trips longer than 2 days is a 21” expanadable carry on.  I find that I can generally make it up to 4-5 days with this bag in its carry-on (un-expanded) configuration, depending on the season and what kinds of clothing I have to carry.
For 1-2 day trips I use a small carry-all.

Learning to pack can help you really maximize your carry-on space - for example, see (Packing Tips from Professional Travelers) - I particularly find that rolling my clothes helps to maximize packing density.

Once you can afford it, buy some good luggage.  I use Briggs & Riley, which is not cheap but has a lifetime warranty and has very good usability in general.  Nothing sucks more than luggage failure in the middle of a trip.

I also carry a TSA-approved laptop bag; having to remove your laptop is a pretty small thing, but every little bit counts when it comes to getting through security without stress.

Stay prepared

I don’t want to have to scramble the morning of my flight to find all of the toiletries that you need to take with me, so I have a separate set of toiletries that I keep ready just for travel.  I use either 2 ounce Nalgene bottles or recycled pill bottles to hold most of my toiletries, so that I can fit everything into the TSA-approved quart bag.

Some things I always bring:
• extra ziploc bags
• earplugs (for the plane and/or the hotel)
• noise-cancelling headphones (I use the Sennheiser travel headphones which are are small and light)
• an energy bar (in case I miss the chance to eat between long flights)
• my yoga mat (to keep me flexible after too much sitting - I have a very thin and light mat that's easy to pack)
• for international travel: Ambien (for sleeping on the plane and overcoming jet lag)

## Wednesday, November 10, 2010

### My Productivity Toolbox

Today I’m going to say a bit about some of the tools and strategies that I use for productivity.  I’ve been a fan of GTD since Jen introduced me to David Allen’s book several years ago, though I use a fairly lightweight version of it.  When an email comes, I try to process it as quickly as possible, either responding to it or putting it into my to-do list (more on that below).  Although I don’t always live up to it (especially when I’m traveling), I am a strong proponent of the Inbox Zero philosophy.  When I see people who have thousands of emails in their inbox it makes me cringe (and it usually correlates with an inability to get things done on schedule!).

Platform:  My desktop platform is the 15” MacBook Pro, which I carry between home and my two offices (where I have external monitors and extra power adapters).  It generally has enough juice to do anything I need, and it’s nice to have everything in one place.  I previously kept a desktop machine at work and laptop for the road, but I find it more straightforward to keep everything on a single machine.

Calendar: I use the mac calendar app +  mobile me, which keeps everything synchronized across my computers, iPhone, and iPad.  It’s well worth the yearly fee in my opinion; there are probably ways that one could achieve similar synchronization using free means, but mobile me just works so I’m happy to pay for it.

To-do/GTD: I use OmniFocus to manage my to-do lists and tasks.  I really don’t even scratch the surface of its features, but it still works very well for me.  What I particularly like is the ability to trigger new to-do items from Mail messages, which are then directly accessible within OmniFocus (including attachments).  This makes life SO much easier for me that I can’t imagine living without it.

Mail:  I use the Mac Mail.app as my primary mail program, using IMAP to access gmail as my primary mail account; mail to all of my other addresses is forwarded to my gmail account. My main reason for using Mail.app is its nice integration with OmniFocus, as well as the ability to work offline (I like to catch up on emails in flight).

Backup: I don’t back up my machine per se.  However, all of my important documents are in a folder that is attached to a 100GB Dropbox account, which means that they are automatically synchronized across all of my machines, as well as being accessible from the web.  Again, there are probably free alternatives, but I doubt any of them can offer the really solid usability of Dropbox.  My only compaint is that if I add large numbers of files (e.g., digital photos), my machine gets fairly overloaded while they are being uploaded to the Dropbox server.

Document sharing: Here too, Dropbox is the killer app.  We have a lab dropbox that is separate from my personal dropbox, which serves as a central location for files that I can share with lab members.  We recently wrote a grant using Dropbox, with authors strewn between Texas and California, and it was amazing how well it worked.

PDF management: I have been using Papers for a while now, though I still am not as religious about it as some others, and I don’t actually use it for bibliographies (more on my writing workflow another time).  I do find its ability to obtain papers through the UT proxy server very useful when I am off campus.

Note Taking: I use Evernote for note taking. Its greatest feature for me is the seamless integration and synchronization across my Mac, iPhone, and iPad.  As with most of the other software mentioned above, I am not exactly a power user; I just use the simple features that meet my basic needs.

Another tool that I have found very handy is my Fujitsu ScanSnap desktop document scanner, which allows me to scan in a document and attach it to an email with 1 button press and two mouse clicks.  Very handy for those pesky travel reimbursement forms that always require written signatures.

## Tuesday, October 19, 2010

### statistical redistricting: how to save lots of time and money and get just about the same result

I had promised myself that I wouldn't blog about politics, but this is really more about statistics so I think it's ok.

David Sparks has posted an interesting piece about using statistical clustering to determine US Congressional districts (h/t R-Bloggers).  He uses k-means clustering, and then analyzes the "partisanship" of the resulting districts by assuming that districts with above-median population density are Democratic and those with below-median density are Republican (I'm not sure how good an assumption that is).  The result is that you get much more reasonable looking districts than the crazy ones that politicians come up with, but the partisan balance doesn't seem to change (again, under the assumption that density=party).  Here is an example of the map for Texas:

This is, of course, way too reasonable to actually be put into practice.

## Friday, October 15, 2010

### My workflow for writing papers (or, why I switched to LaTeX)

In the last few years I have changed my workflow for writing papers pretty radically.  Previously, I used Microsoft Word along with Endnote as my primary platform (on the Mac, of course). My decision to change was driven by several factors:

• I had grown tired of the klunkiness of Endnote and the lags in its integration with new versions of Microsoft Word.

• I had grown even more tired of Word's tendency to crash, or to do crazy things that could only be fixed by starting with a completely new file.

• I was just starting to work on a book, and I knew that for a large project like that, using Word would be a nightmare. In addition, my coauthors and I wanted to use a source code management system to coordinate changes to the document, and this was not really practical with Word files.

In the end, I decided to move to LaTeX as my primary platform for writing papers and books.  For those not familiar with LaTeX, you can think of it as a markup language like HTML, only for writing papers rather than web pages.  Editing a paper in LaTeX is not WYSIWYG - that is, you don't see the actual layout of the paper as you type.  Rather, you have to typeset the paper in a separate step.  For example, a very short paper might look like this in LaTeX:

\documentclass[11pt]{article}
\title{My Article Article}
\author{Russ Poldrack}
\begin{document}
\maketitle
\section{Introduction}
This is the content of the paper.
\end{document}

Why on earth, you might ask, would I want to give up WYSIWYG editing to write my papers using some obscure markup language? The main reason is that it's very flexible, both in how you use it and what it can do.  Because the files are plain text, you can edit them using any editor you wish.  I use a package called TexShop which has a built-in editor and makes it easy to write, build, and view documents, but I know many others prefer emacs.  There are also many different packages and style files available, which allow a ton of flexibility in layouts and formatting.  Finally, the fact that they are plain text files with a known format means that you can do tricky things like automatically generating LaTeX files from the information in a spreadsheet or database.  I did this a couple of years ago when we had application packets from about 150 people for a summer course; I was able to take the application data from a web database and turn each person's data into a nicely-formatted package, all done using a few pages of python code.

Another major reason for moving was BibTex, which is the reference management system used with LaTeX.  After all of my annoyances with Endnote + Word, BibTeX was like a dream.  I use the BibDesk application to organize my libraries; it includes integrated searching of PubMed and other repositories and has met my needs almost perfectly.  It's also possible to export BibTeX libraries from Papers, but BibDesk is nice because it operates directly on the BibTeX library so there is no need to export.

There is only one thing that I seriously miss from my days of using Word, and that is the "Track Changes" feature for collaborative writing.  One can use unix tools like diff to find where two files differ, but that still only tells you which lines were changed, not what actual text was changed.  There is at least one open source tool that provides something similar to Word's track changes for LaTeX (LaTeX Diff) but I've not yet been able to get it to work on my Mac.

Another problem is that many of my collaborators are not LaTeX users, so I can't exactly send them a file of raw LaTeX code and expect them to edit it.  There are a couple of alternatives.  First is to save it as PDF and let the colleagues make comments on the file, but this doesn't let them actually edit the file.  What I generally do is export the file to rtf (using latex2rtf) and then send that to my colleagues.  Then I have to put their edits back into the LaTeX file by hand.  Not exactly optimal, but it gets the job done.

Writing papers using LaTeX is not for everyone.  There is definitely a learning curve, and occasionally things happen that require some pretty serious debugging.  It also helps if your collaborators are also LaTeX users.  But in general, it's been a welcome change from Word+Endnote.

Here are some resources that have been useful for me:

## Thursday, October 14, 2010

### Welcome

I've set up this personal site so I will have a place to spout off about the various things that I think about that don't fall under the purview of the my Huffington Post blog (which is focused on implications of research for daily living) or the Cognitive Atlas blog (which is focused on topics related to our Cognitive Atlas project).  I will probably focus mostly on science issues, productivity tools and workflows, and food and travel.