3 ms·
Parsing args in Java is okay, I guess, but it doesn't meet people's expectations for knocking out a quick script to get something done. When it comes to writin
by dkarl 7y ago
Parsing args in Java is okay, I guess, but it doesn't meet people's expectations for knocking out a quick script to get something done. When it comes to writing a script to parse some arguments, send requests to a few endpoints, process the responses, maybe send more requests, it's a lot faster to write something in Python from scratch using Click and Requests than it is to write it in Java even taking advantage of the model and client classes that we have for all of our services. Scripting in Scala using Ammonite would be the best of both worlds, but our Java code requires a ton of stuff to be set up and initialized before it can work.
And that's another big issue with Java. If you start out writing plain Java, people feel like they're missing out on all the "help" they'd get from a framework, and pretty soon you can't figure out how to make your code run at all except inside the framework. So you have to either write your scripts using the framework's CLI helper, which is probably some enormous abstract class that has its own argument parser you have to integrate with, or you start reverse engineering the framework's CLI helper to figure out which parts you need and end up running out of time and falling back to Python and swearing to figure it out someday. That's my experience, anyway.
- rho4 7y agoYou are assuming that people are not capable of "parsing args and sending request to endpoints" in an efficient way, using a few lines in their main programming language. This assumption is probably very offensive to any competent developer. Your are right, however, that a junior developer who is still getting up to speed with the main language of the team will be tempted to use whatever language / script that he already knows or encounters in a stack overflow answer.