Creating Documentation with AI


AI is great at producing documentation. Point it at a folder of text and images and get it to make sense of the contents and produce documentation, or better yet, as a Developer, point it at a folder of source code and get it to document it. You may even learn something about your own software that you had forgotten 🙂 It may even point out flaws or unexpected side effects, according to a friend, this has never happened to me … moving swiftly on …


I’ve developed a very simple prompt that I use which gives me great results and I usually use Claude Code with the Sonnet 4.6 model. However as local AI is improving rapidly I thought it would be fun and interesting to compare the output from Claude Code with that of a couple of local LLMs. It may currently only take a dollar or two to use Claude Code for this task but given that prompt costs are currently heavily subsidised, and even in 2026 it’s sometimes possible to be without a stable internet connection, it makes sense to try alternatives.


When using local LLMs for a job like this I am currently testing Cline (https://cline.bot/). This gives a Claude Code type experience within VS Code. A terminal version of Cline is also available but I had some TUI effects that I’ve not yet bothered to get to the bottom of. The VS Code installation however was flawless.


The Prompt

The prompt I used was this:

Write a professional and in depth combined user and developer documentation for this application. Output as a self contained html file named: appname_Documentation saved to the project/Documentation directory. Use graphs and charts if possible to make the document as visual as possible. Avoid dark backgrounds and if text is on a dark background make the contrast significant for easy readability. 


The Project

The project I was using to test the documentation creation is a simple Python application; 

PyTrain1 is a lightweight, command-line Python application that automates a three-stage data extraction pipeline. It connects to a Microsoft SQL Server database, runs a SELECT query against a customer table, and exports the results to a CSV file on the local machine, all in a single run with no user interaction required.

The application serves as a training exercise in combining SQLAlchemy, pyodbc, and pandas to extract and export relational data with minimal code. It runs as a single script with no web server, background process, or GUI component.

And yes, AI did write the above description, I couldn’t have done it better myself.


The Computer


2025 Mac Studio Max with 64 Gb RAM, 16 CPU cores and 40 GPU cores.


First Test: Sonnet 4.6


Second Test: Qwen3.6-35b-a3b-mlx


The image below shows the LLM loaded into LM Studio.


The image below is Cline running against Qwen in VS Code.


In this image, below, you can see the activity on my computer, with the memory usage and GPU usage shown plainly. Note I was also running a Windows 11 VM at the time.


Third Test: Gemma 4 3b


Fourth Test: Llama 3.3 70b Instruct


The Results


The results shown above don’t tell the whole story. The instant take away (as expected) is that Claude produced the highest quality documentation. What I didn’t expect is how good the output from Qwen was, and also how fast it was compared to Claude.


I expected better from Gemma. Gemma named the output file incorrectly, gave great feedback during the process, finished quickly but gave only a few lines of output. So, a failure. I will show some sample output later in this document, at least for those that created output … this brings me to Llama. 


Llama was not happy. I left it running for 15 minutes or so during which time it had numerous issues and errors and produced some strange commentary including telling me the temperature and humidity in San Francisco! I’m in the UK. I don’t know whether it had an issue with Cline but a big difference is that unlike the other local LLMs it is only a 4 bit quantisation so I expected it to perform slightly worse despite it’s higher parameter count. However in the end it was a complete failure at this task.


Sample Output from Sonnet


Sample Output from Qwen


Total Output from Gemma


Summary and Conclusion


Claude Code with Sonnet produces the highest quality documentation of all the models I tested. There is a price and time penalty however. The right local LLM that costs nothing to run and performs quickly is capable of creating accurate and useful documentation with no fuss and drama, and it will run on your (reasonably specced) laptop or desktop.


Local LLMs were considered a joke for real work not so long ago. I’m convinced the future is hybrid, local LLMs for most tasks with cloud models for the really tough stuff. If you’re interested run your own tests and see for yourself. 


Follow up Article


I have written a cross platform chat style application that allows me to switch between cloud and local models and see the difference between their outputs for the type of questions users often type in to ChatGPT or Claude. I can also experiment with pre-loading the prompt with a Speciality or a Personality as well as integrate a Prompt Library and pre-defined Information Layers. I’ll cover the results of these experiments in a future article. You can see the application in the image below.

Why Xojo?

People sometimes ask what language I use for software development. For many years now my preferred language has been Xojo. The response to this is normally ‘What’s Xojo?’ and ‘Why use a language nobody has ever heard of?’

Xojo has been around since 1996. It has allowed me to develop applications that run on Windows, macOS, Linux, Android, iOS and the Web. You can even develop applications for Raspberry Pi, although I haven’t done so yet.

Xojo and the essential MBS plugins have helped me earn a living for many years and has it remained relevant and contemporary throughout that time. I also find that I can develop much faster in Xojo and provide a solution quicker, which equates to less expense for the customer.

There is a learning curve, but far less than for many other languages, and for me the ability to develop applications that can be compiled for other platforms with minimum changes to the source code, is fantastic.

Most of my users over the years have been running Windows, but I almost always develop on a Mac, a significant plus for me as I don’t enjoy using Windows on my main computers.

Xojo also makes it easy to get into programming, offering a range of purchase options that should suit programmers or hobbyists of any level, as well as providing both student and teacher editions of an ‘Introduction to Xojo Programming‘ textbook.

Cross Platform Development with Xojo

How about a software development environment that lets you create powerful cross platform software for the following platforms:

Windows
macOS
Linux
iOS
Android
Raspberry Pi


What about of it lets you use any (or all) of the first three platforms as your development platform? What about if for the Mac you could create ARM Native applications, or X86-64 Intel versions, or even a Universal binary?

There is such a tool and i’ve been using on and off for nearly 20 years. Xojo has had a couple of name changes over the years and it’s current name means that it’s always easy to find it on Google 🙂

I have in the past used Xojo for creating applications for the Apple App Store, Google Play Store, Commercial macOS and Windows applications as well as custom applications for paying customers. It truly is an incredible tool and just because you haven’t heard of it doesn’t mean it’s not worth knowing. Xojo has been around since 1997 and continues to get stronger with around four releases per year.

I will be writing far more about Xojo in future, but for now you just get a quick introduction 🙂

Software Licensing & Piracy: Part 2

Part one of this article finished with the following question:

What is it fair to expect your customer to do to license their copy of your product, and so help protect your product, your sales, your livelihood and the future investment and development in a product that is important to both you ?

I believe that it is fair to expect the customer to do something to help the software developer protect their product, after all if the developer doesn’t stay in business then the product doesn’t have a future and the customer could be left high and dry.

That’s not to say the customer can be expected to jump through any hoops … the emphasis is on the developer to provide a method of licensing their product that can be done quickly and easily and thus encourage the customer to purchase and use a legitimate copy of the software rather than paying a visit to insert name of dodgy virus ridden download sites here or similar.

My opinion is that if I, as a user, purchase a piece of software for my own use, then I should be entitled to copy it onto my PC and my Mac and my Laptop for use whenever I like. I should also be able to copy it onto a USB Drive, connect the drive to a friends computer and use the product there also. I should not however copy the software to my friends computer thereby giving them the ability to use it in my absence. I expect to have to follow a documented procedure to identify to the software that I am the legitimate owner. This should be a simple and one off process.

I believe the previous paragraph is fair to both the customer and the software developer. I believe most people are honest and do not mind paying a reasonable price for a quality product. The software industry has in some ways become its own worse enemy with some companies having complex and unworkable, illogical and unfair licensing practices. ‘We need the customer more than they need us’ is something developers should be bearing in mind.

Offer a choice of license types and schemes that not only give the user choice, but also offer additional discounts for worthy establishments, education and charities for example.

The different types of software license that are necessary in order to give the customer the choice they require, can also bring additional and unwanted complexity. In order to also give the customer the licensing choice as well as the simplicity they desire then maybe cost additional license types at N * x. N is the Single User Standard Price, and x is the multiplier?

UPDATE IN DECEMBER 2023: Is this still an issue? It seems software companies have over the last few years decided to adopt the subscription mechanism for almost everything. This makes sense for some categories of software, but for many others it is just an unnecessary inconvenience and expense for the customer. We’ll see if this model is sustainable over the long term…

Software Licensing & Piracy: Part 1

This is an article I wrote in 2014 and which was later published in Better Software Magazine, September / October 2014 edition.

Your favourite piece of software was created by someone, or many someones, who used their time and hard won expertise to build something useful or enjoyable, or both. With the exception of Free Software or Open Source Software, that someone is entitled to, expects and deserves to be rewarded for their efforts.

If a price is attached to the software and you use the software without paying the price that is asked, then that is Software Piracy. Many would argue that it amounts to nothing less than theft.

If I sell physical products, lets say Widgets, then if I have 10 and you take 10 without paying for them, then I now have 0, you have 10 and hopefully a guilty conscience as well. That is theft. If however you use my software without paying for it then I am not directly affected by it. I still have it. Would you have bought it if you couldn’t have obtained a pirate copy ? Maybe. Maybe Not. In my opinion that is why Software Piracy differs from traditional theft. What you have actually done is taken away my chance of receiving income from you for that software sometime in the future. It just isn’t clear cut either way, with laws, policies and attitudes being firmly rooted in the ‘pre digital media’ 20th century.

Having established that there is a cost to producing software and that the developer does deserve to be rewarded for their time and efforts, it stands to reason that we have to have a mechanism in place that makes this possible. That mechanism is generally known as Software Licensing.

I’ve been developing software for financial reward for nearly as long as I’ve been using computers, well over thirty years, and I have never wavered in my belief that whatever form of licensing you use, you should never punish the genuine, fee paying customer for the actions of the Software Pirate.

Seriously, I have bought software in the past that had licensing schemes so restricting or complex or time consuming (or just plain ridiculous), that I have saved time and effort by downloading a cracked copy of the software and using that instead, all the time cursing the software developers for making me waste my time and effort. In effect punishing me for my honesty. As a Software Developer or Software Publisher that’s not an experience you want for your customers.

Whatever Software Licensing mechanism is used, there will always be some who do not like it and resent it being used. If as a developer you have done your best to minimise the impact on the genuine customer, whilst making some effort to thwart the Software Pirate, then you have done all you can and any customer who is going kick up a fuss about your licensing mechanism is unlikely to be a customer you actually want. Most customers would actually like you to stay in business and realise that to do that, it is necessary to be paid for the work you do, and / or the products you sell. Sacking your customer can sometimes be a good thing. But that’s a subject for another blog post 🙂

So what is a fair software license, for both the supplier and the customer ? What is it fair to expect your customer to do to license their copy of your product, and so help protect your product, your sales, your livelihood and the future investment and development in a product that is important to both you ?

I’ll continue this in the next post.