You are viewing [info]pozorvlak's journal

Beware of the Train [entries|archive|friends|userinfo]
pozorvlak

[ website | My Website ]
[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| My moblog Hypothetical, the place to be My (fairly feeble) website ]

Party Party party [May. 6th, 2012|11:34 pm]
[Tags|, , , ]

Yesterday, hacker-turned-Tantric-priest-turned-global-resilience-guru Vinay Gupta went on one of his better rants on Twitter. I've Storified it for your pleasure here. The gist was roughly
  1. We don't have enough resources to give everyone a Western lifestyle.
  2. Said lifestyle isn't actually very good at giving us the things which really make us happy.
  3. We do, on the other hand, have the resources to throw a truly massive party and invite everyone in the world. Drugs - especially psychedelics - require very little to produce, and sex is basically free.
My favourite tweet of the stream was "Hello, I'm the Government Minister for Dancing, Getting High and Fucking. We're going to be extending opening hours and improving quality."

It strikes me that this is a fun thought experiment. Imagine: the Party Party has just swept to power on a platform of gettin' down and boogying. You have been put in charge of the newly-created Department of Dancing, Getting High and Fucking (hereinafter DDGHF)¹. Your remit is to ensure that people who want to dance, get high and/or have sex can do so as safely as possible and with minimal impact on others. What do you do, hotshot? What policies do you implement? What targets do you set? How do you measure your department's effectiveness? How do you recruit and train new DDGHF staff, and what kind of organisational culture do you try to create?

Use more than one sheet of paper if you need.

You have a reasonable amount of freedom here: in particular, I'm not going to require that you immediately legalise all drugs. You might even want to ban some that are currently legal, though if so, please explain why your version of Prohibition won't be a disaster like all the others. However, I think we can take it as read that the Party Party's manifesto commits to at least scaling back the War on Drugs.

Bonus points: how does the new broom affect other departments? How do we manage diplomatic relations with states that are less hedonically inclined? What are the Party Party's policies on poverty, the economy, defence and climate change?

I guess I should give my answer )

Edit: LJ seems to silently fail to post comments that are above a certain length, which is very irritating of it. Sorry about that! If your answer is too long, perhaps you could post it on your own blog and post a link to it here? Or split it up into multiple comments, of course.

¹ Only one Cabinet post for all three? I hear you ask. That's joined-up government for you. Feel free to create as many junior ministers as you think are merited.
link27 comments|post comment

Fixing the "blank page" problem in Wordpress [Apr. 7th, 2012|12:20 am]
[Tags|, , , ]

I've been doing some work with Wordpress off and on for the last couple of weeks - migrating a site that uses a custom CMS onto a Wordpress installation - and a couple of times I've run into the following vexing problem when setting up a local Wordpress installation for testing. I couldn't find anything about it on the web, and it took me several hours to debug, so here's a writeup in case someone else has the same problem.

Steps to reproduce: install Wordpress 3.0.5 (as provided by Ubuntu). Using the command-line mysql client, load in a database dump from a Wordpress 3.3.1 site. Visit http://localhost/wordpress (or wherever you've got it installed).

Symptoms: instead of your deathless prose, you see an entirely blank browser window. HTTP headers are sent correctly, but no page content is produced. However, http://localhost/wordpress/wp-admin is displayed correctly, and all your content is in the database.

What's actually going on: Wordpress has decided that the TwentyTen theme is broken, so it's reverting to the default theme. It is hence looking for a theme called "Wordpress Default". But the default theme is actually just called "Default". So it doesn't find a theme, and, since display is handled by the theme files, nothing gets displayed.

How to fix it: go into the admin interface, and select Appearance->Themes. Change the theme to "Default". Your blog is now visible again!

If you wish, you can now change the theme back to TwentyTen: it turns out that it's not actually broken at all.

