[VicPiMakers Projects] Refactoring the AI way

Mark G. vpm at palaceofretention.ca
Tue Mar 11 21:35:03 PDT 2025


Hey George,

I'm pleased to see this sort of result.  It encapsulates
all the info in one place.  However, the global config
should be split into an EEPROM global, a GPIO global etc.
just to really encapsulate like items together.  My $0.02.


On 3/11/25 19:34, George Bowden wrote:
> I was getting a lot of scope errors in my code, so I made my local declarations global.  It compiled.  So I asked  
> Claude.Sonnet to refactor the code, reducing the number of global variables.  Who knew refactoring is this simple:
> // Configuration struct to contain all WiFi related settings
> struct Config {
>    // Access Point settings

[snip]

> // Single global instance for configuration
> Config config;
> 
> -- 
> George Bowden  250-893-7423
> Victoria BC
> No ChatGPT used
> 
> 


More information about the Projects mailing list