Wednesday, July 21, 2010

Coding - slight return

Today I spent a lot of time staring at a computer screen, fumbling around with databases, so what better way to relax tonight than to go home, install a database server on my MSI Wind, and try to feed into it all the words I've been busily gathering over the last few weeks?  Then, I hoped, whilst I wasn't a maven at writing perl code, I could at least leverage my ability to wrangle a database and get all my words out in an order that I wanted.

That is, if I didn't stop hitting myself in the face for using the word 'leverage' long enough to keep typing.

Sadly, I've been using SQL Server just long enough to have forgotten how I used to be able to use mySQL, but not long enough to have forgotten how easy it used to be to load data, which enhances the frustration, as does the feeling that I've got an incredibly convoluted method for doing something that should be quite simple.

(There's now a bash script to produce the files, then a bash script to create another script to load all the files, and then I run that script to get everything into mySQL, and then I have to write another script to get everything back out of mySQL again, and if that sounds like boasting or being clever, it isn't - I know there should be a more efficient way to do this, but at this time of the night it escapes me.  Why, it's almost as if I'm trying to overcomplicate things for myself.)

However, the work is almost done; there are now 2,659,429 4 word phrases in my database, and I'm almost ready to start skimming through them for the most choice ones available, and then stuffing them into my natural language simulator.  Sadly, it turns out that both 'Gobshite' and 'NiceGuyFreddy' are already existing Twitter users, so I need to get some new names for my friendly/abusive Twitter bots to use.  Life is so hard.

On the positive side, I went to dinner tonight at Soho Spice and ate lots of green curry, and then scampered home to skim the final pages of Market Forces again - wishing I'd carried on, rather than trying to be clever.  Perhaps tomorrow I'll wake up much wiser...or perhaps I'll wake up in the middle of the night when our cat, now hopped up on rubber mice and catnip, decides to make a swan-dive from the wardrobe onto our heads.


Post a Comment