Thanks to Konstantin Kovshenin for suggesting I turn WP_DEBUG to true in wp-config.php. This allowed me to eventually track down the problem (though, annoyingly, the "theme not found" error was only displayed on the admin page, so I didn't see it for a while).

Next question: this is clearly a bug, but it's a bug in a superseded version. Where should I report it?

Edit: on further thought, I think this may be more to do with the site whose dump I was loading in using a theme that I don't have installed. In which case, the bug may well affect the latest version of Wordpress. But I haven't yet proved this to my satisfaction.
linkpost comment

Please sponsor me! [Mar. 1st, 2012|11:01 pm]
[Tags|, , , ]

You may recall that one of my New Year's Resolutions was to enter and complete the half-marathon event at the Meadows Marathon. Well, I entered it! Now I just have to actually run the thing. This Sunday, to be precise. I've pounded enough cold pavements over the last three months that I'm fairly confident of finishing, though I've no idea whether I'll finish within my target of two hours.

In keeping with the spirit of the event, I'm trying to raise money for the Against Malaria Foundation, who are one of GiveWell.org's two top-rated charities in terms of misery alleviated per dollar donated. It is, in other words, a very good cause. Please sponsor me!.

Edit: I completed the race in 1 hour and 37 minutes, despite being hailed on for the last 1.5 laps. Better than that, though, was my friends' generosity: together, they donated over £400 to the Against Malaria Foundation.
linkpost comment

Andrew Greig on training [Feb. 11th, 2012|03:43 pm]
[Tags|, , , , ]

It was often uncomfortable, often painful, particularly for the first month, but other days were pure joy, a revelling in the sensation of movement, of strength and wellbeing. My regular headaches stopped. For the first time ever, I got through winter without even a cold. I felt incredibly well, began to walk and hold myself differently. When friends asked "How are you?", instead of the normal Scottish "Oh, not too bad," I'd find myself saying "Extremely well!"

How obnoxious.

On other days training was pure slog, the body protesting and the will feeble. The mind could see little point in getting up before breakfast to run on a cold, dark morning, and none at all in continuing when it began to hurt. Take a break, why not have a breather, why not run for home now?

It is at times like that that the real work is done. It's easy to keep going when you feel strong and good. Anyone can do that. But at altitude it is going to feel horrible most of the time - and that's what you're really training for. So keep on running, through the pain and the reluctance. Do you really expect to get through this Expedition - this relationship, this book, this life for that matter - without some of the old blood, sweat and tears? No chance. That's part of the point of it all. So keep on running...

The real purpose of training is not so much hardening the body as toughening the will. Enthusiasm may get you started, bodily strength may keep you going for a long time, but only the will makes you persist when those have faded. And stubborn pride. Pride and the will, with its overtones of fascism and suppression, have long been suspect qualities - the latter so much so that I'd doubted its existence. But it does exist, I could feel it gathering and bunching inside me as the months passed. There were times when it alone got me up and running, or kept me from whinging and retreating off a Scottish route. The will is the secret motor that keeps driving when the heart and the mind have had enough.

[From Summit Fever.]
linkpost comment

The games kittens play [Feb. 6th, 2012|11:48 pm]
[Tags|, , ]

The Ball Game

This game is a particular favourite of Josie, but Haggis finds it boring. The kitten takes a ball (usually one made of silver foil), and bats it around with its paws and carries it around in its mouth. The game has a very complicated scoring scheme which we haven't worked out yet, and ends when the kitten gets bored.

This game has a variant called Fetch, recently independently reinvented by Josie. We are, as you can imagine, unreasonably proud of her.

The "It's My $object, Get Your Own" Game

This is a game for two kittens. One claims possession of an object of some sort and then growls threateningly at the other whenever they come near. This is often combined with...

The Sponge-Hunting Game

A favourite of Haggis. The normal habitats of the Common Sponge are the kitchen sink and the cupboard under same. Haggis waits patiently for the appearance of an unguarded Sponge, and then grabs it, drags it all over the flat, and finally disembowels it on the living-room carpet, all while growling deeply. Finally he garlands his tail with pieces of the Sponge's entrails, as befits a mighty hunter such as himself.

The Red Dot Game

The Red Dot Game starts with the bipeds crashing around the flat, uttering ritual cries of "where the bloody hell have you hidden the laser pointer?" This stage is very important for Building Anticipation.

Once the initial phase is over, the Mysterious Red Dot appears! The cats then chase the Mysterious Red Dot around the flat. This used to be a very high-energy affair, with the kittens leaping up walls and chasing round and round (and round and round and round) the living-room carpet to get the MRD; it has now evolved into a more strategic game, with the cats sneaking up on the MRD using all available cover before suddenly pouncing on it.

The Wall Game

A variant on the Red Dot Game, to be played during the summer months. The MRD is replaced by the reflection of my smartphone on the bedroom wall as I attempt to check my email before getting out of bed. Josie in particular can attain impressive heights while leaping to grab it.

The Fly-Catching Game

When a fly is sighted, the hunt is on! Points are awarded for catching and eating the fly, but also for knocking over ornaments while chasing after it. Anything belonging to the landlady scores double.

The Climbing Game

As befits natives of Skye, the kittens loves to climb things¹. Haggis is undoubtedly the stronger climber, having made the dramatic first ascent of Bookshelf Route (K6c) in the living room. Josie's no slouch, though, with the FA of the closet testpiece Warm Jumper Shelf (K6b+) to her credit. Both kittens eschew the standard training paraphernalia of campus- and finger-boards in favour of a 3m tall cat tree covered in sisal. They also exclusively climb solo and barefoot; not for them the ethical grey areas of headpointing or piton use!

Haggis is a promising drytooler, too, having completed the bold Wormwood Pearl's Leg Route.

Haggis's current project is the futuristic Boiler Roof Continuation in the kitchen; the line follows the standard Fridge Route onto the summit of the Crockery Cupboard, then continues it via a massive dyno over the kitchen sink onto the top of the boiler. From there a tricky and exposed dyno should lead to the long-awaited FA of the Catfood Shelf. His previous attempts to reach the Catfood Shelf via the Ornament Shelf below have always failed at the crux roof move from the Ornament Shelf onto the Catfood Shelf; the line is rarely in condition, depending as it does on the seasonal drift of the Kitchen Table.

When Haggis finally completes his project (no doubt celebrating with his trademark Sending Yowl), you can be sure it will be extensively covered in the climbing press.


Haggis chillaxes on his portaledge.

The Tummy-Tickling Game

This is a game for one kitten and one biped. The kitten lies on its back, as if to say "Look! I have a tummy!" The biped must say "Yes! You have a tummy!" and then start tickling it.

The kitten may eventually get bored of this and walk away. Possibly.

The False Tummy-Tickling Game

This is a game for one kitten (who we may without loss of generality call "Haggis") and one biped. Haggis lies on his back, as if to say "Look! I have a tummy!". The biped, assuming that Haggis is playing the Tummy-Tickling Game, will start to tickle it. Whereupon Haggis says "And I also have TEETH AND CLAWS!!!!" and start using them on the unsuspecting biped's hand.

Thick gloves are advisable if you want to play this game for any length of time. Alternatively, it is possible to distract Haggis with a chewable watch-strap.

Watching KTTV

The cats love to watch KTTV (the view out of the kitchen window). They also love its affiliate station KTTV-2 (the view out of the bedroom window), which shows nature documentaries. They particularly like documentaries which involve BIRDS. Their favourite is to watch KTTV in HD, by climbing onto the windowframe when the window is open. This leads us to a new game which Haggis has recently invented:

The Scare The Crap Out Of The Bipeds By Climbing Out Onto The Windowsill Game

Self-explanatory.

¹ If you recognised the title of this post as a nod to Lito Tejeda-Flores' classic essay The Games Climbers Play, you're absolutely right.

link4 comments|post comment

What I learned on my winter climbing course [Feb. 6th, 2012|10:17 pm]
[Tags|, , , ]

"Would you like some money towards another Glenmore Lodge course for Christmas?" said my Dad, some time in December. I thought about last year's course for about half a second and said "Yes please!". This time I signed up for the five-day winter lead climbing course, and had five fantastic days climbing: Wednesday in particular was one of the best days I've ever had in the mountains.

Below are some of the things I learned. Usual rules apply: I am not a qualified mountain guide, and these notes may contain errors. Use your own judgement.

Read more... )


