Have you ever written a script that gets the job done and years later, you go back and ask yourself ... what the heck did I do or why did I do it that way!?! 😅
Probably not as frequent as we should but I have found myself in these situations over the years, whether it is addressing an issue/enhancement or needing to explain the code to another colleague.
While copious free time is never on our side in IT, it does help to re-evaluate your automation and processes over the years to see if there are new techniques, enhancements that can make the automation more effective.
I was recently CC'ed on a Reddit thread about some automation that I had worked on more than 14 years ago that would automatically join an ESXi host to vCenter Server using an ESXi Kickstart script.
Knowing what I know now and probably even earlier, the solution of calling into the vSphere MOB and manually crafting the XML payload to join the ESXi host to a desired vSphere Cluster in vCenter Server was certainly not ideal, but it got the job done. We can certainly improve the solution leveraging a more modern solution, while still staying true to the original requirements of being able to perform vSphere Cluster addition directly from ESXi 8.x/9.x Kickstart without relying on external dependencies.

