Jump to content

Javier Tarí

Members
  • Content Count

    102
  • Joined

  • Last visited

  • Days Won

    3

Javier Tarí last won the day on September 14

Javier Tarí had the most liked content!

Community Reputation

33 Excellent

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Javier Tarí

    RAD AI Companion

    I totally agree, but I will keep using AI if it's there to use
  2. Javier Tarí

    RAD AI Companion

    I think ignoring progress is a self inflicted wound. Yes, people forget on how to navigate without GPS And surely someone thought exactly the same when maps where invented. The compass was catastrophic: people forgot how to navigate with sun, stars and nature signals. Debuggers where a clear signal of Doom: people could create impure code and then look for signs of the impurity and fix them Unit tests, what a diabolic invention... Instead of knowing deeply your code, you would delegate the detection of errors on other code constructions Should I continue? Note: AI can become a zillion things, depending only on the humans using it. Of course, that's just my opinion
  3. Javier Tarí

    RAD AI Companion

    Welcome to the pyre for heretics, Dave 😜😜😜😜 We should ask for a sub forum called "Heretic followers of the AI God", so our posts don't perturb the purity of Perfect Coding 👻👻👻
  4. This is a real example, not even a chosen one. It's to show not the programming itself, but just to show how is it to work with Claude Code Note: some of the identifiers are spanish, as I'm spanish and I tend to mix spanish and english in my code. Strings that interact with the user in any way are in spanish, because the suers are spanish Inside one of my ERP application folders, there is a group of units that help the user with inserting them in the system. They handle PDF of the Purchase Invoices, use IA on them, and reduce the user work by around 80-95%. It's fully finished, although will have further refinements. There is a file documenting them, called ganProveedoresFacturaRapida.md I jsut gave Claude this prompt: "read ganProveedoresFacturaRapida.md; we will refactor it for good practices, starting with DRY" and it presented me a plan Then instead of appying it, I made a new prompt: "Make redactoring-plan.md with your plan, and anything else needed so another IA agent can implement it just by reading the main documentation and this .md" It's answer: ● I'll create a comprehensive refactoring plan document that another AI agent can follow to implement the DRY improvements. ● Write(ganProveedoresFacturaRapida-refactoring-plan.md) ⎿ Wrote 739 lines to ganProveedoresFacturaRapida-refactoring-plan.md # DRY Refactoring Plan for ganProveedoresFacturaRapida Module ## Executive Summary This document provides a detailed plan to refactor the `ganProveedoresFacturaRapida` module to eliminate code duplication and improve maintainability following DRY (Don't Repeat Yourself) principles. The module currently has ~2500 lines with significant repetition that can be reduced by ~30%. ## Current State Analysis ### Module Overview - **Purpose**: AI-powered rapid supplier invoice entry system … +729 lines (ctrl+o to expand) ● I've created a comprehensive refactoring plan document at /mnt/w/Clientes/GAN/ganProveedoresFacturaRapida-refactoring-plan.md. The document includes: 1. Executive Summary - Overview of the refactoring goals and expected improvements 2. Current State Analysis - Detailed list of DRY violations with code examples 3. Refactoring Design - New architecture with helper classes and services 4. Implementation Plan - Three-phase approach with complete code samples for new classes 5. Migration Guide - Step-by-step instructions for developers 6. Code Mapping Table - Shows exactly how to replace old patterns with new ones 7. Risk Assessment - Identifies potential issues and mitigation strategies 8. Testing Plan - Unit, integration, and regression testing approach 9. Code Examples - Before/after comparisons showing the improvements The plan provides everything needed for another AI agent or developer to implement the refactoring: - Complete class definitions with methods - Clear mapping of old code to new patterns - Specific file locations and naming conventions - Testing requirements - Expected metrics (30% code reduction, improved maintainability) The refactoring follows DRY principles by consolidating repeated patterns into reusable helper classes: - TInvoiceFileHelper - All file operations - TTimeoutManager - Timeout and retry logic - TStatusManager - UI status updates - TBatchProcessor - Batch processing service - TAnalysisConfig - Centralized configuration This approach will transform the module from procedural code with 40% duplication to a well-structured, object-oriented design with less than 10% duplication. I've attached the file it generated, as-is ganProveedoresFacturaRapida-refactoring-plan.md
  5. Javier Tarí

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

    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
  6. Javier Tarí

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

    These are my files for compilation: a bat that does the compilation from Windows a sh that allows compiling from WSL, using that bat an agent that helps with context handling and giving more instructions the the main agent 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
  7. Javier Tarí

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

    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
  8. Javier Tarí

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

    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"
  9. Javier Tarí

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

    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
  10. Javier Tarí

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

    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: Gather relevant information as markdown (best) or PDF files - I could have used an AI for it 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 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 Once they agree on it, go to Claude Clode with the plan and any code the other chats have provided
  11. Javier Tarí

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

    So it has done it, or you still don't know if the result is good?
  12. Javier Tarí

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

    Be sure to use Opus at least for the plan if you wish to share with me in private, I could try myself
  13. Javier Tarí

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

    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
  14. Javier Tarí

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

    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."
  15. Javier Tarí

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

    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?
×