Badly drawn banana
You can't have *nix-style symbolic links in Windows, can you? Turns out that you can, and they're called junctions, but there's no readily available way to create them. Step forward, SysInternals junction.

Nice. But don't, as I did, create a link in your start menu that points to the root of your C drive. The task bar and start menu stopped responding or even redrawing correctly. As soon as I deleted the junction it came back to life.

Festival

Jan. 19th, 2012 04:54 pm
Badly drawn banana
I'm not religious, but I quite often wish I were. Look at these:
http://www.boston.com/bigpicture/2012/01/kalachakra_a_festival_of_teach.html
Badly drawn banana
Both of my children, without me saying anything, have asked me about SOPA. There's a publicity campaign that's worked! Pity we can't get as much fuss made about Guantanamo Bay...

On the plus side of US politics, has Hilary Clinton been doing some good? I've read several positive stories about Burma: release of prisoners, possibility of elections, and opposition leaders sounding optimistic about the future.
Badly drawn banana
I downloaded a trial version of Microsoft Office 2010 for my SO. They e-mailed me a licence key. When I open the e-mail, Hotmail says "This message looks suspicious to our SmartScreen filters."

Hotmail is run by... Microsoft.
Badly drawn banana
How did I know nothing about the Safavid empire? I've just heard a radio program about it. I knew something about the other "Gunpowder empires" (marvellous term) and I've seen images of the Naqsh-e Jahan Square, but how could I know nothing about a huge empire that lasted for over 200 years?
Badly drawn banana

I don't much like Sudoku. Only if I'm really bored on the train to work do I do the ones in the paper. When they first became popular, rather than actually doing the puzzles, I wrote a Sudoku solver. It's surprisingly easy to get the solution if you give up on brain power and just use brute force.

You try putting a 1 in the first empty square and see if you've broken the rules about where the numbers are allowed. If you have, try a 2, and so on. At some point you find a number that's allowed, but it still may not be correct. The brute force part is that you just assume that it's right, and carry on looking for a solution. If you find one, your guess was good, and if you don't, just try another number.

When I say "carry on looking for a solution", what does that mean? The thing to notice is that a Sudoku puzzle with one more number filled in is just another Sudoku puzzle. So when we've guessed a number, the approach is the same as before: guess a number in the first empty square. We can solve the puzzle recursively. Eventually we may get to a grid where no number will fit in the first square. Oops. Somewhere in our chain of guesses we went wrong. No problem: just back up and guess again.

At the time I did this, I worked with someone who was very keen on Sudoku. He would do the most difficult puzzle in the newspaper, working hard at it, applying logic and deduction, painstakingly filling in one number after several minutes thought. I showed him what I'd done, and it offended his sense of rightness. How could something so challenging be solved by such a brain-dead method? He had a go at writing a solver, not with recursive guessing, but using intelligent deduction. It never worked. To be fair, he probably wasn't as obsessive about such things as I am, and I think that people have done it his way.

So that was the end of that, except that I found a web page for the shortest Sudoku solver, and tried compressing my code. I didn't get it as as short as the Python version, but pretty small. I'd solved an apparently difficult puzzle by writing code, and I forgot about it for a few years...

...until part 2 of the story


Edit: couldn't find this earlier:
class S{boolean t(String g){int p=g.indexOf('0');if(-1==p){System.out.println(g
);return true;}for(char c='1';c<='9';c++){String n=m(g,c,p);if(null!=n&&t(n))
return true;}return false;}String m(String o,char c,int p){int r=p/9,k=p%9,b=r/
3*3+(k/3);for(int i=0;i<9;i++)if(o.charAt(i+r*9)==c||o.charAt(i*9+k)==c||o.
charAt(b*9+i+(i/3-b%3)*6)==c)return null;return o.replaceFirst("0",""+c);}
public static void main(String[]a){new S().t(a[0]);}}
Could probably be shorter (perhaps by inlining m), but I can't be bothered to think about it much. You need to give it an 81-digit string where zero represents an empty square.
Badly drawn banana
Obama was supposed to close Guantanamo Bay. What happened to that?

Anyway, it's not just us foreigners who can be locked up and forgotten by the US military. American citizens can also be detained indefinitely without charge or trial. Obama signed a National Defense Authorization Act "affirming" previous powers allowing him to authorise this.

Americans can petition the relevant politicians.

"Whoever you vote for, the government gets in."
Badly drawn banana
Happy new year to both of the people who might read this.

I won't be making any resolutions and I'm not sure what sort of stuff I have to look forward to. More of the same, I suspect. I forgot to do nogopubmo this year, so perhaps I'll catch up with that... or perhaps not.

