Thursday, April 26, 2007

Moyers on the Media and Iraq

I wanted to recommend Buying the War, a documentary by Bill Moyers that aired last night on PBS (you can watch it online). It's really amazing to re-watch some of the media coverage preceding the Iraq war and to see how unbelievably wrong it was. Glenn Greenwald has a nice post on the topic.

Wednesday, April 25, 2007

The Waiting Game

There haven't been many posts for a while, due to a good deal of traveling for job interviews. Now that I'm done with the traveling, all I can do is wait until the decisions come in. The waiting is fairly miserable; I've managed to be somewhat productive research-wise, but I can't help but glance at my email and phone a bit too frequently to make sure I don't miss any news. Even though the waiting is hard, I'm also slightly dreading the end of waiting, since at that point if I have multiple offers I'll have to make a decision. I know that all my options will probably be good, but I'm sure I'll agonize to no end over minutiae in trying to make the best possible choice anyway.

Well, that's about all I have to say for now. I just finished reading Bleak House after several fits and starts, and I hope to write a bit about it soon.

Friday, March 30, 2007

Suppressing a line number with the listings LaTeX package

Don't bother reading this post unless you are using the LaTeX listings package, have a code listing with line numbers, and want to suppress a line number in the listing.

By suppressing a line number, I mean something like the following:

Line 16 is split across two lines in the figure, but it's really one code statement, and I didn't want to have to refer to the statement using multiple line numbers in the text. Here is the LaTeX source for the key line:

String firstName = /*@\\@*/ /*@\underline{fullName.substring(0,spaceInd-1)};@*/

Note that since this snippet is used within the listings environment, the whitespace and the lack of a newline are significant. I used \lstset{escapeinside={/*@}{@*/}} before this listing to declare the escape sequence for adding other formatting. The {\*@\\@*/} inserts a linebreak, and then the spaces before the next characters appear as indentation in the figure.

Anyway, I googled around and couldn't find this trick, so hopefully this writeup will be useful to someone.

UPDATE (10/27/2008): In response to a request in a comment below, here is a minimal-ish full example that uses the technique. I've confirmed that this example works with the MacTex 2008 distribution (pdfTeXk, Version 3.1415926-1.40.9 and version 1.4 of the listings package).


\documentclass{article}
\usepackage{listings}

\lstset{escapeinside={/*@}{@*/}}

\begin{document}

\begin{figure}[t]
\begin{lstlisting}[numbers=left]
String firstName = /*@\\@*/ /*@\underline{fullName.substring(0,spaceInd-1)};@*/
\end{lstlisting}
\caption{Example illustrating suppression of line numbers.}
\end{figure}

\end{document}

Tuesday, March 27, 2007

Snitches in Baltimore

I read this article on witnesses being harassed and murdered in The Atlantic yesterday, and was absolutely infuriated. Everyone knows The Wire is a realistic show, but for some reason it was only after reading this article that it hit home for me how horrible that is. Is there any vaguely practical path to a sane drug policy in this country? Please let me know if one exists, as I'm eager to support it. Also, email me if you're not an Atlantic subscriber, and I'll email you access to the article.

Sunday, March 25, 2007

Rice and Keats

Just wanted to plug Rice and Keats, a blog well worth visiting; and I'm only a little biased :)

Friday, March 09, 2007

Times Reader again

I just wanted to recommend the New York Times reader again. They just updated it so that you can read any issue of the Times from the past week, a really useful feature. I've used the reader extensively on flights by syncing the articles before I leave, and it's been great.

Update (3/16): It looks like the Times reader will soon not be free, and for me, it's definitely not worth the price they are asking. On the other hand, Times Select is now free for students and faculty.

Thursday, March 01, 2007

News War

I wanted to recommend News War, a great Frontline documentary on the evolving role of the media that has been airing recently. You can watch it online, and the extended interviews are also really interesting.

Pipe for all my posts

Just for kicks, I made a pipe (as discussed previously) for all my posts here, on NewsDog, and on del.icio.us, and added a link to the feed.

Monday, February 26, 2007

Great David Milch video

