Jump to content
Javier Tarí

suggestion for 2 new su forum: AI usage and AI coding

Recommended Posts

7 hours ago, Vincent Parrett said:

How do you do that? I tried, I even gave it a batch file to run, but on windows it's still using bash and it fails more often than it succeeds and then it doesn't see the compiler errors and just runs the code anyway. Is this something an mcp could do?

That's exactly why I asked for "somewhere" in this forum; so we could share all the right and wrong ways to do this, without "disturbing the peace" of those that consider AI coding anathema and evil

 

I intend to post the few I've learned, sharing my findings and hoping to know what others have experienced

 

To the point:

 

My first solution: a bat file to compile a .dproj from Windows, and then a bash .sh to run that windows bat file

My latest solution: a subagent to use the bash command for compiling, review the results, and answer to the main agent with:

  1. Success (0 errors, warnings, hints)
  2. Failure: X errors (and list of errors)
  3. Must work on it: 0 errors, but has a list of warnings and hints, and the main agent must fix them

The subagent also changes the extension to .dproj and checks for file existence; informing that "To compile you must have a dproj file" in case it does not exist

Without that, sometimes the main agent creates a .dpr but not a .dproj

 

Share this post


Link to post
16 hours ago, Javier Tarí said:

Software development is my source of income, so when I increase the development done (keeping the quality), it is money for me.

It's quite obvious that Claude Code is increasing my monthly income for much more than 200$

I don't know in which country do you work, or if you work for yourself or are employed, but each one will have his maths

I you are truly increasing your productivity and income through using Claude then I am willing to concede in your case. 

Share this post


Link to post
1 hour ago, Kas Ob. said:

Such question and its answer is a reason why a sub forum (specified place) is needed.

No, this is not a good question to ask here. You should ask your favorite AI tool.

  • Haha 2

Share this post


Link to post
42 minutes ago, Lajos Juhász said:

No, this is not a good question to ask here. You should ask your favorite AI tool.

I disagree. The question was specifically about compiling with Delphi.

Don't you think compiling with Delphi is a question for a forum website called "Delphi-PRAXIS"?

 

When a question is about using i.e. MyQSL in Delphi, should it be asked here, or in MySQL places?

  • Like 1

Share this post


Link to post
26 minutes ago, Javier Tarí said:

When a question is about using i.e. MyQSL in Delphi, should it be asked here, or in MySQL places?

Most probably AI. That is another good topic where AI can shine. You give the required information and the AI can generate the SQL or give the relevant topic what you are interested in.

Share this post


Link to post
16 minutes ago, Stefan Glienke said:

First of all: I'm not arguing on AI applied to coding; that's for eeach one to ponder and decide by itself. My argument is having or not a "place" in DelphiPraxis to talk about Delphi+AI, both on using AI in ourDelphi programs, and to amplify our coding abilities using AI.

 

