Gemini code (engine)
https://gist.github.com/2ef4d4884426b43829213b94ec75c41c.git
Gemini code (simulation)
https://gist.github.com/b13aa77b4e397f616fb3cc404f736a66.git
Edited by Me(engine)
https://gist.github.com/8167b6562b99b234f0645656a062b906.git
Edited by Me(simulation)
https://gist.github.com/8a8adb36fc9ace7256ea02202730e74c.git
My last post
https://dev.to/lee12/python-baseball-sim-update-adding-pitcher-logic-and-json-data-support-2ja9
It's only been a few days since my last post (link above). Back then, Gemini was writing code exactly how I wanted, and I honestly thought everything would be smooth sailing from there. I was wrong.
When I tried to refactor the code to separate the "Engine" from the "Execution," I spent hours in a desperate struggle, only to fail. I later realized why: Gemini had been "patching" the code bit by bit based on my requests, eventually creating a messy structure that was hard to maintain. I felt completely frustrated.
But I didn't want to give up. I decided to start from the basics. I asked Gemini to build a simple "First to 3 Points" simulation. To my surprise, the code didn't work properly. Even when I asked for fixes, Gemini couldn't get the logic right... So, after several more hours of fighting with the code, I finally fixed it myself.
The bug was in the inning progression—it was jumping like this:
Top of 1st → Bottom of 2nd → Top of 2nd → Bottom of 3rd → Top of 3rd → Bottom of 4th...
To an experienced developer, this might seem like a tiny issue, but as a beginner, it was an incredibly exhausting challenge.
I still plan to use AI to improve my coding skills, and I will continue to record my successes and failures here.
See you in the next update!
Top comments (0)