Hacker News new | ask | show | jobs
by jackblemming 955 days ago
> Take a look at the infobip-spring-data-querydsl library.

That looks like an absolute nightmare and not an example of very good code.

2 comments

They have a `FactoryBean`! I always assumed that was just a meme. Must be a serious concept then.

https://github.com/infobip/infobip-spring-data-querydsl/blob...

That's also what I thought as well. This is the kind of overabstracted code Java gets a bad reputation for and I would not want to maintain that.
One of the biggest problems when discussing code quality is that there are almost no objective standards. What looks like "good well-named" variables to one person is "overcomplicated garbage" to another, and there's nothing to inform us on which person is correct.

The closest thing we have is "does this code do what the user wants it to do". To me, this is the only question that really matters.

It’s true that it’s fairly subjective but that doesn’t mean we should abandon all judgment. Food is subjective as well but still you will get most (not all!) people agreeing that Nobu is better than McDonald’s.
My standard personally is "can I understand by just scrolling the code without working on it?" And here it's clearly not it.

There's a lot of factory code stuff which don't convey any information and very long chains of folders which does not help comprehension