(no title)
windock | 5 months ago
I work on a big codebase, where most of the code is in Singletons and static methods, no interfaces, no DI frameworks. Maintaining this system and making serious modifications to it is a serious engineering effort, adding weeks to simple changes.
mattmanser|5 months ago
Part of what makes my clients happy is that I deliver changes and new features consistently. What I don't always tell them is that after my first 3 months I will start ripping out huge swathes of their old code and replacing it with 1/10th the amount of code that was there. Sometimes I do, depends on the client.
The recent codebase I worked on was using what I consider one of the worst patterns I've ever seen, CSLA. Everything used it. Absurdly hard to work with, practically designed to be inscrutable. It was also littered with static methods everywhere, impossible to use DI with. The gig before that some prat had used the mediator pattern for simple CRUD forms.
2 years later and there's not a single CSLA pattern left and only a few static methods in 'critical' code paths that I haven't got round to extricating. We can use modern libraries, everything is DI, and have switched from framework 4.7 to Core .Net 8.
In the past I've migrated webforms to MVC, migrated from one database system to a different (surprisingly easy) and switched whole front-end frameworks.
It is a serious effort to fix architectural problems. But you turn it in a manageable effort by chipping away at it. By starting on one system and spreading.
That webforms to MVC? It started with one MVC endpoint for a new backend admin feature. Non-critical, but can I run an MVC project inside a webforms project. As soon as I could run the two side-by-side every new feature was an excuse to migrate a page to MVC, it didn't add much time. A year later, bye-bye webforms. Hello, development velocity.
Lots of programmers will not even attempt to fix architectural rot and just wallow in it.
I have advantages, often I'm a team of one, or two, or three and can bully my way through middle management to change. Yes. Weird career. I'm not going to lie, every now and then I'm 80% through a refactor with a deadline looming and I hate myself and despair. But it usually works out.
But you sound so resigned? If you were in my position, would you listen to my opinion about SOLID if I'd just admitted I was wallowing in the rot? You don't sound like a top tier programmer.
Try fixing it! That's how you learn what actually works in architecture. That's when you can start having an opinion about architecture.
tjr|5 months ago
What would Claude do?