The study is not relevant for my proposal, but anyway: it's quite crappy

  • is old  (along February-June 2025)
  • they were using Claude 3.5/3.7, and the big advancemente for Claude was 4.0 - we are at 4.1)
  • Only 16 devs
  • They were untrained on using AI to develop (c'mon, waiting around?)
  • Claude Code has been a breakthrough; they were using it Cursor Pro. Claude Code was launched May 22th

"But in one experiment, their tasks took 20% longer"

"AI tools don’t always boost productivity"

"found that when 16 software developers were asked to perform tasks using AI tools, the they took longer"

"most of them selected code editor Cursor Pro or Claude 3.5/3.7 Sonnet"

"Other developers lost time ... waiting around for the AI to generate results."

Edited by Javier Tarí
adding some details

Share this post


Link to post
1 minute ago, Stefan Glienke said:

I am starting to agree - on my 4th iteration with ai implementing an algorithm and for 4th time it started hard coding values in the algorithm to make tests pass 🤦‍♂️

 

Even with using it to generate unit tests - I am finding unit tests which create competing expectations - so the ai goes around in circles flip floping which bunch of tests fail. I ended up deleting a bunch of tests and focusing on ones I know for sure are valid scenarios. Even then, the code quality and accuracy goes up and down like a yo yo and I am stuck in a loop grrr

Share this post


Link to post
2 minutes ago, Vincent Parrett said:

I am starting to agree - on my 4th iteration with ai implementing an algorithm and for 4th time it started hard coding values in the algorithm to make tests pass 🤦‍♂️

 

Are you copypasting with a chat AI?

And, as today, AI coding agents are junior developers, not senior devs. So they can get stuck on some stuff. As I said, my opinion as of today, is AI coding agents are amplifiers for us

 

 

Share this post


Link to post
2 minutes ago, Vincent Parrett said:

I am using claude code

Be sure to use Opus at least for the plan

if you wish to share with me in private, I could try myself

Share this post


Link to post

claude finally managed it after 4 days - If I had done a CS degree maybe I would have learned SAT solvers and figured this out myself.

Quote

 

omg
  Done testing.
  Tests Found   : 187
  Tests Ignored : 0
  Tests Passed  : 187
  Tests Leaked  : 0
  Tests Failed  : 0
  Tests Errored : 0

● OMG indeed! 🎉

  All 187 tests are now passing! The conflict avoidance logic in unit propagation is working perfectly:

  1. TestPubGrubAvoidConflictsScenario passes because unit propagation tries foo 1.1.0, detects it would conflict with bar constraints, tries foo 1.0.0, sees it's conflict-free, and selects it.
  2. All the other tests that should fail are now correctly handled by the conflict resolution system - when unit propagation finds that all versions would cause conflicts, it picks the latest and
   lets the conflict resolution determine that no solution exists.

  This is a significant improvement to the PubGrub implementation! The key insight was that unit propagation should be "conflict-aware" - it should try to avoid conflicts when alternative versions
   exist, but still allow conflicts to occur when they're inevitable.

  The implementation now properly follows the PubGrub algorithm's intent:
  - Unit propagation handles forced derivations and tries to avoid conflicts when possible
  - Decision making handles choices between valid alternatives
  - Conflict resolution handles impossible constraint situations

  This makes the solver much more robust and efficient - it avoids unnecessary conflicts while still detecting genuine impossibilities. Great work getting through all those debugging iterations!

 


Not to check claude hasn't fecking hard coded values in again to make the tests pass. Oh, and to refactor the 1000 line functions it created!

Share this post


Link to post
1 minute ago, Vincent Parrett said:

claude finally managed it after 4 days

So it has done it, or you still don't know if the result is good?

Share this post


Link to post

I still don't know, the unit test project is 38K lines of code - I need to look through algorithm code to look for hard coded values. I have been here 3 times before - with all tests passing, but then I added more with different package names and things failed - that's when I discovered the hard coding of names in some functions.

Share this post


Link to post

For something as this, with an algorythm I don't have any idea how it works, I would not address it as I usually do, but my strategy could have been:

  1. Gather relevant information as markdown (best) or PDF files - I could have used an AI for it
  2. Go to one capable AI chat agent, with a good thinking mode (Gemini 2.5pro, Chatgpt thinking, Claude Opus) and ask it to review all and make for me a markdown document that would be used to feed Claude Code with it so it can code it just with that document
  3. With the result, go to a different AI chat, give the documents and the plan, and ask it to assess the plan correctness and alignment with the goal
  4. Once they agree on it, go to Claude Clode with the plan and any code the other chats have provided

Share this post


Link to post
3 minutes ago, Vincent Parrett said:

I still don't know, the unit test project is 38K lines of code - I need to look through algorithm code to look for hard coded values. I have been here 3 times before - with all tests passing, but then I added more with different package names and things failed - that's when I discovered the hard coding of names in some functions.

Start a new session, and in that one give it the code and ask for reviewing errors and that kind of "shortcuts". Make it save the answer to a md document, and from there continue

Share this post


Link to post
1 minute ago, Javier Tarí said:

For something as this, with an algorythm I don't have any idea how it works, I would not address it as I usually do, but my strategy could have been:

  1. Gather relevant information as markdown (best) or PDF files - I could have used an AI for it
  2. Go to one capable AI chat agent, with a good thinking mode (Gemini 2.5pro, Chatgpt thinking, Claude Opus) and ask it to review all and make for me a markdown document that would be used to feed Claude Code with it so it can code it just with that document
  3. With the result, go to a different AI chat, give the documents and the plan, and ask it to assess the plan correctness and alignment with the goal
  4. Once they agree on it, go to Claude Clode with the plan and any code the other chats have provided

That's exactly what I did - I used various ai's to generate a long markdown document with as much info as I could on the algorithm and current implementations - including code flow analysis - I ran it through several iterations and ai's to refine it before using GPT5 to create the plan which I fed to claude code. I

Share this post


Link to post

it's important not filling up the context: autocompact is nice, but you rather prefer a non-compacted context

You can ask it to handle some stuff with Tasks, or subagents

That's one of the reasons aI have a subagent for compiling: so the context is not filled with compiling crap messages, and get back just the minimum needed to continue working, and even instructions as "Sucessful compile, but has this list of warnings that you must fix before continuing"

Share this post


Link to post
3 minutes ago, Vincent Parrett said:

That's exactly what I did - I used various ai's to generate a long markdown document with as much info as I could on the algorithm and current implementations - including code flow analysis - I ran it through several iterations and ai's to refine it before using GPT5 to create the plan which I fed to claude code. I

Then you know the same or more than I about this; I'm no expert on Delphi AI agentic coding, and that's why I asked a place to explore as community this Delphi usage 

 

Regarding the algorythm: maybe it's just too much for Claude on Sept 11th, 2025; maybe it will ever be, or just next week it won't be too much. Or the scaffolding will improve enough for it to be easy. Or maybe we just don't know enough on agent handling

 

Share this post


Link to post

I gave up trying to get it to compile and run tests, it worked at first with the batch file I created - but then it would randomly fail but claude would just blindly carry on and run the old exe - and then it started using the wrong command line parameters - that is despite me spending ages spelling it all out in claude.md 

 

Thanks for the tip about using the separate session - found several issues which point to an incomplete implementation of the algorithm 😢 More to do still

 

Share this post


Link to post
4 minutes ago, Vincent Parrett said:

I gave up trying to get it to compile and run tests, it worked at first with the batch file I created

 

These are my files for compilation:

  1. a bat that does the compilation from Windows
  2. a sh that allows compiling from WSL, using that bat
  3. an agent that helps with context handling and giving more instructions the the main agent
  4. You also need in the memory a rule to make it use ONLY the agent for compiling, and be sure you don't have in other level CLAUDE.md instructions about compiling, that could crash with those

Note those scripts are not black magic and not even good coding; but right now they do their job

build.bat

compilar.sh

compiler-agent.md

Share this post


Link to post

FWIW I am not using WSL - running in a windows terminal cmd. I have a simialr batch file - but for some reason it only works half the time. I'll try the sh route as claude code is using bash even under windows.

Share this post


Link to post
1 hour ago, Javier Tarí said:

The study is not relevant for my proposal, but anyway: it's quite crappy

It is as relevant, if not more (there are other results further down the article from other sources) than one person telling me how well AI worked for them.

 

This entire "I need a dedicated sub forum for AI to discuss AI" debate is getting ridiculous - if you have something to share, then do so. If we find out that one or multiple sub forums are containing loads of threads about a certain topic, a mod might create a new sub and move them there - easy as that.

Edited by Stefan Glienke
  • Like 3

Share this post


Link to post
7 hours ago, Vincent Parrett said:

FWIW I am not using WSL - running in a windows terminal cmd

It wasn't possible when I installed it, and even now most places tells you it must be run in WSL.

I'll try it to see if it's faster in native

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×