

























Over the last seven months I built WARPSimLab, a personal finance and retirement simulation platform. The project grew to roughly 20,000 lines of Python spread across 65 source files. WARPSimLab includes retirement modeling, portfolio simulation, taxes, Monte Carlo analysis, historical market windows, reporting, and a desktop graphical user interface.
AI (ChatGPT) was involved throughout the project. This article describes my experience tackling a significant medium-sized software project using AI as a development partner.
Some parts of this collaboration worked remarkably well while other parts failed repeatedly. The most useful lessons came from understanding where AI’s strengths and weaknesses were, and how to mitigate issues as they arose.
I bought a DOS based personal financial simulator program in the 1990’s. This simulator opened my eyes to numerous financial concepts such as the power of compounded interest, the advantages and risks of stocks, and the power of time. Although this software was extremely educational, it had weaknesses such as not separating assets for married couples. I eventually lost this DOS based software, and couldn’t find a replacement. I decided to recreate this software when I retired.
Last year (2025) I became extremely interested in AI for software development. I have been following AI since taking a class in college in the 1980’s. AI was the tool that was going to change the world in 5 years, and remained that way for the next 40 years. The last few years I watched AI change from a research project to another tool in a software engineer’s toolbox. I needed a project to learn how to design and build software with AI.
I decided to use ChatGPT to create a personal financial simulator. I started with the free, anonymous version of ChatGPT, then moved to the free, logged in version, and finally picked up a monthly subscription. Although obvious now, I wasn’t sure how a simulator worked. So, I started with a command line interface to a custom financial simulator. After a few months I wondered if projects such as mine had already been built. I found numerous commercial and free personal financial simulators online. Unfortunately, none of them satisfied all of my requirements. I wanted an open source (free) personal financial software package that was targeted at education rather than advice. I wanted this simulator to not be web based, requiring users to upload their personal information to some remote server. I wanted it to be reasonably feature complete - simulating different tax and resource buckets, using different retirement withdrawal schemes, providing Monte Carlo and historical window risk analysis, and including sequence of return risk. Finally, I wanted the software to be an exploration and what-if tool, allowing users to discover how finances work for themselves.
7 months, 65 files and 20,000 lines of Python later, WARPSimLab was finally mature enough to go public.
Coding with AI has been interesting. Generally speaking, we divided labor as follows:
I have been responsible for the feature set. This includes such mundane detail as layout of reports, whether to implement Monte Carlo and historical window algorithms, how complicated and complete the tax simulation would be, etc.
I have been responsible for the architecture. WARPSimLab is designed in layers or components. Currently there is the GUI layer, the simulator layer, the plots layer, and the reports layer. I architected the boundaries between each layer and the internal architecture of each layer.
I designed (and re-designed and re-designed) the GUI main menu look and feel, along with all of the submenus.
I oversaw the refactor (and refactor and refactor) of the simulator core, the plots code, the reports code, the Scenario Explorer, etc.
I designed the current WARPSimLab webpage. I went through versions inspired by Picasso, Leary, Rembrandt, software and hardware companies’ websites, and finally banking and financial companies websites. I selected and polished the current design.
AI has been my coding assistant. AI has created whole files consisting of hundreds of complex lines of Python in a few dozen seconds.
AI has implemented GUI code (tkinter) well enough that I really haven’t needed to learn the interface. It has written the code for the dialogs, and the code just works.
AI has created testing code for the project. This includes deterministic, feature, invariant and module tests. The total code base for these tests are now over 22,000 lines of Python.
AI has been a good brainstorming partner. Questions such as “how could I implement…” are generally answered in seconds. “Should I implement… “ or “What should I implement next” type of questions are always well thought out answers.
Although I designed and wrote the text for the website, AI wrote the html. It checked for html mistakes, grammatical mistakes, logic mistakes etc. An example is AI found that the percent of simulations that went to $0 was different on a picture than in the text. This amazed me that AI could understand that the text in an image needed to match text later in the report.
I learned that AI has limited resources the hard way. Generally, I would start a chat by giving AI the necessary files, and clear directions for a small sub feature leading towards a goal. A minute later I would receive new code with clear edits. If possible, after testing, I would provide another small goal, code would be returned and we would repeat. Early on I found that AI would inconsistently start to create trash code.
AI is a token generating and processing engine. Unfortunately, the token stack is finite. Further, when the token stack gets close to full, early parts of the conversation are condensed or abstracted, losing detail. (This is much better than 7 months ago when the top of the chat was just deleted.) The problem is AI (ChatGPT in this case) doesn’t let you know it’s happening. A human abstracts conversation in an intelligent manner. AI does it by brute force.
Software development is very token stack intensive. This is due to the files given to AI and all of the generated software returned. Every time I would submit a query, the AI would have to go through the whole thread yet again, keeping track of all software given by me and returned by AI.
Token stack (and other) limitations were dealt with in numerous ways. Logging into ChatGPT increases the size of the token stack by numerous times. Picking up a paid account (currently $20/month) increases it by numerous times again. Next, I would severely limit the files given to AI to only what was needed. If I worked on a different area of WARPSimLab (such as implementing the Executive Summary report in the GUI, then the Simulator, then the reports, etc.), I would frequently open a new tab. Every so often I would ask “Estimate the remaining safe context capacity for this conversation.”. After telling me that ChatGPT didn’t have access to that information, it would guess (and guess pretty well). Finally, on complex tasks I learned to open two tabs – one creating the detailed architecture and creating directions, and the second tab writing code. This division of labor was extremely effective at not overloading the architecture tab (which had the most important history.) The takeaway is when dealing with hundreds of lines of code ChatGPT was incredible. When dealing with thousands of lines of code, ChatGPT was frequently fragile. I quickly learned how to work around these limitations.
Monte Carlo simulation engines are complex. After architecting and implementing the Monte Carlo algorithm, it dawned on me that there was a second way to implement Monte Carlo. I discussed this with the AI, and my suspicions were correct – there were two algorithms we could use. This second algorithm was added to the GUI, data structures, core simulator and numerous engines that hang off of the core. I was surprised to see that the algorithms both produced the same result. After digging in the code, it dawned on me that we had implemented the same algorithm twice. I wasted around a week planning, architecting, coding, debugging and then removing this second Monte Carlo path. It’s easy to forget, the human should still be in charge.
I originally planned to write this paragraph about AI’s incredible ability to generate high quality code. After getting a second opinion – yet again from ChatGPT, I was reminded that ChatGPT isn’t just a code generator.
Over the last seven months I have used AI to discuss such broad topics as personal finances, regulatory law, software legal risk, personal financial simulator’s architecture, feature lists, performance issues and solutions, how complete to make the tax engine, and even artistic questions such as the look and feel of the WARPSimLab website. Although a bit academic and impersonal in prose, ChatGPT is a better writer than I am.
I went into this project expecting AI to be a great software generator. I soon learned that it was a very good design, architect and coding partner.
AI has made me not only a much more productive programmer, but a better software engineer. AI tends to have a much stronger spotlight than humans. Humans tend to keep a broader situational awareness. On this project, AI and humans complemented each other extremely well.
Prototypes are no longer a major event, thus are used more frequently. I can focus on user experience and feature set, as opposed to worrying about how to deal with problematic callback functions to properly close tabs. Creating test suites is now extremely low cost, thus encouraging testing based designs and significantly increasing the quality of the software product. Finally, AI removes much of the drudgery of writing software (code, debug, write tests, test, repeat) and helps me focus on the creative parts of the job, which is a joy.
One of my next projects will probably be creating an LLM from scratch. It won’t have the breadth of AI products such as ChatGPT, but it would be a fascinating way to start to understand the machine behind the curtain.
I’m looking forward to how this technology continues to evolve over the next few years.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。