28 ms·
I have so many war stories there's not enough space on HN to contain them. I'll just state my overall experience. I write elegant well designed code, but genera
by palisade 7y ago
I have so many war stories there's not enough space on HN to contain them. I'll just state my overall experience. I write elegant well designed code, but generally speaking you won't find that anywhere especially if you're working in teams. Unless the code is all written by one person who had a chance to design and implement it well solely by themselves with adequate time, it's going to be a mishmash of they just didn't have time and the pressure was on.
I'm of the mindset that if it works, it's good code regardless if it isn't. This I think is the healthiest mindset to have in any team. I will refactor things slowly to clean up issues and of course my own code is well thought out and integrated into the codebase regardless how reckless anyone else is being. Any other way of interacting with a team would be antisocial and not beneficial ultimately. The way I see it is they wouldn't be paying me if there wasn't more work to do. The most important thing is that it works and the customer is happy. Your disappointment with elegance or coverage comes second to that.
The thing that actually annoys me is when, having exceeded my own delivery deadlines and everyone else's if I provide value added like a new feature that puts us far ahead of our competition I get pushback. Management doesn't want to have to maintain it. Even though my code is really solid compared to the rest of the garbage going in there. They just see me as a plumber fixing a leaky pipe and don't want anything further. I get that there's ROI and whatnot but it still bothers me when I show them some next level shit and I'm told to mothball it. Especially when I'm the reason we're usually way ahead of schedule. </rant>
- stakhanov 7y agoI've had that same thing happen to me numerous times too. I wrote code that demonstrably and undisputedly added to the value of the product in a way that went far beyond anybody's expectation. I took no longer to do it than it would have taken to do it the "normal" way. People get mad at me making the argument "Well if you leave the company, somebody else is going to have to understand your next-level shit, and we just simply don't have people here who can do that. So then what?"
- Discombulator 7y agoI think it depends on the details. If your code is simply cleaner, well documented etc, then fully agreed. If you introduce new dependencies, or the latest free monad transforming framework when there was none, then I’d be wary as well.
- stakhanov 7y agoI don't do "framework" ;-) In fact I'm usually the first to protest when somebody tries to introduce frameworks or other bloatware. And getting excited about algebraic structures is something I got out of my system while doing my PhD. I'm strictly talking: Value-add to the product, albeit at the cost of higher complexity to the extent that it is unavoidable.
- stakhanov 7y agoOn a separate note: I don't think that what I described above should be referred to as a point on "elegance". Because "elegance" suggests that it's about aesthetics. And regarding aesthetic considerations it is usually the case that people can reasonably disagree about them, and that there is no objective argument that can be made either way. But the arguments I made above about how a bad codebase quality can wreak serious havoc with a company's/team's ability to execute on their mission is something that goes far beyond a failure in elegance. It's a liability. And when I say "liability" then I don't mean in any abstract sense, but in the sense as any financial accountant would understand the term.