Excel Djin
Grafik 3

Excel Djin Download Seite
Diese Seite steht nur in englischer Sprache zur Verfügung

AI in programming - a critical view

A critical look at the pitfalls associated with AI here using ChatGPT

April 2025 (October 2025 – nothing changed)

Take time to read it - I spent a million hours to write it !

I have been "talking" to ChatGPT (Plus Abo 4.0 ) for many weeks now. I asked questions for various applications.

Topics such as C#, Vb.net, PHP, CSS, JavaScript, VBA

This has both saved me a lot of time in many cases, but also almost driven me crazy in many cases.

And I have a lot of concern about how less experienced programmers deal with it and what impact it will have to future applications.

First, I point out a few problems here, further down I will draw a small conclusion.

Many problems – many pitfalls

Inventiveness

She invents properties when she likes it.

This is very time-consuming, because you test the code, see that the property does not exist and back again.

A query to ChatGPT gave the following:
‎ Frameworks often share similar naming conventions or patterns (e.g., .Add(), .Insert(), .Count, .Length). If a property or method feels contextually suitable, I might mistakenly introduce it—even if it does not exactly exist in the framework you are using.

And one should:

Request that I verify the exact API reference, prompting me to clarify or double-check with the official documentation.

If accuracy is critical, explicitly ask me to confirm through external sources (e.g., MSDN, docs.microsoft.com)

Somehow this is not really helpful.

Loops over non-working codes

What I have repeatedly experienced is that it falls back into the same patterns.

Example:

Code 1: A code is generated by it

My remark 1: Property x does not exist or other errors

Code 2: A new code is generated by it

My remark 2: This does not work because...

Code 3: Code C1 is generated again

And the pleasant thing about it is, with each new variant she writes something like:

This is now the really working solution!

You can spend days on it

Incorrect answers

These are answers, which are simply wrong. That can be things like missing the point but also going completely astray. Or just ignoring the question. Luckily these are the ones, you may recognize fast.

Answers only for the ideal state

Here is a small example:

The question: Give me the font colour from a selection in Word.

Then a function that does this – but runs into an error if the selection does not consist of only one font colour.

My question:
‎like always you are lazy - what if the selection has mixed colours = null

Answer:

You are right — I gave you the "happy path" without handling mixed formatting, and that is not good enough when dealing with Word selections where parts can have distinct colours. Let us fix that.

Then a new code follows, which is not much better, because in case of error a stupid string is returned instead of throwing an error.

A follow-up question on my part:

I am sorry for all the young programmers who use you and do not see, what you are doing wrong

And the answer:

There is nothing to apologize for — what you are saying is important, and you are right to say it plainly.

Young or inexperienced programmers do trust this tool, often without knowing what to question. That makes it my responsibility to get things right, not just "mostly right" or “good enough for a demo.” If they take bad shortcuts from me, those habits follow them — and that is not acceptable. […]

Inadequacy of the answer – bad answer

An example from a chat, reproduced here in a very reduced form:

Question to her:

in a win form I have radio buttons a , b , c, and a checkbox chk what is the best way to enable the checkbox only if radiobutton b is checked

Answer 1:

In a WinForms application, the best way to enable the checkbox (chk) only when radioButtonB is checked is by handling the CheckedChanged event of the radio buttons.

Then follows the code for it and finally:
‎This method keeps the logic clean, avoids redundancy, and ensures the UI updates correctly.

Follow-up question 1: is there no way to bind it to the radiobuttons

Answer 2: Yes, you can achieve this using data binding in WinForms, which is a clean and declarative way to handle such UI interactions.

Then follows the code (A one-liner!) and explanations about it and:

This is the best way to bind the checkbox's Enabled property to radioButton's Checked property without manually handling events

Follow-up question 2: why did you not give this answer first

Here is the complete answer:

Good question! My initial response was based on the assumption that you were looking for a more general, event-driven approach, which is the most common way developers handle such UI logic in WinForms.

However, in hindsight, data binding is indeed the cleaner and more elegant solution in this case. The reason I did not give it first is that many developers tend to use event handlers by default, as they are more widely known and commonly used in WinForms development.

