Continued elsewhere

I've decided to abandon this blog in favor of a newer, more experimental hypertext form of writing. Come over and see the new place.
Showing posts with label hacks. Show all posts
Showing posts with label hacks. Show all posts

Sunday, October 19, 2014

Emacs hack: yank URL from Chrome (on Mac)

Damn is this going to be useful:

(defun yank-chrome-url ()
 "Yank current URL from Chrome"
  (interactive)
  (require 'apples-mode)
  (apples-do-applescript "tell application \"Google Chrome\"
 get URL of active tab of first window
end tell"
    #'(lambda (url status script)
        ;; comes back with quotes which we strip off
        (insert (subseq url 1 (1- (length url)))))))


I suppose I should have separate blogs for stupid hacks and Deep Contemplations of the Nature of Things, but who has the time to manage multiple web presences?

Thursday, December 20, 2012

Civilization

Doing data visualization is kind of trendy these days but that doesn't mean it isn't fun. Here's something I whipped up that maps US counties by population density vs. % Democratic vote in the last election. Interactive version with map is here.

It's no surprise that denser areas (note the log scale) tend to vote more Democratic, although it was a bit startling how pronounced the correlation is. If you ignore the small smattering of low-density counties that went Democratic (and pretty much all of them are areas dominated by a racial minority) then it's almost perfect. One party represents urban cosmopolitans (that is, the civilized, which just means living in cities) and the other rural hicks.

Friday, July 13, 2012

LinkBack Relaunched

A few years ago I made a little browser extension hack that would show you incoming links to each page that you visited. It was kind of crude, and eventually stopped working as the browsers evolved and the underlying service went away.


So, I've made a new version. This one is a proper extension (for Chrome, the browser of choice at the moment), looks and works better, and uses a different service. Please to enjoy; feedback is welcome. I've found it adds an interesting new dimension to web browsing.

Sunday, January 10, 2010

Twittering about twitter

I have a love/hate relationship with social media -- Twitter, Facebook, Reddit, blogs, del.icio.us, etc. On the one hand, they take up endless time, and the information quality and density is generally much less than one gets from traditional media, such as books and journals. On the other hand, just because scholarly journals exist doesn't mean I shouldn't spend time chattering with friends and acquaintances -- in other words, the proper thing to compare Twitter to is, say, an ongoing cafe conversation, not publishing. On the other other hand, Twitter and Facebook are a pale simulacrum of actual face-to-face social interaction. On the other other other hand, so is letter-writing and that technology spawned a great deal of worthwhile instances.

It's a brave new universe and it's still in progress; the rules for formats and genres and etiquette are being explored and seem to change on a daily basis. Worlds are colliding. As a certified Doctor of Media I feel obliged to at least keep track of what's going on and participate a bit, even if it is part of the ruination of intellectual life. I don't really think it is -- or, rather, it is wrecking some parts of the universe of discourse (newspapers, most obviously) and enabling a great many others, and we are a couple of decades away, at least. from seeing how things will ultimately shake out.

One example: I have various services that gate my blog posts onto Twitter and Facebook, and gate Twitter posts onto Facebook. The directionality is significant -- I'd never do it the other way around. Identity is uncomfortable -- the blog is pseudonymous, Facebook is under my real name, Twitter is a bit of both. The mtraven alias was supposed to be decoupled from my real identity so I wouldn't have to worry about professional implications of anything I said here, but eventually I couldn't be bothered to maintain the wall of separation and have been more or less letting it decay or actively undermining it. I can barely be bothered to maintain one persona let alone several.

Aside from the identity discomfort, the flowing-together of these different media also causes other slight irritations -- call it genre discomfor. Something that makes a good blog post doesn't necessarily make a good tweet. For instance, tweets seem more ephemeral than Facebook posts, since the latter have a more explicit mechanism for replying and can become the locus of a conversation. But I undermine the casual nature of Twitter by connecting the two together.

One way to frame thinking about these technologies is to change from thinking of them as a medium to thinking of them as infrastructure. Twitter, for instance, as a medium is kind of stupid -- what possible good can come of a 140-characte limit (on the other hand, haiku). But as an infrastructure -- a utility that supports the controllable multicasting of short messages -- it enables all kinds of unexpected things. My most practical use of Twitter is the Caltrain feed, which allows riders to send reports of train delays, outages, and accidents (which happen with alarming frequency). I have this feed piped to my phone so I typically get better reports of what's going on than the conductors do. I enjoy the mild irony of using this cutting-edge 21st century technology to monitor and improve the utility of the largely broken 19th century technology of railroads.

