Re:Generating a Java program with 90% less code
by itronitron on Wednesday December 04, 2019 @11:30AM
(#21703601)
I am sure many people feel the same way about Python and Javascript. What you described seems to be a result of building larger systems in which multiple people are contributing code.
[ Parent
| on HN ]
Re:Generating a Java program with 90% less code
by root_axis on Wednesday December 04, 2019 @11:42AM
(#21703755)
The criticism doesn't really apply to Python and JavaScript though. Not to say that Python and JavaScript don't have their own issues, but dependence on an IDE tightly coupled to the language semantics is not one of them.
Re:Generating a Java program with 90% less code
by ng12 on Wednesday December 04, 2019 @11:57AM
(#21703921)
I can't speak for Python but the JavaScript community has been investing heavily in TypeScript, and the desire for a more integrated IDE experience is a huge driver for that growth.
Re:Generating a Java program with 90% less code
by root_axis on Wednesday December 04, 2019 @12:36PM
(#21704517)
Definitely true, though I think the problem is less severe with regard to TS because open source language-servers afford TypeScript IDE features universal availability which is not the case in JVM land. Also, consider the trend towards Kotlin in the Java world where a part of Jetbrain's business model relies on the fact that they created and maintain the language while also selling the IDE that makes the language practical to use (Kotlin being an amazing language notwithstanding).
Re:Generating a Java program with 90% less code
by jefflombardjr on Wednesday December 04, 2019 @06:13PM
(#21708212)
Typescript: Putting the Java™ in Javascript
Re:Generating a Java program with 90% less code
by SmellyGeekBoy on Wednesday December 04, 2019 @11:57AM
(#21703926)
Last time I worked with Python or JavaScript I was using a very basic text editor. I'm not sure I'd be quite so brave with Java.
Re:Generating a Java program with 90% less code
by kjeetgill on Wednesday December 04, 2019 @12:03PM
(#21703988)
I don't know about JS, but my python work is done in a repl like ipython in conjunction with a text editor. It gets me half of what I wanted from an IDE.
Re:Generating a Java program with 90% less code
by nurettin on Wednesday December 04, 2019 @11:36AM
(#21703683)
I confirm this. I rename classes and move them around, and without a refactoring tool that renames files and changes imports automatically, life would be very hard. Before refactoring tools got to this level, I was running pytest to see what import statements got affected during my refactors.
Re:Generating a Java program with 90% less code
by salawat on Wednesday December 04, 2019 @12:06PM
(#21704039)
Uh. Question. Why are you executing tests to get the compiler to tell you what was effected instead of doing a top level recursive grep to identify any classes or configs with an explicit symbolic dependency?
I mean, you get the same result, sure, but I find I can hardly ever rely on test coverage alone as an accurate safety net to clearly indicate whether I've reached an actual stopping point for a full refactor.
This is one of the ways in which Java excels, in that that loop is fully accommodated for in most major IDE's.
You can still get caught by surprise at runtime, but I've found that for a strongly typed language like Java, the syntax, and necessity of boilerplate makes most bugs obvious until you start getting overly dependent on frameworks you don't understand.
Re:Generating a Java program with 90% less code
by nurettin on Wednesday December 04, 2019 @12:56PM
(#21704808)
I am not executing tests to perform import error detection. That was before refactoring tools got better. I was executing tests to check for import errors because it doesn't rely on full coverage on every method. It relies on all modules being imported by tested modules. That is easy to do even if you are too lazy to test every module. Just put an empty test function in all of them and pytest will detect them recursively. Given all that, I would avoid executing manual grep commands. However, you have a valid point for configuration files. Especially log configs need to be checked.