What Ho, Old Chap


I downloaded an AI app the other day, out of curiosity - I can't remember what prompted it - called Claude, of all things. I must have read or seen something about it on the net: possibly YouTube, but who knows. Anyhow, I decided to throw at it a project I'd set for myself some time back but not done a damned thing about: a bit of code to parse out the content from the XML file dump of this blog, so I can edit some of this stuff together in long form as I've hinted that I would like to do before [blog posts passim]. I have written an XML parser before, many moons ago, in PHP, but to be honest, as I said about the router lift project last night; life's too short, blah, blah, blah; so I gave Claude the task of writing an application, not in PHP, but in Java, that would run from the command line on Linux. In around fifteen seconds it returned a piece of code that worked straight off the bat. 

Realising that the output still contained some inline formatting HTML in the content, I asked "Claude" to add some code to strip this out whilst preserving the line breaks so that the text would be properly formatted. Less than three seconds later - and bear in mind the client/server round trip delay - it came back with the amended code. Which likewise worked straight out of the traps with no modifications needed. So now, I've got legible plain text backups of every post I've made from the very start in March 2020 to today. The thing is, when I first read the code it produced, it looked right - JC [blog posts passim] always said: 'You're not a coder, but you can read code'... - and so it transpired. OK, in pure programming terms this was not a big ask - certainly not of the likes of the late JC, but it's bloody impressive nonetheless, and so long as one knows how to frame one's request in the right way, this could be a bloody useful tool in the future: and it's free, and it even runs from your phone...

Comments

Popular posts from this blog

Of Feedback & Wobbles

A Time of Connection

Little Camera, Mini Phoenix