Tuesday, February 28, 2006

Quotebook Online

I shoved Whitney off watching Morse on my computer so that I could experiment with some introductory PHP coding this evening, after getting a database set up on Wired. I felt it rather embarrassing that I had spent four years in a computer science degree and never touched the language at all - all actual teaching of coding seems to stop after the end of second year.

Once you know one computer language you've got a fairly decent grounding in many of them, and PHP wasn't difficult to pick up. Once I had got a simple set of code to compile (and begun to remember that all variables have to be prefixed by a string symbol for some reason), it was fairly easy to adapt some database connection code to my needs.

And for an introductory project, I chose to rework the Quotebook. The actual book, which I've had since first year, now has five pages left and is looking a little battered. The text version replaced it adequately enough, but such a simple database lent itself very well to my experiments. So the Quotebook Online is now up on my webspace, featuring three viewing methods of various degrees of usefulness. Many of them are in-jokes that very few of the people that still read this journal will understand, and it's making me come over all nostalgic copying them all out again.

See tomorrow for slightly more, well, exciting news.

Monday, February 27, 2006

Updates to Various Things

My computer is working again. Don't ask me why, I haven't a clue. In fact, thanks to the temporary acquisition of a DVD burner from , it has now reached up to drive I:\, which I'm sure you'll agree is certainly something to put on the CV.

The rather neglected Quotebook has had a few additions to it since the last time I paid any attention to it - the ever decreasing frequency of updates to it is testament to my lack of going out during the last two years. As a small test project, I am hoping to put them in an SQL database and put a PHP frontend onto it. Trouble is I know how to write SQL commands, but all Internet sources on actually setting up a database from scratch have been extraordinarily unhelpful.

After a typically long time working on it, I've put together a demo for Treasure Tower, and I'll provide the link to it once I've done the write-up for TDC.

Something that has not been updated in months is my music site, after a promise that commentary was "Coming soon" in December last year. It will be looked at again eventually, but with the Modplug Central site still in fragments off the coast of New Guinea there doesn't seem much point at the moment.

Friday, February 24, 2006

Solitaire Specification, Simulation and Solution System: Progress

There's been good news with the project today, because I finally got around to putting in a hashmap so that the program could quickly check for duplicated states instead of having to trawl through a gigantic path tree each time. Just ignore that last sentence and have a look at the screenshot.



So basically, the program reads in a rules file and represents piles of cards as they're shown there (I may make them look slightly more like cards if I ever feel like it). On a click of the Solve button, the other window pops up as the program attempts to find a path to a state where all the cards are in the foundations at the top right, while paying attention to all the rules that have been laid out.

If it finds one, it reports how many moves it took to get there and fills the solution list with the moves that it made. These can be stepped through with the "Do" button, or alternatively the "Play" button can be pressed and the cards will swap around and zoom into the foundations unaided. You can guess what the rest of the buttons do for yourself.

It's matured a lot from the initial prototype I made months ago that could intermittently solve games involving moving three cards around at random. In fact, it can now solve full Freecell reasonably easily - I'd say there was about a 50-50 chance of it working (though I still use my "Easy Freecell" game for testing, just to be safe).

I also wanted to save this screenshot in particular because it's an example of a reasonably difficult game, with a lot of low cards buried near the base of the tableau. It took 444 moves to solve it in the end, which is pretty high compared to the average 120-160, but I'm not about to find out if there are any better solutions by hand.

Wednesday, February 22, 2006

Art Attack

I'm bound to offend at least a few art students with this post, but I've been thinking about this ever since going to that exhibition in London.

I think that Marla Olmstead's site epitomises what is wrong with the state of art at the moment. She is a four year old that paints the normal confused mass of blobs and squiggles that we all did at that age when allowed access to poster paint. The only difference with her is that her "artwork" is featured in major exhibitions and sold at exorbitant prices to people with more money than sense. See the site for some vomit-inducing quotations from art experts regarding her work - I should dig out my old masterpieces from playgroup, I'd make a fortune.

