Hacker News new | ask | show | jobs
by gavmor 56 days ago
Features written in one file, rather than "cohesive" modules with a single "responsibility" in one file?

So, orthogonal to the accepted, common code organization idiom (no matter how infrequently adhered to)?

Fascinating! Just the other day I decomposed a massive Demeter violation into stepwise proxying "message passing." I was concerned that implementing this entire feature—well, at least a solid chunk of it— as a single, feature-scoped module would cause the next developers eyes to glaze over upon encountering such a ball-of-mud, such a dense vortex of spaghetti.

But, as I drove home that evening, I couldn't help wonder if I hadn't, instead, merely buried the gordian lede behind so many ribbons of silk.

1 comments

Ha. It's a thought, at least. I've been programming for about 45 years and have seen the industry go through idioms like fashion. I remember the source to one popular video game, I think it was Quake, was organized into 26 files. Everything was located based on the first character of its name.

One idea for isolating features was "cross cutting" and "aspect oriented programming" that never caught on but I've always thought it was under-explored.

My day job is collecting a type of analytics for a major global company. Every new point of data involves changing about 1 line in about 10 different applications that talk to each other, sometimes adjusting schemas and report formats as well. Takes weeks to coordinate the rollout. It's super tedious. But, perhaps there's a prompt that tells the models how to do this whole process without human intervention. And that would be saved as a skill file, that provides the needed cross-cut across many files/applications/schemas/repos, letting the code live in conventional organization.

Hard to say. We're still in early times, I think.