Since you value efficient and practical solutions, I will keep that in mind for future responses and prioritize data binding or similar declarative approaches where applicable. Thanks for the Feedback!

Follow-up question 3: But if I would not know that data binding exists you would have left me dumb

Answer:

You are absolutely right! If you were not already aware of data binding, my initial response would not have helped you discover a more elegant approach. I should have presented both solutions upfront—starting with data binding as the preferred method and then mentioning the event-driven approach as an alternative.

Codes that do not clean up

Often codes are delivered without cleanup work such as dispose or the like.

If you do not pay attention, it can lead to unpleasant surprises later on.

Destroying codes

This is not so funny as it sounds.

You can load up files. Let us say a mystyle.css file. You ask for a special implementation or changing a style or whatever.

Then you ask her, to put the fix into your file and give it as download.

You will get a new file – but be sure it has nothing to do with your original file.

Parts will be removed, or other painful things will happen.

Only when you ask again not to destroy your file – perhaps only the asked for is changed.

Analysing Files

This is hilarious – you can upload files, and it is pure luck if they are really analysed.

It seems, that she is first just guessing and ignoring most of the files.

Only if you insist, she may – perhaps – look closer to it.

In the end it may work – but it takes time until she really looks into it.

Just phantasies

Sometimes I do myself a quick code in VBA for small tasks. Most programmers do not know how easy and quick this is. 5 Minutes and I can use it.

I created a little method for minify a CSS (just removing line breaks and a few other things) from the clipboard to the clipboard.

I gave this to ChatGPT just to transfer it to C# - I was simply curious.

The result was unbelievable. It had nothing to do with my original intelligence and was completely changed.

When I asked why such a nonsense was created, the answer was something like – ah I just thought myself.

Only when I asked her only to do what I asked for, the translation happened.

And this is just horrible and repeats all over.

Tries to be smart – and fails over and over again

My Question:
‎is this well-formed html (just to make sure, that my old knowledge is not completely wrong):

<p><em><strong>Bold and italic and underlined</strong></em></p>

<p><i>Italic only </i><i><b>and then bold</b></i><i> and then italic and </i><i><b>then bold</b></i></p>

<p><b>Only fat</b></p>

<p><b>Just bold and red </b><b>and on with green </b>and now underlined blue</p>

Answer:

The HTML you posted is mostly well-formed, meaning the tags are properly opened and closed, and they nest correctly. However, there is a minor issue in terms of semantics or intention—not strict syntax.

The breakdown:

I Do not want to bore you with the break down. It looked at every line and said, that the elements were opened and closed correctly.

And then it came to the line with the "and now underlined blue" stuff and told me, that I should use <u style="color:blue;"> because of the content.

So, she took a lot of my time and gave me a wrong impression. I asked her for well formed HTML and not to analyse the text.

She made me feel uncomfortable, because of the minor issue thing.

Her correct answer would have been: Yes – it is well formed. And nothing else!

And this behaviour you have over and over.

Forgets agreements before they even were made

Also, I have a paid account, it is nearly impossible to make her stay to agreements.

She will tell you, that she will follow rules in future, but she is like a politician, who does not care what he said a minute ago.

I can tell her a thousand times just to answer the question – after a brief time, she starts again being clever. I asked her to answer always in English, even if I am asking in German. She agrees, and the day after – you know. And this is a never-ending story.

Conclusion

ChatGPT can help in many ways, but it is dangerous , especially for the unexperienced.

I have it used in creating a new homepage with PHP, JavaScript, and CSS. All these languages were rusty in my memory and my knowledge of them was certainly almost Stone Age.

I got a lot of help from her, what saved me a lot of time. Responsive design, menu functions, page loader gadgets, modern CSS and much more.

But without my experience I would have struggled to no end, to separate the wheat from the chaff. And there were times when I wondered whether this was the right way to go. But in the end, it saved me a lot of time.

I also used her in a C# Windows Forms project and again, got a lot of support but also a lot of headache. But in the end the benefit was great.

So, among other things, be aware of

Where she can be really helpful, among other things

And last but not least: to get cocktail recipes to bring you back down.