Always the same
I have been programming for 41 years. First as a hobby, then part-time, and later in various roles. I have developed designs myself, using both familiar and new patterns and designs. Some of them turned out beautiful, others not so much.
And now it happend again to me. I now work as an architect for companies. So I only do my projects just for fun. One of them has been around for a long time. It is a library for changeable, networked components of algorithms that respond to events.
I wanted to redesign it. API and events were to be cleanly equalized and private components better organized. That worked out well. Then there was a short break. A library to be used in the project also had to be redesigned. This task had been completed. Now it is simpler, more practical and clearer.
Next, I wanted to integrate this package into my event library. And what happens? I no longer understand my own code, even though I only took a short break. It takes me time to familiarize myself with my code again. Even though I wanted to improve the structure. The comments and identifiers are helpful, but the structures are bad. It’s a good example of too much of a good thing. It’s too abstract, too generic and too elegant. This is a typical mistake. Even after a long time in my programming life.
Many mistakes happen again and again. That’s why you can’t say: “This can’t happen to me again.” Stick to the YAGNI and KISS rules. It’s a must.
PS: What happens to the library? I will first change the code so that it is compilable. And after that? I’ll let you know.