Fiacaill Buttress, taken after we climbed Jacob's Right Edge on Wednesday.

More and larger photos here.

link5 comments|post comment

SOPA/PIPA [Jan. 18th, 2012|11:44 am]
As you've probably noticed, many prominent websites (like Wikipedia, Reddit, BoingBoing, XKCD...) have gone dark today in protest against the Stop Online Piracy Act and its Senate cousin, the Protect IP Act. If either of these passes, it will seriously impact the ability of any US website (defined in very broad, not to say insane ways) to host user-submitted content, permanently screwing up the democratic Internet that we've come to know and mostly love.

[Incidentally, note how I didn't have any links in the above paragraph? That was deliberate. No point, today. Or afterwards, if SOPA/PIPA passes.]

Wikipedia's blackout is particularly clever, since it's just a shallow CSS hack - determined and knowledgeable people can still get the information. Just as determined and knowledgeable people will still be able to access copyright-infringing content after SOPA/PIPA.

After I submit this and post the customary Twitter announcement, I'll be going dark in solidarity with these sites. No LiveJournal, Facebook or Twitter updates; no GitHub pushes. No scab I. Your usual service of cat pictures and programming rants will return after 8pm EST. Meanwhile, please read the following:

A Technical Examination of SOPA and PIPA by Jason Harvey, one of the Reddit admins (note that this is a fairly detailed look at the bills, but doesn't require much technical knowledge of Internet architecture)
SOPA: Why Do We Have To Break The DNS? (more technical)

and, if you're American, please consider contacting your elected representatives and asking them to stop these awful bills.
link1 comment|post comment

New Year's Resolutions [Jan. 3rd, 2012|12:58 am]
[Tags|, , , , , , , , ]

I don't normally make New Year's resolutions, but what the hell.

1. Start tracking my weight and calorie intake again, and get my weight back down to a level where I'm comfortable. This morning it was 12st 1.9 - not terribly high in the scheme of things, but it's almost as high as it was when I first started dieting (though I think a bit more of it may be muscle now) and it's definitely high enough to negatively impact my sense of well-being.

What went wrong? Well, I'm gonna quote from Hyperbole and a Half: "trying to use willpower to overcome the apathetic sort of sadness that accompanies depression is like a person with no arms trying to punch themselves until their hands grow back. A fundamental component of the plan is missing and it isn't going to work." A scheme for weight loss that depends on willpower is similarly doomed if you're too depressed to stick to it. So this time I'm going to try to make changes to my eating habits that require less willpower. Any suggestions would be most welcome.

2. Start making (and testing!) regular backups of my data. I lost several years of mountain photographs last year when the external hard drive I was keeping them on died: I don't want that to happen again.

3. Get my Gmail account down to Inbox Zero and keep it there. It's currently at Inbox 1713, most of which is junk, but it's just *easier* to deal with an empty inbox, and not have to re-scan the same old things to look for the interesting new stuff.

I have a few more Ambitious Plans, but they don't really count as resolutions:

1. Do some more Stanford online courses. I'm currently signed up to Human-Computer Interaction, Design and Analysis of Algorithms, Software Engineering for Software as a Service, and Information Theory. Fortunately they don't all run concurrently!

[BTW, they're not all computing courses: [info]wormwood_pearl is signed up to Designing Green Buildings, for instance.]

2. Enter (and complete!) the Meadows Half-Marathon in March. I started training for this back in December, but then I got ill and Christmas happened, so today was my first run for a while and it wasn't much fun. Never mind; I've got time to get back on course.

3. If that goes well, enter (and, ideally, complete...) the Lowe Alpine Mountain Marathon. As I understand things, it's basically two 20km-ish fell runs back-to-back, with a night camping in between. Oh, and you have to carry all your camping kit with you. In the high classes people do the whole thing at a run, but in the lower classes (which I'd be entering) there's apparently a bit more run/walk/run going on. Philipp and I did nearly 40km in one day on the South Glen Shiel ridge in November, and then went for another hike the next day, so I should be able to at least cover the distance. Providing I don't get too badly lost, of course :-)



The only way to progress in anything. The trick, of course, is not biting off enough to cause you damage.
link8 comments|post comment

(no subject) [Dec. 29th, 2011|12:08 pm]
[Tags|, , ]

I've been writing some Perl code recently, and a couple of ideas have occurred to me.
  1. Closures are great when you have several behaviours which can all vary independently; objects are great when you have several behaviours that must all vary in sync with one another. Put another way: if your problem is combinatorial explosion of objects, try using closures instead; if your problem is ensuring consistency among different behaviours, try grouping them into objects. Languages like Perl make it relatively easy to do either, so use the best tool for the job. The trick is to spot that you're using the wrong representation before you either create a kajillion Strategy classes or knock together a half-arsed object system out of hashes of closures.
  2. In the correct quantity, housekeeping tasks can be your friends. By "housekeeping tasks" I mean tasks that don't directly contribute to solving the problem at hand, but which still add some value. An example from yesterday was converting a small class hierarchy to use the Moose object system. Other examples might be writing per-method documentation, cleaning up your version control history, and minor refactorings. If there's too much of this stuff to do, it can get dispiriting - you want to be solving the problem, not mucking about with trivia! But if there's not too much, it can be helpful: you have something to do while you're stuck on the main problem, and the housekeeping work is close enough to the main problem that it stays in your brain's L2 cache, where a background process can work away at it. If you're so stuck that you literally can't make any progress, your choices are (a) think very very hard and get depressed, (b) go and do something totally different, in the process forgetting lots of important details. I find both of these to be less productive.

[If you're interested, my code is of course on GitHub: some fixes to the CPAN module List::Priority, and some code for benchmarking all the priority queues on CPAN. Any suggestions or patches would be very welcome!]
link3 comments|post comment

(no subject) [Nov. 2nd, 2011|05:18 pm]
[Tags|, , , , , , ]

I was pleasantly astonished to see Peter Norvig comment on my recent post about the Stanford online courses - with 160,000 students competing for his attention, that's dedication! I completely take his point that I'm only a small part of the intended audience, and what works best for me is probably not what works best for the students they really want to reach.

Nevertheless, the course has sped up in the last couple of weeks to the point where I'm finding it pleasantly stretching. Today I tweeted:
I take it back: #aiclass is covering the Oxford 1st-year logic course in <1wk. The good bits of the syllabus, anyway :-)
I want to expand on that remark a bit. There were actually three first-year Oxford logic courses:
  • "Introduction to Symbolic Logic", taught in the first term to all Philosophy students (including those like me who were studying Maths and Philosophy), and also a few others like Classics students. This covered propositional logic, first-order predicate logic, proof tableaux, and endless pointless arguments about the precise meaning of the word "the" and whether or not the symbol → accurately captures the meaning of the English word "if". This is the course I was talking about on Twitter. I found it unbearably slow-paced, but I remember a couple of folk who'd given up maths years before and couldn't handle being asked to do algebra again. "The alarm is sounding and Mary called" was fine, but "A & M" was apparently unintelligible to them.

    According to a legend which was told to me by the Warden of New College and is thus of unquestionable veracity, a class of ItSL students were once sent to the Wykeham Professor of Logic's graduate-level logic seminar due to a scheduling error. The WPoL walked in, saw the expected roomful of youngsters, and started "Let L be a language recursively defined over an alphabet X..." The poor undergrads, still in their first week (and quite possibly at their first class) of their undergraduate careers, must have started to entertain grave doubts about their ability to handle this "Oxford" place. When the WPoL was eventually informed of the mistake, he is supposed to have meditatively said "I thought they seemed rather ill-prepared..."

  • "Elements of Deductive Logic", taught in the second term to those studying (Maths|Physics) and Philosophy. This bumped the mathematical content up a notch, covering (for instance) completeness and consistency theorems for the languages that had been introduced in ItSL. There was also a rather handwavy treatment of modal logic, and lots more philosophical wrangling about what it all meant and how relevant it was to the broader philosophical project. This was one of the most intense courses I did in my four years as an undergrad.

  • There was an introduction to symbolic logic buried somewhere in the first-year computer science course - without the philosophy, I'm assuming.
Maths students were expected to pick the basics of logic up in the course of learning real analysis, as is traditional.

I always thought they'd have been better splitting ItSL and EoDL into two more evenly-sized courses - perhaps one heavily mathematical one, to be shared with the CS students (and perhaps incorporating some digital electronics), followed by a purely philosophical one to be taken by the (Maths|Physics) & Philosophy students. Meanwhile the algebra-phobes could do a single course more tailored to their level. I'm guessing that resource availability ruled this idea out, though.

There was also a two-term second-year maths course called "b1 Foundations", which was set theory, logic (up to, IIRC, the Löwenheim–Skolem theorem and Skolem's paradox) and some computability theory. This was compulsory for Maths & Philosophy students, but I didn't take it because I'd given up philosophy by then and was sick of the whole thing. In light of my subsequent career, this was probably a bad decision.
link10 comments|post comment

navigation
[ viewing | most recent entries ]
[ go | earlier ]