I had to write a shared components library and yeah.. it went about as well as you can imagine. Thankfully the senior devs would tear my code apart and over the six or eight months I owned that project I learned a ton and made a v2 that was far better. From what I know it was used for another couple years since I left.
So yeah I’d say the worst code based I’ve worked on were my own code. The next project I was team lead on a login service. Again I had no idea what I was doing and someone gave me clean code and clean architecture books. Those changed my attitude a lot too.
It’s fun building code now, because any time I deal with old legacy code or so called spaghetti I understand why it’s that way and accept it. I write clean interface on top of it and within a couple months that old system is totally replaced by something that works well and is easy to test.