Friday, August 21, 2009

VMWare mouse pointer integration

I've been playing a lot with virtual machines recently, and I intend to write about my experiences and why I wanted to do this another time. For now, here is a small practical tip. All of the main virtual machine packages (VirtualPC, VMWare and VirtualBox) provide mouse pointer integration, which means when the mouse leaves the window of the guest system, it continues seamlessly into the host system. Sometimes this is not what you want, e.g. if the guest system is running software that uses the fact that the mouse has reached the edge of the screen. Some 3D software, including games, makes use of this fact to pan the image. For VirtualPC and VirtualBox, it's easy to turn this off. For VMWare, it is much harder. Some people say that you can add the line vmmouse.present="FALSE" to the configuration (.vmx) file, or to not install the VMWare mouse driver. Neither worked when I tried. What does work is to disable the VMTools service if you have it running. On Windows 2000, you can do this by going to services in the administrative tools (or running services.msc) and stopping or disabling the service. Then the mouse pointer integration will stop as well, at the cost of losing some things like the shared folder functionality.

I know this will be all mumbo-jumbo to most people, but I couldn't find it said explicitly anywhere else, and perhaps it'll help someone out there on the web. Leave me a comment if it does.

Sunday, August 02, 2009

Virtual PC, Vista and Ubuntu

