4 ms·
As an opposite view point I work on a 10 year old legacy iOS app which has almost no abstractions and it’s a huge mess. Most classes are many thousands of line
by turdprincess 2y ago
As an opposite view point I work on a 10 year old legacy iOS app which has almost no abstractions and it’s a huge mess. Most classes are many thousands of lines long and mix every concern together.
We are fixing it up by refactoring - many through adding abstractions.
I’m sure code with bad abstractions can scale poorly, but I’m not clear how code without abstractions can scale at all.
- epolanski 2y ago> Most classes are many thousands of lines long and mix every concern together. That's quite unrelated to abstractions. It's just poorly written code, for whatever reasons may have led there.
- turdprincess 2y agoAbstraction is a an abstract word, but as an example, I would consider the process of refactoring a big piece of code which mixed together api requests and view presentation into a 2 classes (a presenter, and an api client) as adding abstraction, especially if those new components are defined by interfaces. And I’d rather work in a codebase where the owners are constantly doing such refactors than not.
- sethammons 2y agoI'd call that separation of concerns. I call that design more than abstraction.
- danparsonson 2y agoBut how do you define "poorly written"? edit: if you feel the need to downvote, feel free to share why you think my question is problematic - I think that "poorly written" to describe excessive code file sizes is such a wooly phrase as to be basically useless in a discussion like this, and when examined more closely usually comes down to "poorly abstracted". But I stand to be corrected.
- datavirtue 2y agoDifficult to read, loaded with surprises.