I highly recommend this video of an interview / Q&A with David Milch (hosted by David Thorburn, who taught a lit. class that I took my freshman year). Milch talks about Deadwood, NYPD Blue, his own life, and the writing process. Perhaps the most interesting factoid: the role of Al Swearengen was originally written for Ed O'Neill (the father in Married with Children), but HBO wouldn't cast him; crazy.

Friday, February 23, 2007

Yahoo! Pipes

I messed around a bit with Yahoo! Pipes a few days ago, and it seems like a very cool tool (if a bit hard to use). I made a pipe for my brother's columns in the Stanford Daily, and it works nicely. I also recommend this Freakonomics pipe that only includes Levitt's posts from the blog. There are pipes that do all kinds of crazy mashups, but even the basic filtering functionality is quite useful.

Friday, February 16, 2007

Hacking a felony?

I just saw this article in The Tech about three students being charged with a felony for getting caught in the middle of a hack. It seems a bit overboard to me; you would think that the MIT Police would be able to figure out that no harm was intended in a case like this one. Hopefully the charges will be dropped.

Friday, January 12, 2007

A visit to Philadelphia

I wanted to write briefly about what we did and ate during our recent visit to Philadelphia, which was a lot of fun. We took some recommendations from this Times article. In no real order:
  • Kingdom of Vegetarians: We ate here on our first night. Good food, but very large quantities; one appetizer and a main dish is probably enough for two. I was impressed with the number of vegetarian places in center city Philly; we had lunch at a vegetarian falafel place once, and there were plenty of other options.
  • La Colombe Torrefaction: Recommended in the Times article, this place does in fact have amazing coffee.
  • The Rosenbach Museum: A small, cozy museum showcasing the rare books collection of Dr. A.S.W. Rosenbach and some antiques. Lots of neat stuff here, and you can see everything in under 2 hours.
  • Porcini Restaurant: A friend took us to this friendly Italian restaurant, where the owner typically mingles with the diners. It was a bit cramped, but the food was quite tasty.
  • Pietro's Pizza: The coal oven pizza was good, but stay away from the salad.
  • Naked Chocolate Cafe: Go here for some intense hot chocolate, very dense and served like an espresso shot; wow.
Overall, I was pleasantly surprised by how much fun we had during the trip; Philly is a place worth visiting.

Friday, December 08, 2006

The re-up

I just saw this headline on ESPN.com: Staying Put: Bonds to re-up with Giants for $16 million. I had never heard the term "re-up" before watching The Wire, but according to The American Heritage Dictionary, it can in fact mean "to sign a renewed contract for employment or service." It's still kind of funny to refer to Bonds as doing a re-up.

Better Slate RSS feeds

Finally, Slate has upgraded their RSS feeds so that there are separate feeds for each department. I've wanted for a long time to have a feed for the Today's Papers feature, so this is great.

Tuesday, December 05, 2006

Thompson and Bordwell Blog

I just found the blog of Kristin Thompson and David Bordwell (via GreenCine Daily), authors of Film Art: An Introduction. I picked up the book since it was the text for a film class I started to take; I couldn't handle the weekly 3-hour film screenings in the middle of the day and dropped it. But, I still read most of the book and learned a ton from it. The blog is beautifully written, the kind of stuff that makes me want to drop everything and watch movies all day. These two entries on Soderbergh's latest film are a good sample of Bordwell's style. Check it out.

Friday, December 01, 2006

Again on The Wire

Slate has a great lengthy interview with David Simon. We were re-watching some of the first season last week, and it's just stunning how many connections there are with small moments in the fourth season. I think this post is right that The Wire is best when watched in chunks, as it will essentially be "a 66-hour movie" (as Simon puts it) when it is finished.

UPDATE (12/05): Here's another interesting Q&A.

Monday, November 20, 2006

David Milch's New Show

Here's an article on David Milch's new show, John From Cincinnati. It sounds promising: with Deadwood basically over, and The Wire and The Sopranos close to being done, I need a new show to become obsessed with.

Friday, November 10, 2006

How Much Coffee to Drink

Just wanted to point out this NPR story from a while back on recommended amounts of caffeine consumption. I've switched from drip coffee to single americanos, which both taste better and have a predictable amount of caffeine. I haven't gotten jittery since, and I've been sleeping really well too. It might not work for Cog, but it works for me.