July 2010
1 post
3 tags
Vim wizardry #1
(I wrote this as a response to an Ask Hacker News post about learning Vim, but I thought it deserved a life of its own.) This is one of my favourite Vim features. Say you have the following code: do_something_with(some + long * complicated * expression) ^ Say your cursor is where the caret indicates. Typing ci) (“change inside parens”) in normal mode...
Jul 3rd
2 notes
March 2010
1 post
2 tags
Please demand debate on the Digital Economy Bill
Don’t let the Government rush draconian internet laws through Parliament before the election: write to your MP! I did. (Others in this series.) Dear Meg Hillier, Thank you for your thoughtful response of 17 December regarding the Digital Economy Bill. I appreciate your taking my concerns on board, and indicating that you shared some of them. I’m writing today...
Mar 21st
February 2010
1 post
3 tags
Feb 16th
December 2009
3 posts
3 tags
Limerick Lisp-style
In honour of the Functional Programming eXchange, on a bus to which I am writing this. (a (program (writtenp :in 'lisp)) (may 'be (and (simple) (elegant) (crisp))) (but (cry '(C pros) "too *fancy();" "for (i; simply(); &cant++ + ++see)" "{ the code; for (;;) { the parenthesis; } }")))
Dec 7th
1 tag
Dec 4th
2 tags
Dec 2nd
November 2009
3 posts
3 tags
Why the Digital Economy Bill is flawed
My MP, Meg Hillier, was kind enough to respond by post to my email about the proposed “three strikes” legislation in the UK. The main content of her response was to forward me a letter she received from Stephen Timms, the Minister for Digital Britain (his actual job title, I’m not making this up), to “clarify the Government’s position on this issue”. The...
Nov 30th
4 tags
Regex style in Ruby
Reading Patrick McKenzie’s excellent practical example of metaprogramming, I came across a line of code I didn’t understand: caller[0][/`([^']*)'/, 1] That line taught me three new things about Ruby: The syntax for the subscript operator [] allows multiple arguments. (It turns out I already knew this in another context: [1,1,2,3,5,7][2,3] => [2,3,5]) You can...
Nov 20th
6 notes
3 tags
On "three strikes": email to my MP
An email I wrote to my MP (using the very handy WriteToThem) regarding the UK Government’s so-called “three strikes” proposals to combat illegal filesharing. Dear Ms Hillier, I am writing to ask you to vote against the Government’s forthcoming Digital Economy Bill, unless the currently proposed measures to impair or disconnect without trial the internet...
Nov 17th
1 note