When I was about 3 months into my programming career I performed a minor refactor to some code.
Unfortunately, the program was difficult to test (no unit tests) and very important, and difficult to verify correctness of output as well. (As in, you can't just look at it and say "yeah that's numbers lgtm").
Also unfortunately the previous author had not been very consistent in their programming style, so there was a lot of syntactic noise (some single line if statements used braces, some omitted them, etc)
Also unfortunately in my prior rewrite work in this, I had grafted the old UI onto my new backend to save time, but not brought the rigor there up to snuff (it's UI code, I had thought. It's well enough to have tests covering the business logic for now.)
Well anyway when I had rearranged some code, I hadn't realized there had been an extremely large block right underneath an if statement that wasn't using brackets, and I had accidentally split it into a few statements. N-1 of which were naturally now outside of the if statement.
The end result being that a bunch of code would run and the "is dirty" state worked fine, but if you clicked save on a "clean" state with no edits, it would blank the fields in the DB but not in the UI.
It didn't end up having any actual impact because we caught it in time, but god damn did it teach me something about "real" programming. I'm not sure exactly what all it taught me, but I think about that a lot as I do random other things now 8 years and 3 companies later.