Blog Articles 156–160

Joining Lines with sed

I had a need this week to join lines in a shell script. Specifically, I had a file containing file names, one per line and needed them colon-separated in a single line.

I could have done something in Perl or Awk, or something. But a bit of searching turned up this solution in sed:

sed -e :a -e '$!N; s/\n/:/; ta' test.txt

sed usually operates a line at a time, so a simple s/\n/:/g won’t work; it will never find the newline characters.

Romney and the Working Poor

The problem is living the dream has blinded [Romney] to other people’s reality. His comments evince no understanding of how difficult it is to focus on college when you’re also working full time, how much planning it takes to reliably commute to work without a car, how awful it is to choose between skipping a day on a job you can’t afford to lose and letting your sick child fend for herself. The working poor haven’t abdicated responsibility for their lives. They’re drowning in it.

What Romney doesn’t understand about personal responsibility — highly recommended read on what life is really like for the working poor.

App.net: Bring on the cross-posts

There is an emerging social norm on app.net, or at least among some of its vocal members, that cross-posting content from Twitter (e.g. w/ IFTTT) is unwelcome.

As I said in that thread, I think this norm is unhelpful for encouraging adoption and building a diverse community and information flow.

Authors/publishers, both in the large and in the small, write and post where there is engagement. If there is no engagement, there is little incentive to post. But also, if there is nothing posted, there is nothing to engage with. Chicken, egg. Vicious or virtuous circle.

Content mirroring provides a way to test the waters, so to speak. It provides a zero-marginal-effort means to get your content onto ADN and see if the community there is interested in it. If there’s engagement, (A) reciprocate the engagement, and (B) consider making dedicated or channel-specific content. This does require that you read ADN, monitor the mentions, etc., but none of that is visible in the “posted with IFTTT” blurb.

RecSys 2012 Preview

I’m headed out today for RecSys 2012, and have my fingers in a number of pies. Places you can see things I’m connected with somehow:

  • I will have a poster for our short paper on identifying when different recommenders make different mistakes (particularly, when is one wrong but another right?) at the poster session.
  • Daniel Kluver is presenting our paper on estimating the information content of ratings. This is a very cool line of work some of our newer students are spearheading, providing interesting tools for measuring and quantifying certain aspects of how recommender systems relate to their users.
  • The demo session is looking amazing (I have the privilege of serving as demos co-chair this year). We’ve got a great mix of academic and industrial projects showing off their work. Really looking forward to it.
  • I’ll be giving two talks at the RecSys Challenge, one about the MovieLens data set and another about LensKit.

Of course, I’ll be around all week. I’ll also be at the Decisions workshop on Sunday.

Run me down & say hi - I’d love to meet you! Or reconnect, if we know each other already.

Travel Checklist

My travel prep stress has decreased markedly since I developed a checklist for academic conference travel. It contains a few things I need to do (charge everything, back up my computer, make sure I have alternate access to talk slides) and checklists for the things that need to be in each of my containers.

I continually refine it - often writing new things while preparing for a particular trip, then adding them to the master document later - but it really helps.

If you want to see it, get it from OneDrive or as a PDF.