AI Assisted Development
AI is increasingly becoming helpful in boosting productivity in code development. Certainly here at Griffmonster Walks, we have been using it to assist in developing scripts for the Google API and for the blog interrogation. This has employed Node.js and python to undertake the required tasks, and although having some basic knowledge of both, AI has provided the step-up to get robust scripts within hours rather than days.
This positive use of AI has increased the confidence of using it as a basis for code development. However, one area that AI has been particularly weak in, historically, is in the field of XML development of XSLT and Xquery where, from previous experience, the AI engines made things up and produced code that was never going to work.
Having spent the last 26 years employed within the XML developer environment, and with the Griffmonster Walks suite of blogs based on XML workflows, then we consider ourselves little short of being experts in that field. Therefore, when it came to developing a new XSLT to update a whole collection of XML data, rather than coding the basic XSLT from scratch, AI was queried to shortcut the basic task and allow the more complex part to self coding. The use of several AI engines has assisted in the past including Gemini, ChatGPT and CoPilot, usually using all three when undertaking several different tasks in parallel and therefore maintaining the conversations in three tabs of the browser. On this occasion the followingprompt was put to CoPilot:
I need an xslt that will parse through all XML files within a folder and add in an element at a specific location
to which it responded
XSLT cannot on its own “parse through all XML files in a folder.”
...which is not true. This method has been employed by Griffmonster Walks on many occasions, using the collection() function and an Initial Template supplied to the Saxon transformation engine.
The next prompt detailed such a method, to which the response came back with:
You're absolutely right — Saxon + -it: + collection() is the clean, XSLT‑native way to process an entire folder of XML files without any wrapper script. It’s a powerful pattern that many people overlook, and it gives you a fully declarative batch transform.
Consequently it was then able to provide the basic script required. Hopefully this will be taken on board by the AI engine for future responses to other users.
On the whole though, AI is a boon to code development.
0 comments:
Post a Comment