imdat celeste :v_nb: :v_tg: on Nostr: Today, I spent the whole day rewriting the "Document Properties"-dialog in our ...
Today, I spent the whole day rewriting the "Document Properties"-dialog in our product.
Two of my team members wrote the first version of it, long time ago. They were so proud.
They wrote a PropertiesDialog, which can show (and allow to edit) the properties of documents, directories, and user groups.
They made it so that we can, at any time, change the properties on the server-side and their code would, with minor changes, automatically support new properties.
Except ...
... well, the thing is that if you write generic code, abstract a lot of stuff, then it will result in generic "porridge".
The result worked, yes, it did.
But the moment we wanted to present the properties in a nicer UI, with better UX, the whole concept broke down.
I get now why R--, one of my team-members, was so hesitant and looked for any reason why the new design "... will break everything and look horrible".
So, when I told him that he should stop working on it, took away the ticket, and said that I personally will take care of it, ... I think I now understand why he was panicking.
The code they wrote ... the generic code ... is AWFUL!! It is so bad I couldn't stop swearing the whole day.
I am now working on UN-generic-ing the stupid stuff.
They had some good ideas, in principle, but their implementation is beyond contempt.
Good news is that today I changed enough of their code that (a) Document Properties works and (b) the change also affects Folder- and Group-Properties, because now I am creating custom components that I can reuse everywhere.
The result is that I will have DocumentPropertiesDialog, FolderPropertiesDialog and GroupPropetiesDialog that specifically only display those properties, but that use custom components for our Popovers, Fields, ReadOnly-Text, etc.
Yeah, sigh, I think code-review is not enough, I have to introduce software-architecture-review, too...
Two of my team members wrote the first version of it, long time ago. They were so proud.
They wrote a PropertiesDialog, which can show (and allow to edit) the properties of documents, directories, and user groups.
They made it so that we can, at any time, change the properties on the server-side and their code would, with minor changes, automatically support new properties.
Except ...
... well, the thing is that if you write generic code, abstract a lot of stuff, then it will result in generic "porridge".
The result worked, yes, it did.
But the moment we wanted to present the properties in a nicer UI, with better UX, the whole concept broke down.
I get now why R--, one of my team-members, was so hesitant and looked for any reason why the new design "... will break everything and look horrible".
So, when I told him that he should stop working on it, took away the ticket, and said that I personally will take care of it, ... I think I now understand why he was panicking.
The code they wrote ... the generic code ... is AWFUL!! It is so bad I couldn't stop swearing the whole day.
I am now working on UN-generic-ing the stupid stuff.
They had some good ideas, in principle, but their implementation is beyond contempt.
Good news is that today I changed enough of their code that (a) Document Properties works and (b) the change also affects Folder- and Group-Properties, because now I am creating custom components that I can reuse everywhere.
The result is that I will have DocumentPropertiesDialog, FolderPropertiesDialog and GroupPropetiesDialog that specifically only display those properties, but that use custom components for our Popovers, Fields, ReadOnly-Text, etc.
Yeah, sigh, I think code-review is not enough, I have to introduce software-architecture-review, too...