Sudoku Solver: Sudokudo

The Advertiser, great newspaper as it is (that was sarcasm) has been plugging Sudoku puzzles of late. For the uninitiated, a sudoku puzzle is a 9x9 grid, that is broken up into 9 smaller 3x3 squares. Each row, column, and 3x3 grid contains all of the digits 1-9, and (obviously) each row, column and small grid contains each digit only once. The trick is to work out which ones go where. It’s all about logic, and working out which digits will not fit. So, I thought I would write a small python program to do it. I was prompted to do this by a puzzle I was working on on the way home, and I thought to myself “this puzzle appears to not have enough information for me to continue”. So, I started marking 9 marks in each box, showing which values could fit and not fit into each box. This was time consuming, but should be easy enough to do programmatically. Once you have this down, it’s simple to see if there are any boxes where only one value can go, or any rows, columns or squares where there is only once slot a particular digit can fit. And my program did just this. (I actually made an object-oriented one, that uses classes for cells, and puzzles, and methods for checking rows, columns, squares, etc). But, I seem to be missing one logical leap. The first puzzle I tried got solved with a few iterations of my program, but the other two I brought home get stuck. And one of these was one I solved earlier today, so I cannot recall how I was able to make the leap of logic my program cannot.

Touch Draws

Thanks to the fantastic new filter at school which blocks any blogger blogs (http://*.blogspot.com), I can’t post to the csta website, so I’ll write the draw in here instead.

Monday

  • CSTA Experiments: 7:05
  • CSTA Assassins: 7:55
  • CSTA Datsun 180B: 8:45
  • CSTA Derelique: 7:05
  • CSTA Sparkle Motion: BYE

Wednesday

  • Where’s The Kentish: 6:05
  • CSTA Berry Spoons: 7:45

Thursday

  • CSTA Mixed Lollies: 6:55
  • Arab Steed Pornstars: 7:45

iTunesRater Bug

When I was trying to find the name of the song they use in Classic FM for a theme tune, I discovered a bug in iTunesRater - it only checks the title of the song, not anything else. So two songs with the same title played one after another won’t necessarily change the iTunesRater display. Of course, attempting to fix this has caused some other issues…

Bug in XMLRPC.php

Yay! The days of having every post I posted with ecto automatically having the default category as well as those that I choose are numbered! An official bug report of the error (including the line of code where the bug occurs) has been put into the Word Press bug system (mosquito).

Shaving in Style

I bought a proper razor on the weekend. One of the ‘old school’ (I hate this term now, it’s been corrupted by the youth. Any type of Mobile Phone, no matter how old, is ‘old skool’) razors, a double-edged safety razor. No shaving rash. Closer shaves. Might have something to do with the cream I bought too, but it’s nice. Even makes me look forward to shaving.

Almost.

Well, consider this a plug for the Shaver Shop. Transform Yourself.

473546215 Y4629097 S00Y 25 2Ud 00 96

Seriously, the guy who served me was excellent. Didn’t try to sell me the most expensive razor or cream in the shop. I think he knows the value of patience, knows that if I am happy, I will come back, and buy stuff from him again.

Review: Influence.

John Williamson’s “masterful final act” (according to The Australian, but I didn’t know he’d stopped writing plays) Influence is currently playing at the Dunstan Theatre in Adelaide. Since we haven’t been to see anything since A Number, and Jaq won a raffle with a season ticket, we went to see it on Saturday night. John Waters is “Ziggi Blasco”, a conservative, hate-mongering talk radio host, along the lines of John Laws, Alan Jones and their ilk. His wife was a former ballet dancer - she was never really top of the heap but once performed the lead role of a production in London, but only because the two top dancers were both injured. Anyway, she is the most vile, vapid creature who is unable to believe that a) she isn’t going to make it big again, and b) other people have challenges in their lives that are much harder to live with. Things begin to get worse when Ziggi’s daughter from his first marriage, and his father, move into the Blasco mansion on the same day. Both have their own issues, which deepen as the story unfolds. This time of upheaval is made worse by the fact that Mrs. Blasco doesn’t seem to be able to find a good housekeeper (or, at least, one that will stick around), and hires a member of the “working poor”, a Turkish single mother of three, who has to travel hours every morning and night to and from work. The other characters are Ziggi’s sister Connie, a very left leaning psychologist, and Tony, the Blasco’s driver/butler/gardener. Most of the characters were believable, if somewhat stereotyped. I found John Waters a little hard to understand when he was “on air”, as his speech was somewhat unlike that of the “golden tonsils”, or most talk radio hosts whom he was based upon. But he was a perfect copy of Laws’ style of radio, with even the obligatory “Now just wait a minute, I was having lunch with some of my friends who are pharmaceutical company executives the other day, and they are really nice fellas.” Zöe Carides was magnificent as Zehra, the housekeeper who doesn’t seem to be able to say the right thing, ever. “Better not to be that good looking. More time to spend on doing schoolwork.” Not quite what you want to say to a (clearly) jumpy Year 12 student, who has just complained about always being called a dog by the boys on the train. Zehra, and Ziggi’s father (I’m not sure that we ever heard his name) nearly brought me to tears as they showed the depth of character that made them real. My only hassle with Influence was the cheap laughs. Williamson took the easy track in a lot of situations - he didn’t have to work hard at all to get laughter from the audience. Which really annoyed me, because at other times, he clearly had put the effort into making stuff genuinely funny. Or, at least I, and a couple of others in the audience, thought so. By all means, if you get the chance, go and see Influence. Laugh if you must, but don’t let that stop you taking away the message I did: Australia is in trouble now. I’m not sure how we stop the slide to right-wing nationalism, (aptly hilighted by Blasco senior’s dilemma) but I hope we can.

