2 ms·
If 90% of that code was generated, that's absolutely horrifying too. Code is read ten times more often than it's written. And you're forcing every poor fool who
by stouset 9y ago
If 90% of that code was generated, that's absolutely horrifying too. Code is read ten times more often than it's written. And you're forcing every poor fool who has to come in and maintain that code base to understand how five classes interoperate with and delegate responsibility to one-another and gloss over reams of unnecessary boilerplate (that under careful inspection might not actually be boilerplate, but have a subtle change).
- watwut 9y agoI never generated 90% of my java code and I code in java for years. That is why I am asking - it is suspicious. Maybe, maybe if all you do is parse one complex xml from schema and decided to go jaxb way. Then again, such generated code tend to be tucked somewhere in the ../generated/ and then linked to class path - it is clearly separate from the rest and you dont review it. Basically, you read stuff it is generated from, and you dont read generated part unless you suspect bug in generator. The other occasionally generated stuff is syntactic sugar - hashCode, equals or delegate methods. That is quick to read once you get used to how it looks. More importantly, if that sort of thing is 90% of the code, then there is something wrong.