£3000 please.
A lot of the artwork at the exhibition wasn't much better. There were the usual vague squiggles and pictures featuring red, blue and yellow boxes, but one artist that particularly caught my attention specialised in gigantic wall-size frames full of multicoloured stripes. I think his name was David Grayson, but I can't be certain. They were all called "Untitled" followed by a random number, and priced in excess of three thousand pounds.

Shortly after the first semester of this year began, there was an "art school" series that Whitney and I watched, which featured such celebrities as Ulrika Jonsson as well as some other anonymous has-beens. The episode that most sticks in my mind was the "sculpture" one, where the two teams were given a heap of disparate items and instructed to create works of art from them.

I had thought sculpture required some talent and visualisation of creating something while chipping away bits of rock from a large one, and this was most certainly not it. The first team chose a mattress as their main object, while the other had a filing cabinet.

When the hosts came back, the mattress team had pulled all the stuffing out of their mattress, strewn some hair across it and stabbed it repeatedly with some knives. I can't remember what point they were trying to make, as the highlight came shortly later when the attention moved to the other team.

"We've filled the filing cabinet with beans," they announced happily, in a scene worryingly parallel to something out of Weebl and Bob. Indeed they had - the filing cabinet had had beans and polystyrene liberally splashed over the front. And I was shocked to see the art critic that had been roped into doing the programme launch into how it was an impressive obscurist impression of post-humanitarian empathy, or some such nonsense. It wasn't. It was a filing cabinet full of beans, and therefore a complete waste of time (and beans).

It's appalling, really.

Friday, February 17, 2006

More problems

I am ill, and so is my computer. But my computer is definitely the more terminal of the two of us. After the problem that had been going on for a month or so, I finally got up the courage to update my video drivers again, which required a reset of the computer. As before, I downloaded and installed ATI's Catalyst Control, thinking that it couldn't possibly have been responsible for so many vital files going missing, then I told it to reset. And it completely failed to come back up again.

I'm now convinced that the installer for Catalyst must read something like:

cd %systemroot%/system32
del *.*


Fortunately I had made another System Restore point shortly after getting the computer working, but it was only after manually removing Catalyst again and choosing Last Known Good Configuration that anything worked at all. I am not convinced that it's working correctly and have attempted to do the src /scannow fix again, but this time Windows says that it can't replace the bad files, for no other given reason other than it doesn't really feel like it. The smug beige bastard.

It's times like these that Macs begin to sound almost appealing.

Thursday, February 16, 2006

Metal and Curling

I think it was in the last summer Olympics that the American relay swimming team used "Liberi Fatali" from Final Fantasy VIII as their theme music. As further evidence that the world has gone insane, this time around the Swedish curling team are using "Hearts on Fire" by Hammerfall. Obviously not thinking this had gone too far already, the team and the band recorded a music video featuring them playing against each other. And I thought that Modern Talking would be impossible to beat on the video front.

I've also been watching Channel 4's "The IT Crowd" recently. The programme confuses me, not because of its content as such but because I find it impossible to decide whether it's any good or not. I watched the first couple of episodes not expecting much but got a few laughs out of them, and by the end of the third episode I had decided that it was a fairly mediocre program that happened to have one or two moments of genius per episode, for example the tape recorder and the "nice screensaver". But then I watched the first one again and it was a lot better than I remembered, so that theory was abandoned as well.

It's certainly not one of Graham Linehan's best works, though. After Father Ted and Black Books, where virtually every line was memorable in some way (ref. "I ate all your bees", "You should wash it, shave it off, nail it to a frisbee and fling it over a rainbow"), it seems a bit of a disappointment. I can't work it out at all.

Wednesday, February 15, 2006

Roadworks

"Hello David. What are you here for?"
"I'm your senior honours project student."
"Oh. What was that on again?"
"The Solitaire program."
"All right. Go and get on with it, then. Have you seen my new laptop?"

I can't say that the meeting with Ian the Gent yesterday was one of the most productive I've ever had, but it did serve to disguise the fact that like the rest of the class, I hadn't really done anything to do with the project since December.