Mens Touch

Central Scorpions Touch Association Mens Open had their first training session yesterday. I am the coach. I’ve coached plenty of Womens and Girls touch, and the occasional boys team, but this is the first time I have coached a team of Real Men (tm). It is kind of intimidating (and I probably need to stop worrying about stepping on feelings), but I’m quite looking forward to it.

Rating iTunes Tracks

I wrote iTunesRater because I wasn’t happy with only having six possible ratings for each song - I have 5665 songs in my iTunes Library, and this isn’t a fine enough grained distribution. I’ll be honest, at times 0-100 isn’t enough! I also wrote it because I wanted a window always open that can be used to rate tracks easily as I listen to them. My Party Shuffle grabs tracks from an Unrated playlist, which is every song with a 0 rating. (I use this as the base, and songs I hate get a 1-10ish rating. Because of my setup, where a server contains all of the songs, and multiple people can add tracks to this location, and every now and then you need to import the folder containing music, removing a track just means it would be added again later). Today, just out of interest, I looked at how many songs are in the Unrated playlist. 4472. That means I have only rated about 22% of my music. I could short-cut it a bit, and rate according to album, but I don’t usually like every song on an album. And lots of times, I don’t know the names of songs, I have to wait until I hear them. If I had an iPod, I might rate more, but then it would only be a 0/20/40/60/80/100 rating again. And I’d have to sit on the train with my iPod in my hand, and I like to read on the train.

More on the Monthly

I read every word in the first issue of The Monthly. I must say, having read it, and looking back, there aren’t many advertisements in that magazine, it is mostly articles. And some of the articles were great! I hardly ever watch Enough Rope with Andrew Denton, but after reading the article on him and his interviewing techniques I may start to. If I can ever get my ABC reception better then the crap it is now. Speaking of the ABC, there was an article on how the culture of this great instution has changed over time, and how it may change in the future. And then in the Australian yesterday, I read how funding has reduced the number of hours of local drama created to an all time low of 21. Twenty-one hours of local drama created in one year, by the corporation that once created greats like Brides of Christ, and Love is a Four Letter Word. I’m also looking for a CD, I am a bird now, by Antony and the Johnsons, based on a review in the Monthly. Maybe it’s just me wanting desperately to be an intellectual (or, as the dopey tart in Big Brother [now that is quality drama. NOT] said: “an intellect”), but I may just start regularly reading this magazine.

Bashed by a Homeless Person

Yesterday afternnon, as I was on the way to the physio, I bumped into some old students of mine from a previous school. I chatted to them for a few minutes (Hi Bree and Steph), and was about to head off to catch my bus, when some random derelict man came up to us and said something. Now, I didn’t understand a word he said, so I just responded with a “Look, I’m sorry, but I really have to go now”, and turned towards the girls to make my goodbyes. And the guy punched me. Hard. Luckily, it was only in the arm, but I didn’t see it coming, and I’m glad he didn’t hit me in the face.