| ▲ | Verdex 4 days ago | |||||||
Heres the thing about clean code. Is it really good? Or is it just something that people get familiar with and actually familiarity is all that matters. You can't really run the experiment because to do it you have to isolate a bunch of software engineers and carefully measure them as they go through parallel test careers. I mean I guess you could measure it but it's expensive and time consuming and likely to have massive experimental issues. Although now you can sort of run the experiment with an LLM. Clean code vs unclean code. Let's redefine clean code to mean this other thing. Rerun everything from a blank state and then give it identical inputs. Evaluate on tokens used, time spent, propensity for unit tests to fail, and rework. The history of science and technology is people coming up with simple but wrong untestable theories which topple over once someone invents a thingamajig that allows tests to be run. | ||||||||
| ▲ | tracker1 4 days ago | parent | next [-] | |||||||
I'm with you... personally, I always found Clean/Onion to be more annoying than helpful in practice... you're working on a feature or section of an application, only now you have to work across disconnected, mirrored trees of structure in order to work on a given feature. I tend to prefer Feature-Centric Layout or even Vertical Slices, where related work is closer together based on what is being worked on as opposed to the type of work being done. I find it to be far more discoverable in practice while able to be simpler and easier to maintain over time... no need to add unnecessary complexity at all. In general, you don't need a lot of the patterns introduced by Clean or Onion structures as you aren't creating multiple, in production, implementations of interfaces and you don't need that type of inheritance for testing. Just my own take... which of course, has been fighting upstream having done a lot of work in the .Net space. | ||||||||
| ||||||||
| ▲ | dirtikiti 4 days ago | parent | prev [-] | |||||||
No, it's not really good. It's a pain in the ass to work in, and it produces slow code. https://www.computerenhance.com/p/clean-code-horrible-perfor... | ||||||||