I dislike when I have to Friends-lock entries, even though I don't know who would read this and not be on my list. However, this one is being locked not because of the dialogue above, but because I'm about to give some maps to my address. I can't think of anyone who would abuse this information, but it's better not to give them any ideas.

Cupar has never been a fantastic town in which to drive, as you usually have to allow five minutes or more just to escape the town from the flat. The council must have realised this and are solving the situation by rolling the whole lot up and starting again, overlooking the fact that traffic still has to get around. Actually there are a number of completely separate sets of roadworks in the town, meaning that my usual route to the flat like this:
Usual route

...has had to be revised. Owing to the many one-way streets in the town, this is just about the shortest I could work out that avoided the roadworks:
Revised route

If you try driving on those roads yourself, though, you'll quickly realise just how suicidal that is. Many streets are only a few inches wide at best, and aren't even designated as one-way, while all one way streets seem to be pointing defiantly towards you and enclosing you in an inescapable circle.

I attempted to find a more satisfactory route by going South from the main road and trying to come back in from the other side. However, without the aid of a map it's very difficult to get around indeed, as the local council have clearly decided that road signs are for wimps. This is what I ended up doing a couple of days ago:
Eccentric route

Maybe I'll just stay in the flat for a few months.

Monday, February 13, 2006

Valentine's Day

I always hated Valentine's Day when I was single. I felt it a smug celebration of coupledom, which was something that a few years ago I never expected to be part of. Now that at least one woman in the world has seen my obvious greatness and has decided to live with me, my opinion of the day has changed surprisingly little. I'm not saying that I don't enjoy it - it's a great reason to give chocolates, receive chocolates, eat chocolates, and go out for a nice meal (if room). The trouble is that I feel that much like everything else, the meaning of the day has been lost in commercialism.

Rather than a day for people who are already together and vastly increasing the profits of Hallmark, I think that Valentine's Day is meant to be about being able to express love rather than continue what's already there. Apparently Chaucer pretty much invented the tradition when he wrote "on Seynt Valentynes day, Whan every foul cometh there to chese his make" (presumably having had one too many that evening).

My point is to urge everyone reading this and planning to be miserable tomorrow to not waste your time like I did. Write something out that's nice but not excessively cheesy, put it in the object of your desire's post slot or under their door, and make someone feel good about themselves. Yes, I'm talking to you. Stop reading now and go and do it. You might be glad you did.

Saturday, February 11, 2006

The wardrobe - the obvious place to keep critically important data

A six-month search concluded today, as I have finally found my Windows XP disc. I never thought of looking in the wardrobe before. Hopefully, now I've found this and can restore the critically important missing files, my computer will be able to boot up unassisted by multiple system restores and being hit with a hammer. Windows File Protection is running now, and is hopefully restoring the files that escaped.

I'm going to reset now and see if it's worked. Stay tuned to see if my computer ever starts up again!

Update: Ysy.

So I'd better give some information on how to recover if you ever find yourself in a similar situation - I know that reading other people's experiences with the problem helped me. You can probably stop reading now if you don't want to scare yourself, it's a bit like reading a medical dictionary.

The problem was that Windows would either go through its startup sequence and then freeze without getting off the "Windows XP Home" screen with the scrolly progress bar, or get past it, groan, and reset itself. Looking in the Event Viewer (under Administrative Tools) revealed these two valium-prompting messages.

Volume Shadow Copy Service error: Unexpected error calling routine CoCreateInstance. hr = 0x80040206.

The COM+ Event System detected a bad return code during its internal processing. HRESULT was 8007043C from line 44 of d:\nt_qxp\com\com1x\src\events\tier1\eventsystemobj.cpp. Please contact Microsoft Product Support Services to report this error.

As you might expect, contacting Microsoft Product Support Services to report the error resulted in nothing happening at all and the help system admitting it had no idea what the problem was. So, to Google it was.

