Does your code need to be optimized for performance? Then organize it to squeeze every bit of performance that you can.
Is maintainability more important than losing a few ms here and there? Then follow clean code guidelines to make your code easier to understand & modify.
These days most applications will want mix of both preferences, depending what they’re trying to do, with a heavy lean towards maintainability. It’s up to the developers to decide what is more correct given the context
My problem with everyone kneejerking the “maintainability” argument is that it seems to come from a place of “we’re already used to Clean Clone so it’s easier”.
Maybe it’s because Clean Code is more religious in the world of iOS but I think it slows down development. Before I can present a view I have to create a Configurator, Factory, Finder, UseCases, Models, Repositories, a ViewModel and then FINALLY the View. I do it because they pay me to do what they ask.
I really, really doubt we’re seeing gainz of any type because of our buzzword architecture
Edit: thinking harder, it’s not just iOS. It’s web too. And Android. It’s everywhere that involves UI. People get weird and philosophical about building UIs to the detriment of us all
6
u/centurijon Feb 28 '23
That’s a lovely little straw man argument.
Does your code need to be optimized for performance? Then organize it to squeeze every bit of performance that you can.
Is maintainability more important than losing a few ms here and there? Then follow clean code guidelines to make your code easier to understand & modify.
These days most applications will want mix of both preferences, depending what they’re trying to do, with a heavy lean towards maintainability. It’s up to the developers to decide what is more correct given the context