Hacker News new | ask | show | jobs
by epolanski 494 days 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.

2 comments

Abstraction 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.

I'd call that separation of concerns. I call that design more than abstraction.
But 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.

Difficult to read, loaded with surprises.