Microsoft have a free download of Virtual PC 2007, which allows you to run virtual machines on your PC. I think it's going to be a standard feature in Windows 7. I have Vista Home Premium, and the installer tells you that it won't work (it says it's only for higher-end versions of Vista), but if you just let it go through the installation, it seems to be OK.

I had an old copy of Win 2k, so I made a guest OS (i.e. an OS running in a virtual machine), and that worked fine. One useful trick to remember is that if the mouse gets stuck in the virtual machine window, press the right hand Alt key to get it back. So next I decided to try installing Linux as guest OS. There is a blog posting which gives some instructions, but unfortunately it didn't work. With Ubuntu 8.04, a dialogue box popped up with an error; with 8.10 and 9.04, I got a stack trace. Fortunately I found another posting with a solution. The key thing seems to be to add noreplace-paravirt and vga=791 to the command line at various stages. The exact way you do this isn't always as described in the posting, at least for 9.04, but otherwise following these instructions seems to work. The only thing that I've not been able to get to work yet is changing the screen resolution to greater than 800x600. There are instructions linked from the second posting, but they didn't work for me.

Why do it? Well, mostly because I can. Occasionally, though, it is useful to run some things under Linux without having to reboot into it.

(Later) After much searching, I found yet another blog post which contains instructions for changing the monitor resolution. This worked!

Sunday, June 21, 2009

Dell Studio Keeps Waking Up

I'll post this on the off chance someone else has the same problem and it helps to fix it. My Dell Studio 540 started refusing to sleep, or more exactly when I set it to sleep, it immediately woke up again. The powercfg utility and the System event log didn't give any useful information. What fixed this was doing to the driver settings (in Device Manager) for the Dell 1505 WLAN card and changing Wake-Up Mode to None. I had hunted around on the Web and not found anything that mentioned this, though there are many other possible solutions for similar problems. I did have an old driver (4.170.25.17 from 2007) and I have since updated it from the Dell web site, so maybe this would also fix it.

Friday, June 19, 2009

Perhaps everyone on the web has already seen this, but it was new to me. Men in long black robes, riding on Segways, with flaming headdresses, playing music by Philip Glass. A combination of any two of these features would have been amusing, three entertaining, and all four together is just wonderful. They also do Michael Nyman and Mike Oldfield.

Friday, May 22, 2009

The Guardian has a great example of the kind of article I almost never see in US newspapers, namely a discussion of the philosophical nature of Pringles, as compared to potatoes, with reference to Aristotle, Plato, Kripke, Sartre and Wittgenstein. I especially like this remark:
Sartre, for instance, argued that plants and animals may have fixed essences, but for humans, "existence precedes essence". We can choose what our essences are, potatoes can't.

Saturday, May 02, 2009

Using robocopy on Vista

For a while I've been using robocopy as my Windows backup utility. It's included in Vista, and you can download it for other versions as part of the Windows 2003 server resource kit. It has oodles of command line parameters, and I have it set up so that it copies files incrementally from my local disk to an external one, and also deletes files from the external disk they were copied on a previous occasion but have now been deleted from the local disk. The command line I used was this:

robocopy "c:\Documents and Settings" "e:\Backup\David\Documents and Settings" /R:0 /W:0 /MIR /PURGE /TEE /LOG+:e:\David.log /XD "Temporary Internet Files"

On Vista, I first tried this:

robocopy c:\Users\David %CD%\Backup\David\David /R:0 /W:0 /MIR /PURGE /TEE /LOG:%CD%\David.log

(This is run from the root of the external disk, hence the %CD%).
It doesn't quite work. It creates a deeper and deeper recursive tree for AppData. I think this is because there are some hidden shortcuts and symbolic links. You also get duplicate copies of some files under the Vista Documents folder, which has a secret shortcut from My Documents. So I now use:

robocopy c:\Users\David %CD%\Backup\David\David /R:0 /W:0 /MIR /PURGE /TEE /LOG:%CD%\David.log /SL /XJ /XA:ST

and this seems to do better. /SL doesn't follow symlinks (like tar), /XJ excludes join points (probably not needed). Critically /XA:ST doesn't backup system or temporary files, which seems to be the cause of most of the problems.

Sunday, April 19, 2009

Sunday, April 05, 2009

I had a dream this week, in which I was eating lunch at the Googleplex. It was in the cafeteria on the ground floor of building 42. I looked out the window and there was a giant mechanical cow flying upside down far off in the sky. It got closer and closer and closer and finally burst through the big glass wall of the cafeteria, which shattered into tiny pieces. No-one was hurt, and it turned out this was an entertainment laid on by Larry and Sergey, and they didn't mind the cost of replacing the glass as keeping Googlers happy was more important than profits. And it was only when I woke up that I realized what was so strange about this dream: there is no cafeteria in building 42.

Saturday, March 28, 2009

OK, this probably won't mean anything to my American friends, and my British ones are likely to have already heard of it. I simply couldn't let such an outstanding cultural advance go unremarked. At last, the doner kebab pot noodle. Truly these are the end times.

Saturday, March 21, 2009

I've liked Werner Herzog's films since I saw Aguirre, Wrath of God in the early 1980s. In many ways, I think he's done better work in documentaries of recent years than in his feature films. One in particular I like is Wings of Hope, about a woman who survived falling several thousand feet from a crashing plane into the Amazon jungle. The mock-mockumentary Incident At Loch Ness is also fun.

A metafilter posting this week pointed me towards what claims to be a blog by Herzog written between April and December 2007. I have no way of knowing whether it is really anything to do with him, though I can imagine every entry read in his voice. Two of the last postings, about mice spitting at god and about how to react to tiny people, are examples of what appeals to me about it. Oh, and this one, about not tipping a waiter who says he enjoys his job. They have the same charm as some of Richard Brautigan's stories (particularly the ones in Trout Fishing In America), and to a lesser degree those of Donald Barthelme. They tell a story about a fragment of the world, like the shards that are left over when a gemstone is cut.

Sunday, March 15, 2009

A few pictures from agility

One of the people in the agility class I do with Dylan took some pictures a couple of weeks back. I rather like this one:


It might be subtitled something like "Dylan at a gentle stroll while David tries to keep up".

A couple more:




Oh, and this one. Why are Dylan's cheeks bulging? Because he's just about to make the particular sort of woof that means "give me treats now!".

Sunday, March 08, 2009

A notation

Now and again I borrow a book from the library to find that a previous borrower has added their own annotations to the text, usually to correct some kind of perceived error. It's a little puzzling why people do this; neither the author nor the publisher is ever likely to see the annotations (assuming that authors don't tour public libraries sneakily taking a look at their works), and to other readers, it's just a distraction. I suppose in the heat of that form of Tourette's syndrome known as Grammatical Correctness Obsession Disorder, it's hard to resist. It can happen even in the most elevated circles, as the Cambridge UL's page on marginalia and other crimes shows.

