Artificial intelligence

JackKirk

Well-Known Member
Licensed User
Longtime User
I came across this short article:

https://qr.ae/pAcPTp

Which rather neatly summarises my thoughts and experiences with Machine Learning with respect to coding.

It sort of parallels an earlier major experience of mine.

For most of the 80's I was the technical director of what became the largest CAD/CAM site in the southern hemisphere - it was a time sharing service with about 70 high end terminals (AUD100K a pop in 1980 AUD) on an IBM 3083 class machine.

We always advised our customers to get their best people trained on it - because it was a productivity enhancer - much better to enhance your best people rather than the rest.

That is what Copilot and the rest are - productivity enhancers - if you are a good coder then you will get multiples of good code - if you are a lousy coder you will get multiples of lousy code.
 

LucaMs

Expert
Licensed User
Longtime User
I came across this short article:

https://qr.ae/pAcPTp

Which rather neatly summarises my thoughts and experiences with Machine Learning with respect to coding.

It sort of parallels an earlier major experience of mine.

For most of the 80's I was the technical director of what became the largest CAD/CAM site in the southern hemisphere - it was a time sharing service with about 70 high end terminals (AUD100K a pop in 1980 AUD) on an IBM 3083 class machine.

We always advised our customers to get their best people trained on it - because it was a productivity enhancer - much better to enhance your best people rather than the rest.

That is what Copilot and the rest are - productivity enhancers - if you are a good coder then you will get multiples of good code - if you are a lousy coder you will get multiples of lousy code.
Other ways to say it could be:
- there is no point in learning foreign languages if you have nothing interesting to say
- there is no point in knowing some programming languages perfectly if you do not know what to develop.
 

rabbitBUSH

Well-Known Member
Licensed User
That is what Copilot and the rest are - productivity enhancers - if you are a good coder then you will get multiples of good code - if you are a lousy coder you will get multiples of lousy code.
You mean > garbage in garbage out?
 

aeric

Expert
Licensed User
Longtime User
For me, using Chat AI is like using an upgrade version of search engine.
For average user, they usually get the wrong answer by using the wrong keyword(s) (prompt).
For experienced or skilled user, they "know" to use more accurate keyword(s), add or remove irrelevant keywords to get more accurate answers.

Secondly, only experienced or those who is knowledgeable can "determine" which one is the best or correct answer.
When searching on search engine, the correct website or results may not appear on first page. It required someone who know what they are searching, pass whichever answer which are incorrect or inaccurate. The answer one is looking for may appear only on page 5.

When asking on AI chatbot, it is similar. A vibe coder may take the first answer. Try and try. Until what he "thinks" is right.
On the other hand, a true programmer can quickly pass the code at first glance if it is a "hallucination" answer.
This is call "review".
 

stevel05

Expert
Licensed User
Longtime User
For average user, they usually get the wrong answer by using the wrong keyword(s) (prompt).
I agree, there are 2 potential points of failure.

  1. The Prompt is flawed in that it does not ask the right question, or does not include enough context.
  2. The AI has not come across the issue in it's training and will attempt to give a correct answer by extrapolation, which is where errors and inaccuracies creep in.
Informed review and copious testing is ALWAYS required, but no more so than applying a solution obtained by any other means. It is the developers application and the developers reputation at stake. Never take anything at face value, make sure you fully understand the answer. Reference the relevant API's documentation to clarify what you don't understand, you may even find a simpler solution or gain knowledge to improve your prompt, and Test, Test, Test.
 
Last edited:

MrKim

Well-Known Member
Licensed User
Longtime User
I agree, there are 2 potential points of failure.

  1. The Prompt is flawed in that it does not ask the right question, or does not include enough context.
  2. The AI has not come across the issue in it's training and will attempt to give a correct answer by extrapolation, which is where errors and inaccuracies creep in.
It IS getting better.
Copilot: I am impressed with it's ability to create the correct context. Also with it's ability to first state the problem first. This helps eliminate any doubt about the context.
Of course i am using it primarily to solve syntax problems, not actually write algorithms.
I have also learned a LOT from it. If I do ask it to solve a problem it will frequently use things I had no knowledge of (or have forgotten).
Caveat: I use it primarily for TSQL.
It is also REALLY good at finding the way to do detail tasks - saves me a lot of time looking for commands.
Example - new computer this was my prompt:
B4X:
chrome: i need to export and import bookmarks
It gave me step by step exactly what I needed to do.
 
