Okay, a little background for those around who might need it…
For reasonably high values of such, I am a reguler on the Usenet group Alt.Fan.Pratchett. Within this group there is a tendancy to – bending towards obession with – a false sense of family, strengthened by various fictional relationships coined over the course of the decade it’s been in existance.
Periodically, someone would say “So, how could we write down all these relationships?” and everyone else would chime in with “helpful” positions such as how you’d have to have five dimentional paper, and even then you’d need five hundred different colours of pen.
Then, one day, in an airy lecture theatre somewhere on the north side of Sunderland, your humble correspondant was sitting in a database lecture trying to parse what the Anne-Robinson lookalike at the front of the class was attempting to explain about relational databases. And I, conscious of how I learn things, searched blindly for an example I could work though to make it make sense.
The two ideas clicked, and I had the idea of using the AFP relationships system as a worked example for how databases worked. This abstract concept made me pass the various modules, and it sank to the bottom of my mind, where it lay, dormant. Not dead, but sleeping.
Later that year I’m sitting in my room in Kent being bored. I now have a passable knowledge of PHP and a reasonable one of SQL, as well as access to a server that can handle both. I need a project to enhance my skills while I’m pondering my life, and AFPhrid is that project.
Afphrid. The Alt Fan Pratchett Heroic, Relational, and Impossible Database was coded by myself over a series of marathon sessions in about four days. The basic version went up on my local server, and a few people tested it for me, and eventually it went live, and was introduced to Alt.Fan.Pratchett on the 21st September 2001.
Fast-forward to the future. Eight months later, Afphrid was taken down, because I am a fool.
Well, sort of. I normalised all this data, worked out who was who, and a workable data-structure for it…
…and then made Usernames the index key.
The amount of trouble this caused me is impressive in it’s might. At one stage in the code there are *six* removeslashes() functions just to make sure that PHP’s magicquotes feature isn’t changing ‘ to ‘ and then to \’ and so on. Clique moderation failed, Users couldn’t change passwords, hell broke out. Then, in a bid to make the server more secure, my host sensibly turned off magic_quoting before going into databases. This was the quote that broke the programs back. The quick hack that the rest of the site needed to deal with this was trivial, but recoding Afphrid was going to take me ages, it had so many bodge-jobs on it I’d lost track.
So I restricted it (Closed all modifications, left viewing open) while I completely recoded the thing, which I finally started doing on friday, about a quarter to Saturday. Three days later I’ve barely started. The more experience I have with coding, the longer it takes me. So we have a todo list, a Plan, and a thousand lines of PHP already done.