Among all the terrifying theories of corrupted memory and overheating components, I found a couple of things that were helpful - the first of these was a suggestion to reinstate the user named "ASP.NET Machine A". It seemed a bit unlikely to me, but I tried it anyway as I remembered deleting it shortly before the problem started (it had inexplicably appeared when I installed my Radeon 9550). This involved reconfiguring .NET again in one easy step:

%systemroot%\Microsoft.NET\Framework\v1.1.4322\aspnet_regiis.exe /i

After that, the second suggestion was to use Windows File Protection to see if any of the system files had become corrupted (src /scannow). I am continually amazed by the amount of helpful things that Windows XP provides just in case everything goes a bit wrong. This stage was what involved the use of the CD, and after the aforementioned rifle through my T-shirts, I went back into Event Viewer and found that there were now approximately forty million messages like this one:

Windows File Protection scan found that the system file c:\windows\system32\lz32.dll has a bad signature. This file was restored to the original version to maintain system stability.

I am unsure how that number of files managed to destroy themselves in that space of time, but somehow, after I restarted the computer and retreated from the room to get away from the tension, I returned and found it on the friendly blue login screen again, the first time that it had started correctly since December.

Sorry about vomiting all that DOSness onto your Friends list, but there's a chance that you'll need it one day. In other words, I'm not sure what the problem was, and I don't know what solved it. A career as an IT technician awaits.

Friday, February 10, 2006

Techy Stuff

Test cannot be started because it already does not exist
What doesn't exist, AVG? The test? My hard drive? Why are you giving me such a blatantly meaningless message?

Actually, my computer seems to have been suffering a bit recently. The most worrying aspect is that it is stuck in its own electronic Groundhog Day, and refuses to boot up unless I system restore it to the 24th of January first. The source of this problem is a little difficult to trace because I only reset my PC once every fortnight or so, but I'd rather like to know what's causing it so I don't have to reinstall my recent programs when there is cause to actually switch it off. The blame points at the moment to Acrobat Reader, even though I can't imagine why that would have anything to do with it.

In addition, Whitney's Mac works but has been playing classical music at random, as and when it desires. This was immediately traced to an overenthusiastic Classic FM widget, which was thankfully disposed of this morning. I have nothing against classical music, but it is disconcerting when you're working in a quiet room and the 1812 Overture suddenly begins blasting from behind you.

Thursday, February 9, 2006

Icon Worship

