The Third Policeman's Walkman
2012/05/12 07:36
This is a small set of tracks I made over the last 3 weeks while feverishly reading Flann O'Brien's The Third Policeman. It's a great book.
The music itself is a mixed bag. I hope you like it.
This is a small set of tracks I made over the last 3 weeks while feverishly reading Flann O'Brien's The Third Policeman. It's a great book.
The music itself is a mixed bag. I hope you like it.
Some books I've been reading lately...
I picked this up for 5 euro in HMV a few weeks back. It's very good. Anyone who's watched The Wire knows Simon has a great ear for dialogue and this book chronicling a year (1988) he spent with the Baltimore PD homicide dept displays the same acute ear for dialogue. If you're a fan of The Wire, this is a good read.
This is considered a bit of a classic (it was written in the 1870s) and is about a man who enslaves himself to a woman (Masoch unwittingly gave his name to Masochism). It's not a great read though it is sometimes funny (especially near the end).
This one is very good. Wise and Funny in the way of some east-european writers. If you've ever read any of Milan Kundera's books and like them, you'll probably enjoy this.
I haven't finished this yet but it is wonderful. I think I love it already. Surreal and very funny.
I've been reading more books lately - actual physical books made of paper! - and spending less time online.
It feels good.
A quick pic of the Kids in MineCraft. Notch should make it easy to create skins from within Minecraft itself.

So I'm over on GitHub if anyone is interested. What do I plan to put up there? Not too sure to be honest. I've posted the source code to the markdown helper javascript I use here on this blog. It does basic stuff like indenting a block of selected text, quoting and line-wrapping - that sort of thing. I also plan to post my beloved TinyTemplate perl module. CPAN doesn't take kindly to projects with the word 'Tiny' in them any more. Too bad, I think the world could use less software. I've been meaning to update my TinyMake module for a while now - the documentation is plain wrong in places. I think GitHub might be a better home for my odds and ends. We'll see.
It's Easter Sunday. Ursula is in the College Library studying for upcoming Law exams. There are 5 children in the house (only 2 of which are mine). Like any good adult guardian, I picked up some headphones and my iPad and spent some time noodling in GarageBand to drown out the noise. This is the result...
... This is probably the best thing I've put up on SoundCloud in ages. The bass-line gets interesting around the 1:40 mark thanks to some liberal use of Echo.
For your reading pleasure this fine Easter morning...
I saw Quoras potential early on it could have been a giant repository of information, a kind of interactive encyclopedia with views coming from everywhere. And certainly, there are still very interesting questions being asked (this one and this one came in my Quora weekly digest, and were pretty interesting). But its all being overrun with meaningless questions. Put simply, its just hard to filter through all the noise to get to the worthwhile content. Thats one reason why I visit the site maybe once a month, and just read the weekly digest instead.
-- Quoras Demise : delwin campbell
... and this...
Finally, and this was the last straw, in the fall, when there was the smell of snow, we allowed six men and a girl-child of the Waterfall People to enter our home, all six hungry and weak, and I was asked if I could shelter two of the men in my already very-crowded cave, as if it was my job to teach strangers the ways of the Red Valley People, and asked to share my smoked deer meateven though it was never made clear to me exactly how much smoked deer I should be giving to the People. That's when I began to wonder exactly why I had joined the Red Valley People.
-- Why I Am Leaving the People of the Red Valley (Ftrain.com)
The Daily Mash - Why I am leaving the Empire, by Darth Vader
Why I Am Leaving Goldman Sachs - NYTimes.com
I love the rinky-dinky transparent cheese-wedge cockpits on these models. Just ... Lovely!
Who says a blog should have a uniform style throughout?
Three different blog posts; Three different style-sheets. The stylesheets are set randomly whenever the blog is updated. I'm kind of fond of the Jamie Zawinski-inspired hacker.css style but it probably isn't to everyone's taste. Chances are the above 3 examples won't have different styles the next time the blog is rebuilt so browse the archives to see examples of the stylesheets in use. I've been prepping my blogging software for use by my 10 year old daughter, I want to teach her a little about blogging, HTML & CSS so I've depersonalized the software and provided a default.css stylesheet for use by someone new to my blogging software - it has sensible defaults that emphasize readability, and provides a good starting point for exploring the different aspects of CSS. I've been beavering away on the blogging software late at night, ironing out the kinks to make it easier for her to use.
10 yr old daughter now has her own domain, SSH and FTP account. Been walking her through unix basics. They grow up so quickly. mmfff.
Walter Higgins (@walter)
She's been blogging away for the past two years on wordpress.com and has become really good at expressing herself and presenting her photos. Moving to her very own domain where she has full control will be a bit of an adjustment - I hope she likes her new online home.
A couple of weeks ago I wrote about replacing text in multiple files and came up with - what I thought at the time was - a reasonable one-line solution. Behold! Thanks to the power of Unix Golf I present a more concise one-line command (working in Unix and CygWin)...
find . | xargs grep -l '{OLD}' | xargs -I % perl -pi~ -e 's/{OLD}/{NEW}/g' %
... I call this the Perl Pie solution since it's Perl's -p -i -e
flags which do much of the heavy lifting.
Perl -i specifies that files processed by the <> construct are to be edited in place. It does this by renaming the input file, opening the output file by the original name, and selecting that output file as the default for calls to
print, printf,andwrite.
-- Programming Perl
This is a much shorter solution than what I came up with earlier; 77
characters compared to the previous solution's 132. I shaved off a
couple of characters from the first half of the command by using grep
-l to only show the file name for matches - doing away with the need
for the subsequent | cut -d':' -f1 statement, and thanks to perl -i,
there's no need to explicitly open, slurp, and close the file. Less
typing means less errors. ;-)
For April Fool's Day, Google have done something very special and created 8-Bit map tiles for google maps. Anyone who has played Zelda will love it. This is a map of where I live - Ballincollig is slap bang in the center, the 8-bit maps are (sadly) only available at town-level resolution, otherwise I'd be able to see my house and nearby green in glorious 8-bit splendour...

