News for hackers. Stuff that matters.
Re:Java call stack – from HTTP upto JDBC as a picture (2006) by gambler on Thursday March 08, 2018 @12:05AM (#16542405)
> Thanks to this stack trace your business logic fits into two lines.

Two function calls for business logic, a hundred dependency libraries, thousands of lines of stateful "initialization" code outside of the stack and a fuckzillion XML files for configuration. But yeah, everything's great!

Re:Java call stack – from HTTP upto JDBC as a picture (2006) by Erlich_Bachman on Thursday March 08, 2018 @03:56AM (#16543221)
In one case you have to write two lines, because you care about the business logic. That's two lines to maintain, debug, explain to other programmers, staticaly check, etc. etc.

And instead you want to switch to what? Writing 20 lines of that same logic + implementing stuff that has already been better implemented in all of the libraries, by better programmers (because they were able to focus and specialize on that one thing)?

For what? A 2% increase in wall-clock speed? There is a 1 in a hundred applications where this matters. What matters in others is maintainability and development speed. Development is expensive. CPU time is cheap.

Re:Java call stack – from HTTP upto JDBC as a picture (2006) by kitd on Thursday March 08, 2018 @02:05AM (#16542853)
It's called abstraction for a reason. Do you write your system code from scratch each time?
Re:Java call stack – from HTTP upto JDBC as a picture (2006) by stevehb on Thursday March 08, 2018 @03:11AM (#16543069)
It's called abstraction, but at some point that becomes a euphemism for obfuscation.
Re:Java call stack – from HTTP upto JDBC as a picture (2006) by koopa184 on Thursday March 08, 2018 @01:56AM (#16542824)
I'm genuinely curious here: what would you propose as an alternative?
Re:Java call stack – from HTTP upto JDBC as a picture (2006) by Traubenfuchs on Thursday March 08, 2018 @03:50AM (#16543205)
Spring Boot uses Java configuration. Using the default in memory database, you can create a crazy callstack like that by adding a single line to enable the transaction annotation.