5 ms·
I really like "Clean Code", it's because other people/programmers could easily navigate the code, while not knowing everything that happens in the code. But in
by NicoJuicy 5y ago
I really like "Clean Code", it's because other people/programmers could easily navigate the code, while not knowing everything that happens in the code.
But in some rare cases, that's not what you want. Some functionality may need to require to know exactly what it does, because everything affects each other.
And then i create a "class of mud" that does everything since everything is connected, where the naming conventions of Clean Code still applies.
In my case, it was proxying json request bodies from an api to a 3rd party internal secure network where I had 1 dedicated pc running, where it could fulfill the request over a message broker (Service Bus in this case, to the internet network), execute the request that should work in the internal network and then send the response back through the message broker and give a response in the original API.
That class was shared (and exactly the same) for the server and client. Only one was implementing it as a subscriber and the other one as a listener.
The class was also commented à la SQLite, but no other classes in that code needed any comments - clean code wise.
( fyi, it was an internal secure api, that needed a 3rd part y ( our clients ) network)