4 ms·
Yeah, this is also true. But "it depends" anyway. BTW author of article mentions also incidental complexity of Java classes. It's worth consider too and maybe
by hex13 9y ago
Yeah, this is also true. But "it depends" anyway.
BTW author of article mentions also incidental complexity of Java classes. It's worth consider too and maybe it's more accurate picture of problems with Java (and many other languages, it's more like poor design and "cult of complexity" than technology problems).
There are too many abstractions, classes, interfaces, inheritance, needless design patterns... it kills productivity and maintainability and ability to understand such codebases.
- watwut 9y agoOnly god and author knows what exactly was complex about those classes. I would guess that closure have good support for csv parsing, json integration, probably easier to read files? Or he used libraries in closure? Or maybe he used apache like every sane java project and something else was complicated? If 90% of that java code was generated, then what exactly were they doing? Also, there is such a thing as too much abstraction, but there is also such a thing as too little abstraction and refusal to use design pattern where it fits, because "it would be too complicated" alias someone was scared and lazy to learn. Neither is good. The projects I have seen that refused these "advanced" techniques all ended like hard to maintain and makes sense of mess of special exceptions to special situations - hard to reason about code. Design patterns are not hard and abstract thinking is as useful as good memory. Refusal to learn either is not mark of good developer.
- stouset 9y agoIf 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.