News for hackers. Stuff that matters.
Re:Generating a Java program with 90% less code by TeMPOraL on Wednesday December 04, 2019 @01:04PM (#21704914)
Java is used in enterprise software primarily because it's what gets used in enterprise software. Language popularity is a positive feedback loop, and once a language establishes itself in a sector to the point universities start to teach it with that sector in mind, it's hard to unseat it. Businesses, especially large ones, don't choose tech based on technical merits; they tend to focus on aspects like "can we get support with SLA for parts of our tech stack", and "how easy to find/cheap the developers specialized in that stack are", and "let's do what the IBM/Oracle salesman says we should, that must be the right thing to do".

I don't see a reason an eCommerce framework couldn't have a small footprint. The lower bound is the amount of actual, necessary complexity in the problem space. But that's usually orders of magnitude less than the size of the codebase, because of all the boilerplate and greenspunning that happens in Java, Enterprise Java in particular.

(Note that in commercial work, I moved from Java to Common Lisp, so I have a different view than typical about just how much boilerplate and repetition can be simplified and removed when your language lets you do it.)

Re:Generating a Java program with 90% less code by qes on Wednesday December 04, 2019 @02:44PM (#21706128)
You're not going to cut your lines of code by an order of magnitude by switching from Java or C# to JavaScript or Python, but I would say you do get an order of magnitude increase in ease of managing large code bases with the popular statically typed languages.

I'd rather have 1M lines of Java than 100k lines of JavaScript, and if essential complexity took 1M lines of Java to flesh out, you aren't reaching parity with 100k lines of JS.

Re:Generating a Java program with 90% less code by TeMPOraL on Wednesday December 04, 2019 @03:04PM (#21706331)
> You're not going to cut your lines of code by an order of magnitude by switching from Java or C# to JavaScript or Python

Why not? I can easily see reducing SLOC 10-50x by switching from Java to JavaScript.

> if essential complexity took 1M lines of Java to flesh out

I very much doubt that in a 1M SLOC Java codebase - at least in pre-Java 8 codebase - the essential complexity is any more than 1% of that. My work experience with Java suggests that the language and the surrounding ecosystem and practices promote extreme proliferation of accidental complexity.

Re:Generating a Java program with 90% less code by ehnto on Thursday December 05, 2019 @01:13AM (#21710336)
I am sure you could reduce complexity quite quickly but then you are building a different product. The selling point of an eCommerce framework is the structure and existing feature toolkit. Like modules, events, mechanisms to safely override core functionality and all of that. I am also sure you could build a more compact eComm framework, but I think you would start to trade off structure for reduced complexity. For me though, more structure equals less need to worry about the complexity as that's been abstracted away.

I wouldn't mind seeing the other side of the fence though, I will admit I have worked in enterprise codebases for most of my career so I am definitely biased.