An introduction
Why do I clutter up the internet with this stuff at all? Mainly because I'm trying to get into the habit of displaying as much as possible of what I'm doing in public. Also, Blogger is a decent interface for a notebook
Sunday, July 25, 2010
Saving firefox
and so, firefox is saved for another day.
also of note: the vimkeys plugin, providing j/k scrolling.
Firefox: TINA
- Chromium: best of the alternatives, but has largely-dysfunctional text searching.
- Opera: still around, still not very good on a small screen
- flock: built on firefox, but with more stuff on top of it
- galeon: not even installable in ubuntu, for some reason
- uzbl: nice idea, gaping usability/discoverability problems
..and so I return grudgingly to firefox :(
Monday, July 19, 2010
Webmontag 19.7.10
At Web Monday. Presentations:
- First Trimester, blogging for doctors. Apparently while there are a lot of web projects targetting patients, there aren't many blogs aimed at providing professional information for doctors.
- Yourcent, a micropayments system
- Feed Magazine a free german-language (paper) magazine about the online world. Now at issue 0
Thursday, July 15, 2010
Kyrgz miltias
Not a good sign:
Amid the early April tumult that brought down former President Kurmanbek Bakiyev’s administration, young men in Bishkek and other cities began forming druzhiniki groups to patrol the streets and restore order. These groups were originally envisioned as a temporary solution to security challenges. But in the ongoing unrest that has plagued Kyrgyzstan since April, militia groups have kept on amassing influence. [Eurasianet
Wednesday, July 14, 2010
Temperature and clothing: a little project I'll never find time for
But now I find myself wondering: what makes people dress down in the heat? Do they choose their clothing based on today's weather, yesterday's weather, or some combination of the two?
Fortunately, we have the data and technology to answer this. I'm not going to implement it (see: lethargy). But here's what I would do, if I had the time/energy -- and perhaps I will when autumn comes and I start to wake up.
Skin-detection algorithms already exist. This is the only freely-available code I could find for the purpose; I haven't tested it.
You'd also need a source of images, tagged by date and location. Flickr will probably give you that, if you choose the right tags to narrow it down to full-body portraits of people. You can get weather information from The US National Weather Service, although it's not clear what historical data is available. Failing that, you could limit photos to a particular group of dates/locations, for which you manually look up the historical weather. Then just assemble the data, and run some regressions.
Sunday, July 11, 2010
Oxford comma
"For my parents, God and Damien Katz."
-- Noah Slater's dedicaiton, in the O'Reilly couchdb book
Saturday, July 10, 2010
git pull --rebase
Useful post on git by Yehuda Katz. inter alia, strongly suggests using the --rebase
flag when merging
Friday, July 9, 2010
Kyrgyz political biographies
Ran into this who's who of Kyrgyz politics looking up the new Interior Minister, but it seems generally pretty worth paying attention to.
Kyrgyzstan: new interior minister
Kyrgyzstan has a new interior minister. Probably no bad thing, given that the accomplishments of previous acting interior minister Bolot Sher consisted of:
* pursuing Bakiyev's relatives
* Making the supremely reassuring statement that "I am in command of 80 percent of the Ministry of Interior...The other 20 percent is still waffling."
On the other hand his replacement, Kubat Baibolov, is coming straight from an oh-so-successful stint running things in Jalal-Abad
Kyrgyzstan: NYT beats WaPo
I've been shamefully ignoring Kyrgyzstan. Well, I've been ignoring politics in general, busy on vodo and other techncial work. But it's particularly hideous to start ignoring an area you care about, just as a great many things (good and bad) start happening. Not reading about what's happening over there makes me feel complicit in the near-total lack of attention in the Western media.
And Kyrgyzstan really is being overlooked to an incredible extent. Washington Post: nothing worth mentioning. New York Times is doing noticeably better, though -- in fact, their coverage is pretty decent considering the distance, and the lack of much domestic political significance within the US.
Open Data
We're in the midst of a data explosion. Then again, we're always in the midst of a daa explosion. It's been developing, wave by wave, since the first Sumerian scribe pushed his wedge into clay. Maybe it feels different this time; maybe it's always felt different.
The past two centuries saw the gradual triumph of ordered data collection: the regimented and expensive process of the census, the time-motion study, the economic indicator. The province of powerful behemoths -- government, military, corporate or the omnipresent RAND corporation -- such projects were rigorously plannedat the top, then executed by a small army of functionaries.
In the last 15 years, something has changed. Quantitative change, initially: more data, faster computers, easier transmission of information. But also a change in quality. Now we've moved into the era of data as by-product. Our clicks and our purchases are tracked because watching us is cheap and easy, not as part of a pre-planned technocratic project. Such cheapness brings us into the age of data abundance, and we're only beginning to appreciate the consequences and the possibilities.
Enter the Open Data movement. Bubbling with geekish idealism, this is a loose grouping of campaigners trying to prize large datasets out of government and corporate hands, bringing them into the agora. Knowledge here may be measured in SQL dumps, linked data and gigabytes of official transcripts, but the idealism fits into the standard pattern: the Truth will set you free.
Freebase
getting country population data from freebase:
from freebase.api import HTTPMetawebSession, MetawebError
mss = HTTPMetawebSession('www.freebase.com')
list(mss.mqlread([{'name': None, 'type': '/location/country', '/location/country/iso31661alpha2' : None, '/location/statistical_region/population' : [{'number': None}] }]))
Thursday, July 8, 2010
GANTT
Embedded in a project that's floundering a little as it expands beyond the size that the devs can keep in their heads. So, looking for some relatively lightweight, way of visualizing the moving parts and the work that needs to be done. And, as every other time I've looked in this area, finding most solutions to be too feature-light, too complicated, or sometimes both.
First are the project scheduling systems. Whatever they focus on, it's hard to think of them except as tools for generating GANTT charts. I can imagine these being useful for, say, a big construction project with complex interdependencies of people and machines. For coding, not so much. Particularly not Taskjuggler, which seems to delight in being non-user-friendly. That is , it is is complicated and does a bad job of explaining itself -- but then tries to use this as evidence of how sophisticated it is. I ran away before finding out; complexity is not what I want!
Gnome planner is quite possibly much inferior for large projects, but at least lets me add a task without hours grepping through the docs. If I ever need a gantt chart, I'll certainly head there rather than taskjuggler. I honestly believe that coding extra features into planner as required would be easier than making sense of taskjuggler
So, I think I'll do without!
MongoDB
MongoDB (and nosql generally) is an appealing idea. The words written about it, though, are problematic: too much hype, too little documentation. That'll change soon; we're over the peak of the nosql hype cycle, into the trough. People are looking at the nosql systems they've eagerly implemented in recent months, noticing that they won't solve every problem imaginable. For now, though, every blogpost with mongodb instructions is prefaced with grumbles about the lack of information.
So, i spend a ridiculous amount of time figuring out how to do grouping. Have a bunch of download logs, want to break them down by country.
The simplest way I could find of doing this is:
db.loglines.group({ 'cond' : {}, initial: {count: 0}, reduce: function(doc, out){out.count++;if(out[doc.country] == undefined){out[doc.country] = 0;};out[doc.country] += 1;}});
Or, the version in pymongo:
> reduce_func = """function(doc, out){
out.total++;
if(out[doc.country] == undefined){
out[doc.country] = 0;};
out[doc.country] += 1;};
"""
> l.group(key = {},
condition = {},
initial = {'total':0},
reduce = reduce_func)
[{
u'AE': 215.0,
u'AG': 23.0,
u'AM': 140.0,
u'AN': 58.0,
u'AO': 56.0,
...
u'total' : 87901;
}]
[apologies for formatting; I've not really figured out how to edit js within a python repl]
BP oil spill
I often avoid certain news stories: not because they're unimportant, but because I doubt I'll learn much by discovering them in the day-by-day dribble of the daily press.
The BP Oil Spill is one: I'm not going to bother with short articles on it, but I'd really love to follow the long ones. I've idly watched the speculation ramp up to biblical proportions, but have no idea how to interpret it.
[no content here, as you can see, just a stick in the ground to note how shameful it is that I know nothing about this]
Tuesday, July 6, 2010
more gaga
More on Alejandro:
- Bad Romance may have been similarly intricate
- The dreamscape reminds me strongly of Gaiman, although that probably means no more than that Gaiman's been on my mind lately
- Everybody seems to have seen the religious elements as a homaget to Madonna, with "like a prayer". Fair enough, but it surely also has some connection to Derek Jarman's video for the pet shop boys' It's a Sins
GaGa
It's taken a long while, but I'm now, finally, a convert to the church of gaga. It's all Alejandro's fault, and more particularly in the video. It's another epic 8-minute piece, which means there's plenty of time to develop a good many themes. She's doing what I like best: not making a syllogism with her music, but layering loosely-connected themes so that, if you clap your hands and try to believe, you'll be able to weave your own meaning out of it.
It's somehow very European, but drawn from disparate sources within that; Gaga surely deserves some EU subsidy for semiotic integration. The setting is mystical and unspecific, but in a cold and German fashion. Gaga appears as Dream or an Ice Queen, or maybe as Narnia's White Witch. But this isn't Narnia, with children and a christ-like lion. It's Weimar, a collapsing world where introspectively melodramatic romance must take the place of morality. It's intense and fearful, slightly frigid, physicality replaced by power. Even the male dance troupe are desexualised; after entering with a haka-like swagger, they retreat into stylised weirdness.
So far, we're in a familiar aesthetic, one which runs from Rammstein to Bauhaus through the entire spectrum of goth. The equivocation between sex and violence is likewise familiar, though rebel chic rarely gets as far as a semi-automatic bra. It's the hispanic eurodisco elements that take us away. Our tragic ice queen seems about to start singing 'numa numa ey'. Teutonic tragic Romance meets the Romance culture -- in accent, if not in much else.
Monday, July 5, 2010
debugging python regexes
> re.compile('a(b+)a', re.DEBUG)
literal 97
subpattern 1
max_repeat 1 65535
literal 98
literal 97
documentaries
Spent a chunk of the weekend with a clique of Australian travellers and party animals -- who turned out to have a sweet and counter-intuitive affection for watching documentaries. Also, chess. On the documentaries, they turned me onto this giant list of of documentaries to watch online.
Saturday, July 3, 2010
Patch: vi-style scrolling for the comix image viewer
Here on github -- the first time I've used github in this way, and an impressively painless experience. I'm now itching to hack on other code that's hosted there. [also, there's probably a way of getting automatic github updates posted here, or to facebook, or something]
Patch: blogger post from stdin for googlecl
So, to start, something intended for this blog itself. A patch to the google commandline tools enabling the "google blogger post" command to post content read from stdin (adding to the current options of supplying a string or a filename). Usage is the traditional '-' in place of a filename.
This enables two pieces of functionality I'd find very useful:
A) filter content through other programs. e.g. using markdown to HTMLify my content:
$ markdown post.txt | google blogger post -
B) make a blogpost from within vim, by selecting my post content and piping it to googlecl
tail wagging the dog
"This year, the Pentagon will employ 27,000 people just for recruitment, advertising and public relations — almost as many as the total 30,000-person work force in the
State Department."
LSE Podcasts
:The LSE seem to have had an unusually interesting speakers lately. Not sure if it's an end-of-term twist away from serious economics towards the more accessible stuff. Žižek, Clay Shirky and Andrew Ross Sorkin, all in the space of a day; what a treat!
Friday, July 2, 2010
New post
what is the ø in infinite thøught? Merely the philosophical counterpart to the Heavy Metal Umlaut? Or are we in the equally-depressing land of subtle and pointless theoretical in-jokes?
New post
mysql> select foo into outfile '/tmp/bar.txt' from sometable group by foo;
Thursday, July 1, 2010
finding and editing
grep -l foo ./* | xargs vim -p
Alternatively, to get a single-line list that can be edited and then copy-pasted to a command-line:
grep -l foo ./* | xargs echo
There are more heavy-duty ways of removing lines in output listed here, but I see little reason for using them.t
Monday, June 21, 2010
Sunday, June 20, 2010
notify-send
To display a notification on the desktop from the command-line:
# apt-get install libnotify-bin
$ notify-send "hello world"
obv. "from the command-line" really means "from a script", unless you're in some Evil Dead situation of independently-mobile hands
[reason for looking: trying to get xmonad+dmenu to notify me when I mistype a command, rather than just failing silently]
markdown + vim
Since I'm spectacularly dim, it never occured to me that I can run markdown from within vim. Select your text, run !markdown, and wham! bam! everything is replaced by its technicolor HTML twin.
keyloggers on linux
I've been trying to find (for entirely legit reasons*) a decent keylogger for linux. The pickings are surprisingly slim - as one upstart option puts it:
Novice users, however, are usually limited to a narrow set of the following tools: lkl from 2005, uberkey, which appears dead, THC-vlogger, made by a renowned group of hackers, and PyKeylogger. All these tools have their pros and cons. Lkl, for example, sometimes abnormally repeats keys and its keymap configuration is rather awkward for a range of users. Uberkey, which is just over a hundred lines of code, also often repeats keys and what is worse, it makes your mouse move abruptly, loosing any sense of control. PyKeylogger, on the other hand, while very feature rich, only works in X environment. Finally, there is vlogger, ...umm..., about which I cannot say anything specifically, only that it is receiving low score all around the web and it only logs shell sessions.
I'd add that lkl managed to crash my system within 5 minutes of using it, requireing a hard reboot to get things back up. So I'm currently deep in thinking surely it can't be *that* hard?
- reason: I find it useful to have statistics on my activity. Counting keypresses is pretty useless as a direct way of measuring productive work -- but it's a pretty good early indicator of when I'm getting too sleepy or too hyper.
Monday, June 14, 2010
Habermas and Europe — Crooked Timber
A very considerable part of Habermas’ intellectual project over the last few years has been exactly to come up with a form of patriotism which is distinct from nationalism. Habermas dubs this “constitutional patriotism” – and while it is not intended to overcome existing forms of nationalism, it is intended to temper them, and to make them non-exclusive.
& back to Henry F as himself:
he moment when (if) an actual European polity will be created, will not be the moment when European publics, led by their elites, realize that they are actually Europeans. It will be the moment at which self-interested political parties, rather than arguing and picking petty squabbles about whether ‘we’ should all be Europeans or not, start arguing and picking petty squabbles about what kind of Europeans ‘we’ should be.
Sunday, June 13, 2010
Like Washington's go-go, Baltimore Club exists as a regional sound relatively unknown outside the mid-Atlantic. The music blends the repetitive boom of house or techno with hip-hop's aggressive posturing and full-frontal frankness (one of the most popular B-More singles is DJ Booman's "Watch Out for the Big Girl"). What B-More lacks in subtlety it overpowers with shouted hooks, uncleared samples and chest-rattling bass patterns that induce dance-floor euphoria. Baltimore Club allows hip-hop heads to get their rave on.
Still can't figure out if I like bmore at all, or if it's just Donna Summer. Suspect the latter
Tuesday, June 8, 2010
Amazon CloudFront HTTPS delivery can be used to transfer inherently sensitive objects to your users, to avoid security warnings that some browsers present when viewing a mix of HTTP and HTTPS content, or for anything else that needs to be encrypted when transferred. [email from Amazon today, announcing the new service]
Yes, I know that every step along the way here is reasonable. It just feels wrong, y'know?
$ dpkg -S filename
e.g:
$ dpkg -S /usr/bin/lintian
lintian: /usr/bin/lintian
A long article in the New York Review of Books considers the growing division betwen Zionists and liberal Jews, both in Israel and the US. It touches on the diaspora politics overall, but also connects to the impact of personal experience, memory, and generational divisions:
When he probed the students’ views of Israel, he hit up against some firm beliefs. First, “they reserve the right to question the Israeli position.” These young Jews, Luntz explained, “resist anything they see as ‘group think.’” They want an “open and frank” discussion of Israel and its flaws. Second, “young Jews desperately want peace.” When Luntz showed them a series of ads, one of the most popular was entitled “Proof that Israel Wants Peace,” and listed offers by various Israeli governments to withdraw from conquered land. Third, “some empathize with the plight of the Palestinians.” When Luntz displayed ads depicting Palestinians as violent and hateful, several focus group participants criticized them as stereotypical and unfair, citing their own Muslim friends.