Anyway, I have tomorrow I have to go back to work. Boo-hoo!
Badly drawn banana
Have I mentioned this song before? I listened to Fareweel Regality this morning. I was in the bath struggling to remember the chorus, so when I was dry I put it on. I had to wipe the tears from my eyes. It's the perfect song if you're somewhere warm one evening this Christmas, but I challenge you not to blubber like a babe.
Badly drawn banana
Been to the doctor today with a dodgy stomach. Fair warning: squeamish people should stop reading RIGHT NOW. For the first time in my life I had to produce a stool sample. They gave me a sheet of instructions involving an ice cream tub. It's fascinating, revolting, and fairly humiliating. The sample pot and the bag you have to put it in are both see-through.

Instead of saying "stool sample" they should try "teaspoon of turd" or "poop in a pot".
Badly drawn banana
I started googling "Bangalore Express" (a restaurant). I got as far as "banga" when Google suggested "bangable dudes in history". The suggestions are based on things other people have searched, but WTF? Who searches for sexy dead blokes?
Badly drawn banana
One of the best things about being a parent is when your children reach the age that you can converse with them like adults. I had this with both of mine this weekend, and they were both a pleasure to talk to.

Another milestone that I remember clearly when EC was about seven or eight was sharing a joke. Little kids readily laugh at all sorts of silly stuff, but there was one particular time I remember when I was smiling for ages because he'd said something that made me laugh.

I'd be in trouble if they weren't good to talk to, or if they had no sense of humour, so that's turned out for the best.
Badly drawn banana
Wikipedia says
A plurale tantum is a noun that appears only in the plural form...
So for example, faeces don't come singly.

And the word for something that only appears in the plural has a plural: pluralia tantum. 8~)
Badly drawn banana
In my job I write software. It's a curious world inhabited by some odd people. People often think I'm odd, so it's reassuring to spend time among the downright peculiar.

I remember Danish Dennis who sometimes didn't realise that he was speaking German instead of English and was puzzled that the manager didn't like him working until midnight then not turning up until noon. Then there was the one who never spoke to anyone if he could avoid it and never ate lunch, and the one who had duplicate copies of sci-fi films in different formats.

But the incomprehensible thing isn't their strange habits or their autistic spectrum interpersonal skills. What bothers me is that they don't notice when they are bad at what they do, and they don't want to improve their skills.

Sometimes I get asked about stuff and I'm met with blank looks. Fair enough (my explanation may be pants and/or some things are hard to grasp), but there's stuff you should know. With a certain amount of experience, some stuff should be easy, or at least familiar, and if it isn't and you don't want it to become so, surely you're doing the wrong job? Learning is a huge part of doing a techie job.

Finding out something new is exciting. Ooh, shiny! Doing things I've never done before, or just doing the same things in a better way is enough to make my day. Doing the same old stuff is depressing and diminishes me.
Badly drawn banana
Here's a peculiar (and NSFW) thought:
http://www.snotm.com/2011/10/80-somewhere-someone.html#3770092277050691514

I struggle to think of anyone it could be in my case.

Whack!

Oct. 4th, 2011 03:34 pm
Badly drawn banana
I'm sure that when I was at school corporal punishment was allowed, but I only remember one instance: in my primary school a boy got slippered. Did the teacher have to bring a slipper in specially, or did he kept one at school somewhere?

I've no idea why he was being punished, but his name was David Rolf. He was an enthusiast who went at everything full on, sometimes physically so. I remember he came to a party at our house when I was about 11. The door to the hallway had a tricky handle. When he couldn't open it, he stepped back a bit and had to be restrained from charging at it. I wonder what happened to him?
Badly drawn banana
Not long ago I got fed up and went to look for alternatives to Spotify. I ended up with we7 because it wasn't perfect, but it let me listen to whatever I wanted. So now they've changed to focussing on "personalised radio stations", or in other words, they're going to choose the songs for me. WTF? They tended to do that anyway: if I'd queued up a few songs and they all finished then they would carry on with something they thought was similar. They weren't very good at guessing what I'd like.

So now there isn't much choice but their bad guesses. I am allowed to choose 50 songs a month, but that's not even two a day.

It's depressing. All I want is to be able to choose a song to listen to, and I'll happily listen to an advert to pay for that. No one seems to want to help me with this.
Badly drawn banana
From the consistently peculiar* Strange Maps blog, a story of Eurovision, long journeys and an unusual pizzeria. Excellent.

*Peculiar in a good way.
Badly drawn banana
Not everyone has a first name and a surname. The only cross-cultural way to ask for someone's name is to give them a big box to type whatever's appropriate for them.

I knew this (Iceland and far east countries are interestingly different to Anglophone expectations), but I learned some new quirks from the W3C article on names (Spanish and Portuguese names are surprisingly complicated).

Tangentially, I also learned that it's hard to google for pictures of women called Rose. Here's my best attempt (but notice that some of the results are men): Search for "Rose" with the "Faces" option
Page generated Jan. 29th, 2012 01:56 am
Powered by Dreamwidth Studios