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.

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.

One personal reason I am pro-immigration

I am proud of my ancestors. The ones whose stories I know were Swedish immigrants who left their famine-ravished home in the late 1800’s/early 1900’s in search of such luxuries as food, pay, and land to work. My great-great grandfather was an immigrant, a carpenter, and a farmer, building the house where my family now lives and farming there for a number of years.

The idea of denying someone else the opportunity to leave such a legacy for their grandchildren is abhorrent to me.

These men and women were brave (my grandmother’s father left Sweden alone, at the age of 16, with $20 in his pocket). They seized what opportunity they could to live, to work, to raise families or provide for the ones they already had.

I believe America can still be that land of opportunity, if only we will let it.