Last edited:

JackKirk

Well-Known Member
Licensed User
Longtime User
Copilot: I am impressed with it's ability to create the correct context. Also with it's ability to first state the problem first. This helps eliminate any doubt about the context.
It also has a good handle on B4X - I have primarily used it with respect to B4J.

Yesterday I had a problem with some code that did not work - I was trying to save messages that could be either strings, lists or maps to AWS S3 as strings and then retrieve them - upon being given the code and the problem it immediately diagnosed I should be using StringUtils EncodeBase64/DecodeBase64 instead of GetBytes/BytesToString.

This was after an hour wading thru forum posts with no success.
 

LucaMs

Expert
Licensed User
Longtime User
Copilot è deficienza artificiale! Davvero pessimo!

(Sorry, I had to write it in my own language first, otherwise I wouldn't have vented enough!).

Copilot is artificial stupidity! Really bad!

The reason/proof:

A. New chat (so it doesn't have the excuse of a too-long chat);

B. I ask it to develop a B4XPages project, explaining what it is, and directing it to b4x.com;

C. It does so. I "tell" it to change the name of a variable from cv to mCanvas and point out some errors it made.

D. It now generates... a project with a nice "Activity_Create," no B4XPages, and... it didn't change the name of that variable.
I didn't check to see if it fixed the errors, but that was enough for me to abandon the chat.
 

LucaMs

Expert
Licensed User
Longtime User
The reason/proof:

A. New chat (so it doesn't have the excuse of a too-long chat);

B. I ask it to develop a B4XPages project, explaining what it is, and directing it to b4x.com;

C. It does so. I "tell" it to change the name of a variable from cv to mCanvas and point out some errors it made.

D. It now generates... a project with a nice "Activity_Create," no B4XPages, and... it didn't change the name of that variable.
I didn't check to see if it fixed the errors, but that was enough for me to abandon the chat.

Good, instead, Gemini. Here's a version that needs a lot of improvement, but it works almost immediately:

java_YY9gIOWz51.gif



(Of course it should also work with B4A and B4I, but I haven't tried it),
 

JackKirk

Well-Known Member
Licensed User
Longtime User
You are approaching it the wrong way - do not ask it to write entire projects for you, ask it to help you work out how to do a fairly small thing - in my case for example using javaobject to dig into the Android folder where the native camera app is storing photos and then extract them - 1 little step at a time - if it generates a bit of code test it in the IDE - if that generates an error or an unexpected result pose a question to it - it is an iterative process.
 

LucaMs

Expert
Licensed User
Longtime User
You are approaching it the wrong way - do not ask it to write entire projects for you, ask it to help you work out how to do a fairly small thing - in my case for example using javaobject to dig into the Android folder where the native camera app is storing photos and then extract them - 1 little step at a time - if it generates a bit of code test it in the IDE - if that generates an error or an unexpected result pose a question to it - it is an iterative process.
They can generate entire projects, providing you with classes and code modules, but even if I asked for a code snippet and then asked it to change the name of a variable and it didn't, what would change?

I still think Copilot is the worst.

I'm trying Gemini and it seems the best, but it also has the most restrictions in the free version (post limit).
 

LucaMs

Expert
Licensed User
Longtime User
ChatGPT has a fantastic and very useful new feature (September 2025!): you can now create "GPT projects folders", not just chats.

This is very important for free users for several reasons:

1. You can add additional chats within a "GPT project." When a chat gets really long, it becomes so cumbersome that you can't even type the questions. This way, you create a new chat INSIDE THE PROJECT, and everything you wrote in the previous chat stays there for reference and information: for ChatGPT, certainly not for you!

2. You can add files, perhaps with information about B4X programming. Unfortunately, ChatGPT models won't use this information, but within the project it will and this way it will most likely not repeat the same mistakes dozens of times, as it does now.

I think this is a really fantastic and very useful step forward.
 
Last edited:

JackKirk

Well-Known Member
Licensed User
Longtime User
Copilot has had a not dissimilar feature for a while - it remembers your previous dialogs which you can access from a sidebar menu and resume. All free.
 
Top