A quick javascript hack to fake adjusting HTML5 audio elements' timeupdate event frequency

I was trying to make a bunch of elements change position as an audio file played, using a snippet something like:

But the trouble was that the audio element's timeupdate event only fires once every 200ms or so on my browser (this is set by the HTML5 audio specification and isn't modifiable as far as I know).

200ms was slow enough that the animation of the elements looked jerky (5 fps).

Instead, I used a 10Hz setInterval clock to trigger the movement functions, and used the audio's play and pause events to create and destroy the clock:
Continue reading "A quick javascript hack to fake adjusting HTML5 audio elements' timeupdate event frequency"

Fix the Photoshop CS4 layer-dragging crash bug in Mac OS 10.8 Mountain Lion

This has been plaguing me for a while since I updated to Mac OS 10.8. Dragging layers in the layers palette of Photoshop CS4 would cause an immediate crash to desktop. Finally found a solution in this thread which worked.

Solution: turn off the OS power-saving graphics switching.

It's the checkbox at the top of the Energy Saving preference pane:

Mac OS 10.8 Energy Saving preference pane

You'll need to ensure that it's unchecked and probably restart after that.

Now I can drag layers all day long.

Goods and services

Read this old, unsurprising report in New Scientist. From the article:

Automated trading ...has come to account for more than half of trades in many markets around the globe. ...Because of the finite speed of light, trading speed depends on where you are sitting. ..."The basic insight," says Wissner-Gross, "is that the optimal location lets the trader exploit fluctuations equally on both exchanges." ..."This shows that the technological arms race to extract every penny from high-frequency mechanical arbitrage will soon reach its ultimate limits," says physicist and hedge-fund manager Jean-Philippe Bouchaud

If this is how money and the free markets work now, I'm pretty sure we no longer know what words mean.

How to remove "+1" icons from Google search results

Having apparently abandoned former principles of simplicity and unintrusiveness, Google now punishes account holders by sticking coloured icons next to every Google search result and, worse, animating them on a mouse-over of the result.  Obnoxious!  There currently seems to be no setting to remove these that I could find, but I figured a way to use AdBlock to hide them away.  If you have AdBlock installed on your browser, simply add:

to your custom filters.  There, somewhat cleaner search results!

Edit: Now you also need to add:

Edit: OK, I found another way to fix this.

Cultural Relativism and Technology

[Update: Now I am older and wiser, I don't necessarily any-longer agree with everything I wrote here, but I'm not going to delete it (yet). If you also disagree, let me know.]

I was talking to a couple of friends of mine about politics the other day. The conversation ended in a disagreement about whether or not one ought to adhere to principles of cultural relativism. That is, whether it is fair or legitimate to criticise the practices of members of another culture from the inescapable perspectives of ones own. I was arguing against cultural relativism but in the course of the discussion some arguments were raised which I hadn't considered before and which made me stop and reconsider my position.

My purpose in writing this is partially in order to get my thoughts in order and partly in the hope that the discussion can continue, 'cause it's one that interests me. I wish to wear my ignorance of many relevant topics on my sleeve and, as always, I'm completely open to the prospect of changing my mind.

My feelings were that open criticism of other cultures should be permissible. I felt that if we had carefully examined our own reasoning and motives, we ought to be allowed to criticise the practices of others, even if we understood that those practices may be the product of another culture and its historical context.
Continue reading "Cultural Relativism and Technology"

Twitter account suspended

Aw man.  I got hacked (or something) and an obviously spam message got posted in my twitter feed. Of course, I've had my account suspended, pending investigation. I should be back up within a month, according to twitter. I don't know whether the error is twitter's or mine, but needless to say every place where I used the same password as for twitter has been changed, just in case. All in all, not as painful as it might have been, I guess!