... Those place names...
... They're not made up - though they sound like names dreamt up by J.R.R. Tolkein. One of the cool things about living in Ireland (outside of Dublin) is you look at a map and can pretend you're living in Middle Earth.
It's simple. I won't pay a new tax while existing tax is being squandered propping up Zombie banks. The case for the Household Charge is that it will be used to maintain local amenities. This is what we already pay tax for. I'm a working citizen with a family to support. It's my civic duty to oppose this unfair Tax. I foolishly believed Enda Kenny when he said that "No another red cent" would be paid to Anglo Irish Bank. Not only has he continued to hand over billions of Tax Payer euros, he has paid unsecured bond-holders too. Everyone has a breaking point and this is mine. I have to draw the line somewhere. I will not pay the household tax while tens of billions are being paid to failed banks. As a citizen it's my duty to take a stand and not cave in to every demand by the government we elected.
Citizenship doesn't begin and end at the polling booth. The government would like it to be that way but that's not the way it is.
A must-read article on how pop music is made in 2012...
Whereas rock is about the sound of a band playing together (even when its members arent actually together) and features virtuoso solos played on real instruments, todays Top Forty is almost always machine-made: lush sonic landscapes of beats, loops, and synths in which all the sounds have square edges and shiny surfaces, the voices are Auto-Tuned for pitch, and there are no mistakes. The music sounds sort of like this: thump thooka whompa whomp pish pish pish thumpaty wompah pah pah pah. The people who create the songs are often in different places. The artists, who spend much of the year touring, dont have time to come into the studio; they generally record new material in between shows, in mobile recording studios and hotel rooms, working with demos that producers and top-line writers make for them to use as a kind of vocal stencil pattern.
-- Stargate and Ester Dean, Making Music Hits : The New Yorker
You have a bunch of files and you need to change text in them. You know the text you need to change and what you want to change it to and you'd like to do this change with as little effort as possible.
This is a (rather long) one line unix command which should work. Hint: replace {OLD} and {NEW} with the text you want to change and its replacement text...
find . | xargs grep '{OLD}' | cut -d':' -f1 | perl -nle '@c=`cat $_`; map{s|{OLD}|{NEW}|g}@c; open FH, ">$_"; print FH @c; close FH;'
... let's break it down. The first part of the command...
find . | xargs grep '{OLD}' | cut -d':' -f1
... will give a list of all files which contain the text you want to replace. This is necessary because you only want to change files which have the text you're searching for. The second half of the command ...
perl -nle '@c=`cat $_`;map{s|{OLD}|{NEW}|g}@c;open FH, ">$_";print FH @c;close FH;'
...passes the output from the first through some perl statements which slurp in each matching file's contents, replace the old with new and blasts the changed contents back out to the file. If you're uneasy about mass-replacing text in a bunch of files (you should be), you can blast them out to staging files and then eyeball the changed files before committing the changes...
find . | xargs grep '{OLD}' | cut -d':' -f1 | perl -nle '@c=`cat $_`;map{s|{OLD}|{NEW}|g}@c;open FH, ">$_.changed";print FH @c;close FH;'
The command above is exactly like the first except the output is to the
file with a .changed suffix. You can find the files which have changed
easily enough...
find . -name '*.changed'
...and once you're happy the changed files are OK, commit the changes like this...
find . -name '*.changed' | perl -nle ' ($o)=$_=~/(.*)\.changed$/; `mv $_ $o` '
My gut is screaming at me that there is a more elegant, concise way to do this in Unix. In particular, the last 3 perl statements...
open FH, ">$_";
print FH @c;
close FH;
... can probably be reduced to a single statement. I'd love to know if there's a better way.
Dustin Curtis on his new hand-rolled blogging system...
A couple of months ago, after being irritated by the complexity and uninspiring nature of most blogging platforms, I decided to build my own solution to power dcurt.is. It is codenamed Svbtle. The first interface I built just contained a simple list of articles with a new post form, like almost every other blogging management system ever created, but it has slowly evolved into something that has hugely improved the quality of my thinking and writing.
-- Codename: Svbtle by Dustin Curtis
... go read the whole thing if you're interested in how other bloggers work. Dustin uses Markdown and a minimal bare-bones (but stylish) UI for writing. His blogging UI is all about simplicity and zero distractions. He's decided to open up the software for use by a select handful of others. I've hummed and hawed about doing the same for my own (as yet un-named) blogging system but ultimately I just don't think it's ready for use by others (yet). What I can say for certain - I've been blogging a hell of a lot more since I began using my own home-brew system so there must be some merit in it.
How did facebook.com/nike become a more desirable property than nike.com?
Walter Higgins (@walter)
Everytime I see a facebook URL in print or other physical media I have to ask myself - who benefits more - Facebook.com or the big-name brand name that appears after the forward-slash? Let's be clear here, when big-name brands use their Facebook page in physical promotion materials they are bringing into the real physical world, their endorsement of Facebook and seem happy that their own brand name is merely an adjunct to the facebook.com domain. When I see a Nike poster or print ad with the Facebook logo and the URL http://facebook.com/nike I see an endorsement of Facebook by Nike - Is this really what Nike should be spending their advertising budget on? I don't work in Marketing but isn't this what Marketing types call 'Brand Dilution'?
Joe Drumgoole echoes what must now be the accepted wisdom among marketing people with regard to Facebook...
@walter easier to sell in a city (Facebook) than an island (Nike.com)
Joe Drumgoole (@jdrumgoole)
... which is fair enough. If I were a big brand though - I would have a Facebook presence but I would not make it so pivotal that it becomes incorporated in atoms and committed to physical media. The Facebook presence would be an adjunct to the brand's existing online presence, not the other way around. Think about it this way - If you're a manager at Nike tasked with promoting the company's Facebook presence, which of these two URLs looks better?
They are both the same length and consist of the exact same characters -
just in a different order. I know I'd pick the latter because it gives
more prominence to the Nike brand/domain and clearly signals that
Facebook is an adjunct. "But that URL doesn't go to Facebook.com!" you
say. Well through the magic of mod_rewrite and a simple line of code
in your web server's configuration you can make it so.
RewriteEngine On
# Redirect visitors from <your-website>/facebook to facebook.com/<your-brand>
RewriteRule ^facebook$ http://facebook.com/nike
Now visitors to http://nike.com/facebook would automatically land on http://facebook.com/nike instead of getting a stupid 404 page not found error. Seriously Nike, with all of the money you're making from exploiting cheap 3rd world labor, you can probably afford to spend a little bit more on establishing a professional web presence.
Who benefits from the widespread bone-headed dissemination of Facebook's logo and domain in physical media? Facebook of course, with a little kick-back to the brands doing the (literal) heavy lifting. It's a strange symbiotic relationship between big-name brands and Facebook and I am more than a little in awe of the genius of Zuckerberg and Facebook, but if I were a marketing exec at a big name brand pushing out physical materials with the Facebook logo on it, I'd be a little nervous. Facebook is drinking your marketing budget milkshake.
Put Your Taproot Into the Independent Web | John Battelle's Search Blog
Last summer The Huffington Post shamelessly rewrote an article from another publication and buried the source link where no one would see it. The author of the source article got mad then got even and the Huffington Post fired the author of the rewritten article. Rewriting other journalists' articles and reblogging with little or no attribution to the source is apparently common practice at the Huffington Post. I wouldn't know myself as I don't read it - everything I know about HuffPo is second-hand - It's Large Print News for the intellectually impaired. Nevertheless Arianna Huffington's news site carries so much heft that some poor souls are willing to write for free just to get their name out there.
The Faustian bargain of the digital news ecosystem suggests that people get to pick your pocket a bit and then send back traffic in return. But Mr. Dumenco noticed that The Huffington Post, a huge site with many readers, returned very little traffic, while Techmeme, a much smaller site, kicked up plenty.
He went on something of a rant about it, writing that The Huffington Posts overly aggressive approach to aggregation at the time in which content is rewritten, links are buried, and very little is added yielded all of 57 page views for the original item.
-- Guidelines Proposed for Content Aggregation Online - NYTimes.com
The practice known as aggressive aggregation came into focus again in the last few days with a lot of soul-searching among certain bloggers about a code of practice for linking to other blogs. There is an earnest plea for the use of two new Unicode characters (via - ᔥ) and (hat-tip - ↬) to acknowledge not just the source article but the 'curator' who discovered the source. This is akin to a Nerd who decides that donning a dickie-bow will ward off school-yard bullies. Ha! Arianna Huffington scoffs at your silly unicode characters and your earnest code of conduct.
This is what The Curator's Code is a suggested system for honoring the creative and intellectual labor of information discovery by making attribution consistent and codified, celebrating authors and creators, and also respecting those who discover and amplify their work.
-- curator's ǝpoɔ
This proposal has justifiably been much derided far and wide in blogs...
First, lets just get clear on the terminology here: Curation is an act performed by people with PhDs in art history; the business in which were all engaged when were tossing links around on the internet is simple sharing. And some of us are very good at that! (At least if we accept very good to mean has a large audience.)
-- Matt Langer · Stop Calling it Curation
... and on Twitter ...
Good morning, Curators! Y’all got funny cat pictures for me? I got my ↬ ready!
Mike Monteiro (@Mike_FTW)
From now on this unicode character indicates an underutilized liberal arts degree ❦.
Paul Ford (@ftrain)
Remember kids, the web is awesome because everyone followed the rules!
Mike Monteiro (@Mike_FTW)
Marco Arment says we're solving the wrong problem...
...how I feel about links in general: the source author creates something worth linking to, and the rest of us can link as we see fit, regardless of how we found it.
The proper place for ethics and codes is in ensuring that a reasonable number of people go to the source instead of just reading your rehash.
Codifying via links with confusing symbols is solving the wrong problem.
-- Im not a curator Marco.org
... I tend to agree. The problem is Scumbag Aggregators (Scumbaggregators?) like the Huffington Post and no code of conduct or Unicode characters - even poorly supported ones - will change their behavior. The solution? Don't read The Huffington Post. Don't give it the attention it so desperately seeks - seek out other news sources instead.
I don't know how long Twitter's new embedded tweets feature has been around but I just discovered it. It's a new 'Embed this Tweet' link that appears on a Tweet's page. I was intrigued by the Short Code link and its use by Wordpress so I added to my home-brew blogging system too.
Is there a word for feeling like you should have known something much earlier? Because I get that feeling all the time working with Unix.
Walter Higgins (@walter)
This is what the shortcode for the above Tweet looks like...
[tweet https://twitter.com/walter/status/177066714582880260]
... it's pretty nice being able to embed tweets so easily. The shortcode is just one of the half-dozen add-ons to the plain vanilla Markdown I normally use for blogging. I'm not entirely sure I could countenance using the HTML embedded code as it relies on 3rd party javascript code to work and I really like to keep this blog baked as much as possible. This is an example of the snippet of HTML code Twitter suggests you paste into your blog...
<blockquote class="twitter-tweet tw-align-center">
<p>Is there a word for feeling like you should have known something much
earlier? Because I get that feeling all the time working with Unix.</p>
— Walter Higgins (@walter) <a
href="https://twitter.com/walter/status/177066714582880260"
data-datetime="2012-03-06T16:22:49+00:00">March 6, 2012</a>
</blockquote>
<script src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
... and this is what it will look like...
Is there a word for feeling like you should have known something much earlier? Because I get that feeling all the time working with Unix.
Walter Higgins (@walter) March 6, 2012
I'm surprised it's taken Twitter so long to make embedding Tweets this easy. It's clearly something that has been needed for a long time - how many times have you visited a blog over the past couple of years which had a screen-shot of twitter where an embedded tweet should have been?
So what's the difference between Baking and Frying? Aside from some obvious UI differences (which can be fixed - the same data is used in both the Baked and Fried versions), the main difference is when the tweet gets constructed. In the Baked version (1st example), the tweet markup is constructed when the page is first published - it's constructed only once at build time and is as static as the page on which it is embedded. In the 2nd (Fried) version, the Tweet gets constructed at load time - that is - it is constructed every single time the page is viewed by someone. This can turn out to be quite expensive from a performance point-of-view because the page on which the tweet is embedded must make many requests to Twitter's API servers and content-delivery network, then construct the tweet using javascript. No prizes for guessing that Baked embedded tweets are faster than Twitter's default suggested HTML embed code (Fried). Of course, this is a moot point if you're using WordPress since your blog page won't be static anyway but if you are using a blogging system that generates static pages (either home-brew or OctoPress), being able to bake in embedded tweets will make your blog faster.
I've been on twitter since the early days when it wasn't very reliable so I don't like to depend on any Javascript served up by its infrastructure. Plus the shortcode looks so much cleaner than the HTML embed code. Note to self - look into what other short-codes are available on SoundCloud, YouTube etc.
Bake, Dont Fry (Aaron Swartz: The Weblog)
My Platform Choice is a statement of who I am. This is a link to an article corroborating my choice of platform.
This is a pull-quote from another article affirming my choice of platform. I read this article and feel validated in my platform choice and am compelled to share this with my readers.
This is a pithy closing remark reasserting my platform choice.
Despite recent claims to the contrary, other platform choices have not been so fortuitous.
This pull-quote is from an article claiming my choice of platform was short-sighted and that very soon other platform choices will be better.
I note such claims so I can later refute them.
This is another article claiming that other platform choices are better than mine.
This is the text of the article which includes quotes from industry analysts and competing Vendors but let's be honest with ourselves, you probably aren't going to bother reading this and will just skip straight to the...
Pithy rebuttal.
This is a reasoned argument which downplays the recent moral/ethical/legal transgressions by my choice of platform Vendor. In it I will assuage your fears that Platform Choice Vendor is really just another fallible, exploitative Vendor peddling human misery in pursuit of profit. It is important that I soft-pedal Vendor transgressions so that Vendor will look favorably on me.
Recent studies confirm my choice of platform was indeed the right choice. I feel a quiet sense of inner calm and confidence.
This is my Platform Choice, there are many other platform choices but this is mine. My Platform Choice is my best friend. It is my life. I must master it as I must master my life. My Platform Choice and I are the defenders of Platform Choice Vendor. We are the masters of our enemy. We are the saviors of my life. So be it, until victory is Platform Choice Vendor's and there is no enemy, but peace!
McSweeneys Internet Tendency: Buying This Thing Will Make Me Happy.
I use the following snippet of code to transform HTML entities (which
seem to get turned into actual characters when the editor form is
submitted - this I think is browser specific but I can't be sure) back
to their ascii representation so that for example, the character
(octal 0231, decimal 153) gets turned into this ™ in the plain text
source from which a blog post is built
$text =~ s/([\200-\377])/'&#'.ord($1).';'/eg;
There's still a couple of rough edges in this blog. Right now there seems to be no way to escape a HTML entity which will survive the edit/save/review round-trip. This is why - right now - I need to have a space between the & and the # chars in the paragraph above. I need to fix that. Onwards and Upwards.
Update: It's fixed! That line of code above was being executed before saving and also again when loading the saved post back into web-based editor. This is why escaping wasn't surviving the round-trip. To escape a html entity in Markdown just enclose it in back-ticks.
`™`
Update: As usual with perl, there's more than one way to do it and if there's something that needs doing, someone has done it already. HTML::Entities seems to be one of the standard modules that ships with Perl out of the box. A more elegant alternative to the above regexp...
use HTML::Entities;
$text = encode_entities($text,"\200-\377");
... I briefly considered building my own hash of numeric values to names but strongly suspected there was already a perl module that did this. Glad I didn't waste too much time.