Google Wave is another new technology that seems really crappy as a medium (if you've used it you know what I mean; if not and you want an invitation let me know), but has great promise as infrastructure. In this case the infrastructure supports the standardization of collaborative applications, ie, it makes it easy to create apps that work like Google Documents do (through the web real-time collaborative editing of documents).

Hm, on further thought there are many subtly different ways to treat these things:
  • medium
  • infrastructure
  • platform
  • ecosystem
  • community
  • standard
For any web technology, these are different and related aspects of the elephant. They all fit together -- standards are useless without a community that is interested in using them; standards once established becomes a platform on which other things are built. Things that start out as new media seem compelled by market forces to become platforms. Etc.

Facebook, for instance, had no appeal for me until some actual people I wanted to communicate with pulled me in (community). Twitter on theo ther hand is more interesting (to me) because of its API. Because it's so trivial, it is developing an interesting ecosystem of clients (like Brizzly and dozens of others), and tools that put different spins on the date such as Twibes and Tweememe. I just learned about a new, interesting, scary part of the Twitter ecosystem a site that lets you add sponsored links:
Ad.ly automatically inserts one tweet from an advertiser that you approve into your feed every other day.
Here's my own (pretty trivial) contribution to the Twitter ecosystem -- Twitlines, a client that uses a scrollable timeline. The idea is to create an ambient view This was done mostly as an experiment to test out how quickly I could deploy a web app in the new universe of platform services (answer -- very quickly, but tweaking it into shape was starting taking too much time so I am forcing myself to release it to the wild). More interesting variations to come, I hope.


The profusion of multiple standards and platforms is a symptom of the youthful stage of the Internet. It's pretty healthy, if annoying, to have so many different growth points.

Oh well, this post has turned into the opposite of a tweet, which is necessarily pithy and pointed. If I have a point, it's that these media are going to be the nervous system of the planetary collective mind, like it or not, and radically shape whatever civilization we might have in the future, just as the printing press shaped the Enlightenment. So it won't do to dismiss them as trivial, even though 99% of the contents may be just that.

Wednesday, August 27, 2008

Ubiquitious PubMed

Ubiquity is a way-cool Firefox plugin that enables all sorts of client-side mashups, and is easily extendable.

Here's my 10-minute effort to add PubMed search. When I have more time I'll try to add a preview.

Saturday, May 17, 2008

Useful Emacs Dired launch hack

[leavening some technical stuff into the usual political/philosophical content. I'm curious to see if search engines pick it up.]

I live my computational life inside Emacs, which is the best user interface for almost everything; but it's sometimes frustrating that you can't escape Emacs' text-only world. Well, here is a little hack that lets you launch arbitrary files from a Dired view of a directory; using the operating system's registered application; ie, if you navigate to a .pdf file and hit 'l', Acrobat (or whatever) will launch and show you the file. Now I never have to use the accursed Finder. Works on Mac OS X and Ubuntu; might need modifcations for other systems.


;;; Hack dired to launch files with 'l' key. Put this in your ~/.emacs file

(defun dired-launch-command ()
(interactive)
(dired-do-shell-command
(case system-type
(gnu/linux "gnome-open") ;right for gnome (ubuntu), not for other systems
(darwin "open"))
nil
(dired-get-marked-files t current-prefix-arg)))

(setq dired-load-hook
(lambda (&rest ignore)
(define-key dired-mode-map
"l" 'dired-launch-command)))

Saturday, January 27, 2007

Amazon/WorldCat connector


Hack of the day: putting a WorldCat button on Amazon book pages. Details here.

I don't imagine Amazon would approve of this, since it's main purpose is to aid in using my wishlist as to cache my books-to-read list, then fulfilling it for free at the library rather than through spending money at Amazon.

Thursday, January 04, 2007

I'm Big in Japan

My Linkback hack has been percolating around the web ecology and apparently has gotten some traction among Japanese social-bookmarking sites. I wish I knew why, but I'll take whatever attention I can get. And it gives me an excuse to quote Tom Waits:
I got the style but not the grace
I got the clothes but not the face
I got the bread but not the butter
I got the winda but not the shutter

But I'm big in Japan I'm big in Japan
But heh I'm big in Japan