What would be even more obsessive than adding such annotations is someone going through them and critiquing them. So how could I resist? If you are the person who made comments on Hart and Boot by Tim Pratt in the paperback copy from Santa Monica Public Library, this is for you.
  1. On page 58, you corrected the possessive of Doug from Doug's to Dougs's, presumably becuase it is modifying a plural (messages). This is incorrect. Dougs's would be the possessive of Dougs. You can see examples of the correct usage, Doug's, in Quirk, Greenbaum, Leech and Svartvik's A Grammar Of Contemporary English, section 4.101.
  2. On the same page, you corrected She hated making people wait on her to ...for her. It's marginal, but here I think I agree.
  3. On page 73, you removed the comma in a light, unreasonable rain. Wrong!
  4. You changed people go missing all the time on page 94 to people are missing all the time. Not only wrong, but it changes the meaning.
  5. Somewhere (I didn't note it), you missed a typographical error where too appears as to0.
  6. On page 105, you changed unself-consciousness to un-selfconsciousness. I prefer your version.
  7. On page 150, you noted the oddness of his noble face crouched in thought. Yes, it's odd, though no worse than rain being unreasonable on page 73 which you minded less than the comma.
  8. Page 162 has a change from different than to different from. I fart on this one. Lots of people say different than is incorrect, including the odious Strunk. It's totally comprehensible, and that seems sufficient.
  9. Page 187, one of the small pleasures available to we bodiless ones, change to us bodiless ones. Oh, I dunno. I like the original better.
  10. Page 205, and here we reach the last and most glorious of your annotations. A character knows as The Regent refers to another character, Wisp, by name. The annotations says: but cf. p.185, last para, 1st line. It is beautiful that you tell us where to look, but not what the error is, thus engaging our own scholarship. The line cited is My name is not Wisp, but that is what zie calls me. Zie here is a made up pronoun and refers to Howlaa, who is not the regent. So presumably this comment is meant to indicate an inconsistency, that it is only Howlaa calls the narrator Wisp. However, there was a scene on page 192 in which The Regent, Howlaa and Wisp are talking to each other, and Howlaa uses the name Wisp. Hence it's reasonable that The Regent now also knows to call the narrator Wisp. So close, but so far.
Anyway, it's thoughts like this that have made me who I am today.

Sunday, March 01, 2009

The Los Angeles Department of Water and Power organizes a pickup for electronic and hazardous waste. They set it up at different locations each month. This weekend it was near to us, and so I uses the opportunity to get rid of some non-functional computers, printers and monitors, as well as lots of out of date medicines. It's very well organized: you drive up and stop on a large plastic sheet, and a team of people wearing protective gear come by and take all the stuff you're dumping. As well as being safe, this also make it fast and efficient. The whole collection was over in about a minute. I imagine that if they had you unload the stuff yourself, as well as being slower, the place would be full of geeks looking to plunder old bits of kit, and, I dunno, junkies looking for tasty drugs.

The medicines disposal is a difference between here and the UK. In Britain, you can take old medicines to any pharmacy, and they will safely dispose of them. Here, the pharmacies will sell you the drugs, and that's the end of their responsibilities. Citizenship and capitalism don't rest well together, I suppose.

Two things I didn't include were an old digital camera and and old flatbed scanner. They both work, but I've replaced them with better ones. Besides giving them away, I've been wondering what I can do with them. I read articles on the web suggesting things like turning the camera into an infra-red camera, by removing the IR filter from the sensor and putting a piece of black film over it instead; and using the scanner as a back for a large format camera to make really high-res pictures. Suggestions (on a postcard) welcome.

Sunday, February 15, 2009

One of the nice things about blogs is that you can remark on books you are reading without having to even pretend it's anything like a real review. So you can pick out odd little points of interest, and make completely petty digs, as the accident will.

Recently, I've been reading Austerity Britain 1945-1951 by David Kynaston. It got an excellent review in Atlantic Monthly. The book is the first part of a social history of Britain which will eventually cover 1945-1979. Although it does make reference to Big History, most of it draws on personal accounts such as diaries and memoirs and the records made by Mass Observation. Quite a few of the sources are from biographies of well-known people, and their names are simply dropped into the narrative without explaining who they are. It's just assumed that you know enough to British culture to understand. My favourite example of this is in a section talking about the role of high street banks around 1950, which contains this remark:
George Mainwaring, that pillar-of-the-community bank manager at Walmington-on-Sea by now approaching retirement, would no doubt have nodded sagely.
The thing which is wonderful about this is that it doesn't explain who George Mainwaring it. Almost anyone of my age, plus or minus 20 or more years, instantly know that he is a fictional character from a sitcom, Dad's Army. It was made in the 1960s and 70s, but set during the second world war, and Captain Mainwaring was stuffy and opinionated bank manager. So this remark reinforces the tone of the quotation that preceded it because you've seen that program so many time that you can instantly picture him expressing his opinions. Without this explanation, the reader will probably skip this sentence and move on, no harm done. If Kynaston had stopped to explain, his book would have been a leaden mess, and probably twice as long as it is.

When I was checking this, I noticed a wonderfully gnomic line a paragraph later, in which some aphorisms from a stockbroker are quoted as illustrations of his gentlemanly code: "shoes have laces", "motor cars are black", "jelly is not officer food". Funny, I always though it was. Well, not the green jelly, but other kinds.

Scarlett Thomas's novel The End Of Mr. Y is my other current read. It's a book which is almost good, but spoilt by too many long lumps of philosophical explanations, usually in the form of little lectures from one character to another. Well, most of the main characters are supposed to be PhD student or academics, so I suppose it's not all that unrealistic. These discourses are interesting, but there's only so many of them you can hope to get away with in a novel, and N for this novel is greater than so. It's as if the book wants to bend your mind, but can't quite decide in which direction. If the author is anything like the protagonist, then she's a fan of Derrida, and though I have never read any Derrida, language log has given me all the fuel I need to have an irrational contempt for his thought. And, I'm sorry, but the only legitimate reaction to a sentence like Monday morning, and the sky is the colour of sad weddings is a long and loud farty noise.

An update. When I wrote this I hadn't quite finished The End Of Mr Y. Now I have, and (without giving away the ending), I think the author should be ashamed of herself. She uses a twist which belongs to 1950s pulp sf stories, as was hokey even then.

Saturday, February 07, 2009

Love On Four Paws

This week Ellen and I withdrew from Love on 4 Paws, an organization we've been volunteering with for the last 15 months. We were taking our dog, Dylan, to hospitals to do animal assisted therapy, which mostly means visiting patients to cheer them up and give them a brief break from the tedium and stress of being in hospital. The organization is run with careful and constructive discipline by a woman called Suni and her team leaders and coaches. Before you start, the dog passes a "canine good citizen" test and is checked out to see how he reacts in various situations, such as having a lot of people milling round making noise. For the handlers, there's a lot more training in the hospital procedures and the legal requirements.

The first hospital you visit is Shriner's hospital for children (all the locations are in LA). Shriner's is a relatively easy environment to work in, but even so the first few visits were hard work: as well as looking after the dog and setting him up to interact with the patients, there are many hospital protocols to follow. Mostly they are to do with hygiene, such as washing your hands on entering a room, but there are others too. For example, you usually take a picture of the patient with the dog using a Polaroid camera. Occasionally, one picture doesn't come out well, and so you take another, and then you have to remember to hand them all to the patient, or destroy the extra ones, as taking the picture away would break the HIPAA confidentiality rules.

The big step comes when you move to Children's Hospital of LA. Whereas Shriner's is mostly orthopaedic and clinic patients, CHLA has many patients who are very sick with cancer or other serious illnesses. As well as making it a more highly charged environment emotionally, it means the protocols you have to follow are much stricter: no entering certain rooms where a patient is in isolation, wash hands on entry, wipe patient's hands, put an extra sheet on the bed before the dog gets up, wipe patient's hands afterwards, fold up the sheet from the corners inwards... At the end of the first few visits, we were totally wrung out. I also kept making mistakes such as leaving my bag of supplies behind in one patient's room after the visit, then having to try to figure out which room I had last visited to go back and get it. Over time, it got easier, though. In the middle of 2008, we also started visiting St John's, a hospital for adults. The visits are of a different sort there: you tend to spend longer with each patient and see fewer of them. Sometimes in CHLA, the visit is really just a quick snuggle with the dog, a picture, and move on.

With all the training that we as handlers do, there is no training for the dog. Over time, Dylan worked out what he was supposed to do, and for a while seemed to consider it his job. But in the last few weeks, he was getting more and more reluctant to do the visits and at the end was scarcely engaging with the patients. We had said from the start that if we thought he didn't want to do the visiting, we would stop. He seemed to telling us that he didn't want to be there any more, and after a visit to St John's last weekend, we made the decision to stop visiting and leave the organization.

I feel sad about this. It's easy to think that your work matters or that by giving to a charity or participating in a campaigning group that you are changing the world. It's a different thing when you have this direct personal involvement. I saw situations where having a visit from the dog got through to someone who was in distress and pain, and provided them with a moment of respite or happiness. When that happens for a child, it also often helps the parent, a moment of normality in a turbulent time. The medical staff sometimes benefit from a minute or two with dog as well. Even the man who runs the valet parking at one of the hospitals was always happy to see Dylan.

Dylan is quite a shy dog. When he decided he is your friend, he loves you wholeheartedly, but it takes a long time to get there. Other dogs I saw had a temperament that was better suited. Think of your archetypal golden retriever who loves everyone, for example. Calmness is another quality that works well, and that is something that Dylan has once the shyness is out of the way. I saw many skillful handlers too, who have some magic that creates just the right interaction between the dog and the patient.

I'll miss the friends I made in LO4P, and I'll remember the way that at CHLA we all ended by gathering in a ward that had a sun-trap glass roof, resting for a moment after the work we'd done, before setting off on the "dog parade", all the dogs and handlers leaving the ward together.

Saturday, January 31, 2009

It came apart in me hands, honest

Someone broke Google. Then they fixed it. It wasn't me, I swear. Though a colleague did greet me a few weeks back by saying he had brought down YouTube for 15 minutes that day. On the one hand, oops, but on the others, it's kinda cool to have the power to do it.

Friday, January 23, 2009

More exciting than I would like

Well, we just had a magnitude 3.4 earthquake centered only about half a mile away. It's not the biggest earthquake since we've been living here - there was a 5.2 a bit further away last year - but because it was so close, it felt much more intense. There was probably 10 seconds or rough shaking, compared to 3 or 4 seconds of rolling in the 5.2, just long enough to be scary, especially for the dog.

My first instinct in an earthquake is not to get outside or check for damage. Oh no: it's to go the USGS web site to see where it was and how powerful. And I'm not alone, as several people on the neighborhood mailing list and on local blogs have already posted links to the report: http://quake.usgs.gov/recenteqs/Quakes/ci10373093.htm.

Saturday, January 10, 2009

Yodallings

I have an idea for a blog post which I don't have the skill to execute. So I'll write the bare bones of it here, and then it'll be almost as if I wrote it without actually having to do the work.

Flann O'Brien, when writing as Myles na gCopaleen, published some pieces in the Irish Times which appear to be in Irish, but if read phonetically turn out to be in heavily accented English. For example, one short piece starts
Aigh nó a mean thú ios só léasaigh dat thí slíps in this clós, bhears a bíord, and dos not smóc bíocós obh de trobal obh straigeing a meaits.
which reads as
I know a man who is so lazy that he sleeps in his clothes, wears a beard, and does not smoke because of the trouble of striking a match.
I wanted to put this together with the idea that Japanese uses different orthographies for different things: hiragana for native words spelled phonetically, katakana for imported words spelled phonetically, kanji, which is pictographic, for most content-bearing words, and occasionally romaji, the Latin alphabet you are reading now. So then I might write a little Star Wars parody, in which the country bumpkin hero (るくさかいをくる) speaks hiragana, and the villain (ダルトベイダ), who is clearly foreign, speaks katakana. Yoda would of course speak Kanji, and, just possibly, Wookies and those little teddy bears would use romaji.

Naturally, I would also have needed to think about word order, especially for Yoda. Japanese is a head-final language, which means it generally puts the word with the most oomph at the end of each clause, so for example in a sentence the verb comes last. Thus for "I like drinking beer" you might say something like "watashi wa nomimoni wa biru ga suki desu", which reads roughly as with regards to me, in the matter of drink, beer, likeable is. (With apologies for any errors in this: it's more than 10 years since I studied Japanese.) Then everyone could talk like this, except for Yoda, who would use English word order. Because in the English version of Star Wars, backwards speaks does he.

Alas, I could never take this beyond the germ of an idea. But it does trigger off one other thought. There is a discussion of Yoda's syntax in an old language log posting, in which various word orders for Yoda's speech are discussed, and it is also pointed out that occasionally he follows ordinary English word order. The question that troubles me is that given that he can follow English word order, why doesn't he do so all the time? He has had (we assume) several hundred years of exposure to the the language, which is surely enough to smooth out his idio-grammatical quirks and get him to native speaker competence. Speaks funny, then why does he? I believe there can only be one answer: that Chomsky was right all along. The innate language component of Yoda's brain is such that he intrinsically cannot get the words in the right order, no matter how much he studies and attends the Berlitz school for Jedi. The universal grammar of Yoda sapiens just won't allow it.

Saturday, January 03, 2009

Riddles in the light

I've had some fun over the last year with online riddle games. A couple of years back, I played Qwyzzle after reading about it in Alison Scott's Live Journal. It is an example of the "URL-changing" style of riddles, in which you get a web page which contains a puzzle to solve, and then change part of the URL based on the solution to advance to the next puzzle. As far as I can tell, Qwyzzle is now off-line, though there are many others like it.

Late in 2007, a metafilter posting directed me to a list of room escape games. These are usually built with Flash, and typically have a scenario where you have to escape from a locked room by finding and combining objects and solving brain teasers. Most of them are of poor quality, partly in the game mechanics (pixel-hunting, for example), but more particularly because the puzzles are often rather arbitrary or just daft, and they didn't really hold my interest for long. (With one exception: the submachine series by Mateusz Skutnik).

The same list also included The Roomz. Superficially, this looks like other room escape games, but is really closer to the Qwyzzle genre. It consists of a number of levels, each with a password that gets you to the next one. Some of the early levels are a bit like point-and-click games, but most of them involve breaking codes and solving logic puzzles, sometimes with a bit of lateral thinking thrown in. I don't want to reveal any details, but to give an outline of one "room", you start by seeing some pictures and a string of letters. Working out who and what the pictures refer to gives you a lead in to what kind of code it is and the keyword to break it, and this gets you to the password. This is an early puzzle and is a fairly simple one. By the end (room 45), you are solving multi-layered puzzles, in which you need to crack codes, solve cryptic clues, assemble information from the web (or your own head, if it already contains what you need to know), and make a few inspired guesses. It took me about four or five months to get through the whole of The Roomz, with probably a month or more on the last room alone. I am only slightly embarrassed to admit that I solved the last puzzle while at work, in a particularly tedious meeting.

The Roomz was a good experience, both for the puzzles themselves, and also because it has a supportive and helpful forum for getting you past points where you just can't see what to do next. After I finished it, I cast around for something new to play. Clever Waste Of Time is one that many people speak highly of, but I didn't like that to solve some of the puzzles you end up installing extra software, and also that the forum has a rather hostile feel to it. Eventually, I came across The Labyrinth (and Labyrinth II) at puzzlefiles. In presentation style, it is very different to The Roomz: each puzzle is simply a web page with low-fidelity graphics and a text field to enter the solution. However, the puzzles have the same multi-layered nature, with codes and numerical and word games, and in many cases the need to make an intuitive leap once you've done the initial stage. It also has a forum which, like The Roomz, has people willing to be helpful and constructive. With some of the harder puzzles, I needed to get a gentle hint, then less gentle nudge, and sometimes thundering great shove to figure out what was going on. I finished the two labyrinths after about 7 months, with some longish breaks at various stages.

I found both The Roomz and the two Labyrinths engaging in the same way that a good cryptic crossword in the British style is. They mix conventions (e.g. "blind" often indicates there is some Braille in the puzzle just as broken signals an anagram in a crossword), a set of solving techniques which you might recognize when you see them or might require you to work out something new, and some leap in the dark guesswork. And there is same a-ha feeling when a particularly difficult puzzle resolves. Of the two, The Roomz has richer interaction, though the puzzles are a bit easier and occasionally become formulaic. The Labyrinths have harder and more disciplined puzzles, with a less interesting visual style. I've not yet found a new game to move on to, though some of the puzzles at puzzletome look promising.

(BTW: The Roomz only works with IE. I've had some weirdness in retrying it after recent Flash updates, though not enough to make it unplayable.)