Two pieces of good news recently, in that my replacement pendrive has arrived (this time with a decent-sized keyring attachment so I won't lose it), and my car radio has stopped asking for a "COdE" after I was provided with one by my "mUM".

To my astonishment I was tagged to do a meme about a week ago and I still haven't got round to it. Instead, I'm going to invent one of my own, containing just enough LJness to be feasible, just enough interactivity to be passable, and just enough niceness to... be nice, I suppose. I call it "Icon Worship".

Reply to this post with one or more of your LJ icons, and I'll say what I think about it, what it reminds me of, or what it means to me.

Then copy this into your own journal and propagate it all round the Internet so that I can be smug about having started it.

Wednesday, February 8, 2006

Work, work, work

It's not something that you hear used to describe a computer science module often, but the double lesson of Human Computer Interaction was immensely entertaining. Thanks to the lecturer's teaching technique (getting the students to argue with each other), we were debating about how to best implement the controls for an oven for at least an hour. It's just as well we've only got one particularly outspoken member of the class there, otherwise we'd have been there for the rest of the afternoon.

We were also pointed to the Interface Hall of Shame, a site that exhibits the worst sighted elements of human computer interfaces. It hasn't been updated in years, and I don't agree with all of it (it's particularly ironic that the Word 97 hover buttons that it detests so much have now become a standard part of Windows XP), but the class were clustered round a computer laughing uproariously at it yesterday. Admittedly, this might be just us.

I am now getting on with the PSAC essay, and have elected to write about online privacy and communication monitoring. As expected, it's clear even this early that it's going to be worse than my previous epic work on "The Use of Formal Methods in Software and Hardware Design, Implementation and Manufacture", because I always have the same low opinion of all my significant essays. This one happens to be quickly turning into a law paper due to the number of terms, conditions and acts that I'm citing.

Research is sometimes rewarding, though - it's just emerged from the back of the room that the cryptographer Claude Shannon also invented a rocket-powered pogo stick and a flamethrowing trumpet. Not a lot of people know that.

Monday, February 6, 2006

An Epic Tale of a Stressful Weekend

I spent the last weekend of the post-exam break on a journey to London to visit Whitney's obscenely rich family. We set off from the flat early on Saturday morning through the thickest fog that I've ever seen, eventually finding the long stay cark park by virtually crashing into it. We squeezed into one of the thinnest spaces in the world and caught the courtesy bus to the airport.

I had a nagging thought while approaching the airport, and mentioned to Whitney that I thought that I'd left my lights on. Together, though, we decided that we hadn't seen that they were on when we had got the luggage out, and that we'd find the car in a perfectly operable state when we came back.

More on that story later.

After the short plane journey, we arrived at the hotel, which had the scratchiest bed in the world, but it had been paid for by Whitney's grandmother so we couldn't complain. All plans of having a rest were cancelled when her aunt phoned, saying that they were ready to meet us at her flat.

Tired, we packed up our clothes for the evening and stumbled out onto the street to find a taxi. I hadn't realised quite how exorbitantly expensive the London cabs were, but the driver was nice enough. After overshooting the turning into the street we were aiming for by some fifty metres, he happily stuck the car into reverse and belted backwards at top speed.

It was at this point that I saved someone's life. My habit of looking over my shoulder during reversing and lane changing even when I'm not driving has been inherited from my driving instructor, and it came in useful this time because there was a woman crossing the road oblivious to the large car boot hurtling towards her. If it hadn't been for my panicked shouting, she would certainly have been run over. Fortunately he slammed on the brakes in response to my entirely masculine screaming, made some meaningless comment about excess baggage and let us out across the road from the flat. I didn't tip him, thinking that ability to drive was more worthy of extra money than talkativity.

The dinner was one of the most pretentious of my life, and was held in a magnificent ex-belfry from which you could look down and see the other two layers of the restaurant. I can't remember most of the details of the menu, but it went something like this:

Starter
Crispy Triangles or Fish Arranged in a Tower

Main Course
Really Expensive Meat with Unconventional Salad or More Fish on Geometrically Improbable Plates

Dessert
Port-Soaked Pears with Minty Superyoghurt, Covered in Plants


I felt rather ill for most of the next day, my digestive system trying to cope with food that it had previously thought was better suited as decoration. We met up with Whitney's grandmother again along with another of her aunts, and visited a watercolour exhibition. I have to say that quite a lot of the featured paintings exemplified what I dislike about the art world, such as one particular artist whose works were invariably a collection of stripes cut out and pasted at various angles, entitled "Untitled #94" and priced in excess of three thousand pounds.

Lunch came next, and was marginally less overwhelming than dinner had been, though my stomach was still disagreeing. After parting with Whitney's relatives, having been made even more ill by catching a glimpse of the total cost of lunch on the bill even though I wasn't paying for it, we went down to Harrods.

I hadn't ever seen the place before and had been prepared for it to be an extremely large department store, but I was completely shocked by the levels of excess inside it. The saying that you can buy an elephant at Harrods is certainly true, as the elephant was there in the form of a lifesize stuffed animal, among a collection of four-figure-priced others.

The only place at which we actually bought anything was at Krispy Kreme, the only one in Britain. Whitney felt it was important to show me it, and it has indeed shattered my previous conception that Tesco has the best doughnuts in the world. The trouble is that a dozen of them cost more than twice than two dozen would have had we bought them anywhere in America, but such is the exorbitance of Harrods.

It was then time for the journey back up, and more public transport than anyone could reasonably be expected to cope with. Between periods of sleeping I took the chance to look in the arcade in Stansted Airport, and was pleased to see that I still held the top score for Easy mode on Euromix 2. 's positions are also intact. Sadly it seems that the machine past the security point has been removed. Once again I was stopped at security, even though the only change I had made to my bag was the large amount of doughnuts contained therein, and I had doubts as to their sharpness.

We caught the bus from Edinburgh Airport out to the long stay car park again, only to find that the long stay car park had completely changed shape and size when we arrived back. The phenomenon was explained by the bus driver, who said that there were actually two identically named car parks and getting on the right bus was largely a matter of luck, so he took the five or so of us remaining to the other park.

And we walked up to the car again, put the luggage in, opened it up, and completely failed to start it.

I didn't know exactly what the symptoms of a dead battery were - I had expected a slight struggle followed by a dying engine, but it grumpily refused to do anything at all, having had its headlights and foglamp shining uselessly for the entire weekend. Whitney and I meandered through a maze of fences to a building with "Customer Services" written on the side.

As we approached, it emerged that the sign actually said "This is not Customer Services", which must surely have been the result of a bored sign painter. Directions to the real building were provided on it, and after some more walking through the labyrinth we arrived and asked for a set of jump-leads. The attendant obliged, even though he was on his break. He knew exactly which car it was, as he and his colleagues had been watching the lights dim over the past thirty-six hours with considerable amusement.

I had never seen jump leads being connected before, and watching them was a useful guide on how to go about it. After turning his engine on and connecting the batteries together, I turned the key and the car spluttered into life. As he disconnected the leads we offered him either crisps or doughnuts as a reward, but he politely refused as he climbed back into the van.

Then I did something that would shame me to anyone who knows anything about cars anywhere. If cars were computers, this action would be equivalent only to downloading Gator or BonziBuddy. ™. I leaned over and switched the engine off.

"You need to keep it running," Whitney informed me, but the warning had come slightly too late and the engine was refusing to start again. I frantically waved at the attendant, but he evidently misinterpreted the signal somewhat, as he cheerily waved back and drove off.

I had to make a run for it, and I think my performance was impressive. Taking off with the speed of a gazelle and the grace of a giraffe, I chased the van across the car park, and after a distinctly unimpressive five metres or so I attracted his attention to come back and perform the routine again. Which he did happily, with no sign of his opinion of my idiocy being outwardly visible.

Finally, we made it out of that car park, after driving down to the pay station, remembering not to shut the engine off, and driving very carefully out. I can hardly remember the last time I stalled the car, but knowing that your engine will probably die permanently if you get your biting point wrong is very worrying indeed.

The only thing wrong with the car now is that the radio is asking for a code. A quick look in the car's manual reveals that I haven't been provided with one at all, so I have been forced to either drive in silence or sing. Hopefully a call to the customer service line will go some way to correcting the problem.

If you keep a journal, there are times in dire situations when you can console yourself with the way that at least the story will make a good entry. I think it's safe to say that all this was one of them.

Friday, February 3, 2006

Inside Information

Well, it seems that computer science students get to know why we had to change our passwords but others don't. Apparently someone got at the entire list of ITS usernames and passwords - they're encrypted, but they seem rather confident that they'll be broken into, so I wouldn't use the switch once/switch back strategy.

My results were all distributed between 16 and 17, and once again I got my best mark in the most difficult course, Architecture. This leaves me in exactly the same situation I was before, hovering a tiny distance (0.2 of a grade, actually) outside the First category. So I'll have to do absolutely fantastically in Security and HCI next semester. Things aren't looking hopeful for that, really.

Thursday, February 2, 2006

Aaargh!

The exam results come out tomorrow! I only just remembered this morning. It's a bit of a departure from the usual way of doing it, which is to set a vague date and hope that the departments have their grades up by then. I'm not sure if I like the way that I know for sure what my situation is tomorrow, but it's got to be better than checking the record page every morning only to see it blank again.

While I'm on the subject, I'm also confused that we suddenly have to change our university passwords. I had got rather attached to mine, having had it for three and a half years, but I've obligingly changed it to something that I find in retrospect a lot more difficult to type. There wasn't even an adequate explanation of why we had to alter them.

This post is going nowhere, so I'll just mention that I've discovered the fantasticness of Sonata Arctica's "My Selene" and Helloween's "Dr. Stein" and be off.