11 ms·
I agree that Java is almost unwritable without an IDE, but that strictness has led to Java having better IDEs than most languages. For large code bases, most la
by dehrmann 7y ago
I agree that Java is almost unwritable without an IDE, but that strictness has led to Java having better IDEs than most languages. For large code bases, most languages get unmaintainable without an IDE, putting Java at an advantage. I'd still use Python for something simple that won't grow past a few thousand lines, though.
- mister_hn 7y agoWell, having tried both Eclipse and IntelliJ Ultimate, I can say that * Eclipse has a crappy UI and can't handle Java9+ code very well, but can handle large code bases * IntelliJ Ultimate has nice UI and assistance, but it totally fails with large code bases and still tricks you if you run code inside the IDE, especially when you want to use jigsaw modules and not classpath, as it uses by default Unfortunately, using Java with other editors (vim, VS Codium, etc) is just difficult
- wayoutthere 7y agoI think part of what's happening right now is that the IDE for most languages other than Java seem to be consolidating on VS Code as the lowest common denominator. This makes sense given how many projects these days are a hodgepodge of 3 or 4 different languages, but the fact that working with the JVM more or less requires a dedicated IDE makes Java a lot less attractive to most teams. (Yes, I know you can do Java in VS Code but I wouldn't want to manage a large Java codebase with it.)
- JackFr 7y ago> I wouldn't want to manage a large Java codebase with it. Why not?
- deleted 7y ago[deleted]
- itronitron 7y agoprobably because the code insight offered in VS Code is lagging behind what was available years ago in popular Java IDEs such as Eclipse and IntelliJ
- rmangi 7y agowhile I agree VS Code is starting to get a lot of traction, it's far from the only solution for polyglot development (IntelliJ...) and it certainly has the facilities to support large java codebases.
- jakub_g 7y agoThis. Far from being a fanboy of Java (and I write JS for a living), but you can generally quickly understand what's going on with the boring code, and can refactor mercilessly. Whereas in huge JS codebases relying on framework magic you can really have hard time to understand what's going on without plugging a debugger (and even then it's still not easy). Trying to refactor legacy code that relies on `this` and prototypes is a nightmare.
- eecc 7y agoMagik? Has anyone mentioned Spring yet?
- jdmichal 7y agoSpring magic is both relatively straight-forward to understand, and actually relies on heavy typing for autowiring.
- eecc 7y agoUh right, sure. But then there's the Spring lifecycle to take into consideration and it may happen that your annotations may or may not work. It depends (of course it's not totally aleatory, there's some logic behind it, usually obvious after several hours debugging ;) Another honorable mention is Spring Boot @Conditional for which adding a minor little diversion from defaults will turn a functioning happy project in a dysfunctional nightmare. :'(
- jdmichal 7y agoI agree with you completely on that. I'll clarify that, to me, there's a difference between straight-forward and obvious. And Spring is terrible at being obvious. Some annotation on a class 5 transitive dependencies deep can affect your code. It's definitely really deep into "spooky action at a distance", and that's always a nightmare for debugging. But once you see all the pieces, it's (usually) relatively straight-forward to describe what is happening.
- 7y ago
- TheFiend7 7y agoI disagree with the idea that you can't maintain a robust system/codebase in python, mainly because nearly our entire distributed computing stack is written in python. Granted it isn't 10s of thousands of lines, but it isn't small either. It does a lot of things ranging from webapis to data pipelining with ingestion and egestion of large datasets. One batch job can result in 10s of GBs in output files. It has to be performant too, 10s of millions of "operations" in one batch job is common. Admittedly the process/threading model can be painful to work around at times, but totally doable, and is honestly somewhat friendly to distributed systems to an extent because it somewhat forces you into an actor model paradigm.
- mlazos 7y agoThis is a little off topic but is the performance mainly coming from the computation being distributed? I wrote this text parser in python a few years ago, rewrote the same thing in Java and got like a 10x speedup. It’s possible I’m a bad python programmer.
- iudqnolq 7y agoAlso there's a general effect that any rewrite can improve the code quality. Same thing might have happened if you rewrote in Python.
- iamaelephant 7y ago> Granted it isn't 10s of thousands of lines, but it isn't small either. I'm not trying to belittle what you do, but if your good base is in the 4 figures in size then it's not large (in fact yes, it is small). When people talk about large code bases they are generally talking 100-1000x larger than yours, or more.
- jimbokun 7y agoTrue, but maybe that's partly because it's an order of magnitude smaller than the same program written in Java?
- pm90 7y agoStrictness of what, exactly? Of all Java code being belched by IDEs? “Code should be written for humans to read and only incidentally for machines to run” (paraphrasing a famous quote by Harold abelson)
- watwut 7y agoStrictness of syntax and language. It means that ctrl+space gives you exactly right methods into popup, that if you rename the class all places that use that class and no other will be changed, you can rename method and trust that all correct calls will be renamed too and no other. You can find all the places that call a method and know they are really all. That sort of basic thing. E.g. not for writing, but for analyzing what unknown code does and for refactoring that code. Comparing to javascript, in js you have to be much more careful when refactoring and changing things.
- coding123 7y agoincidentally: 1. used when a person has something more to say, or is about to add a remark unconnected to the current subject; by the way. 2. in an incidental manner; as a chance occurrence. That quote seems pretty misinformed, code has to be a lot more connected to the machine to be runnable that that quote would have us believe. Otherwise this would be valid code: Ask the user their name. After they enter the name, load a game. Use some cool graphics. That being said, perhaps that will be possible in 100 years. (Yes the first line may be possible in 10 years)
- dcolkitt 7y ago> For large code bases, most languages get unmaintainable without an IDE I disagree. Most people working on the Linux kernel (including Linus) or the major GNU projects (including RMS) are using vim or emacs with maybe some supplemental find/grep/sed/awk.
- Datenstrom 7y agoThis is my development stack, vim is my text editor with some minor modern features using plugins and tmux lets me tile into any other command line tool that is best for the job. I prefer my tools to be Turing complete, and there is nothing an "IDE" can do that I cannot (most likely far faster too).
- nobleach 7y agoI tried writing Kotlin in Vim, I really did. Java was somewhat manageable, but Kotlin was absolutely impossible. The biggest thing those bloated Java-based IDEs offer is deep introspection into the language. You use a reference, the IDE can auto-import the package for you. When learning a new language, knowing what package to import is invaluable. Even the Kotlin in Action book from Manning Publications flat out says, "the IDE will automatically import that for you". It was quite a turn-off but.... it's a nice language, so when I write it, I have to use IntelliJ.
- chongli 7y agoFor large code bases, most languages get unmaintainable without an IDE, putting Java at an advantage That’s an assumption which advantages Java by default. Other languages may be able avoid having a large code base entirely. I recall reading some stories of people rewriting giant Java code bases into very small Clojure programs that were more flexible, maintainable, and scalable.
- toolz 7y agodisclaimer: elixir fanboi here just trying my best to temper my bias for this comment. I recently rewrote a c# project that had not been completed in elixir. Hugely, anecdotal (as all of these types of stories are) but the project went from ~5kLoC to <800LoC when rewritten in elixir. That's after the elixir app was feature complete too. Now you might believe that's a developer experience gap, but the c# dev had way more experience with c# and in my experience this other dev is much better than me generally. Within a week of learning elixir he was catching my bugs all over the place.
- loxs 7y agoNeither 800LoC nor ~5kLoc qualifies as a large codebase. In my experience sh*t starts to get real when you go beyond 30-50kLoC, at least that's when I start losing the needle in the haystack. I've done that with Erlang and it's not really fun. In comparison, my current project in TypeScript is at this stage now and by using an IDE things are quite under control. Refactoring is easy and even major architectural changes are manageable (we did ~5 so far, depending on how you count). Wasn't the case with Erlang. We only managed to do one such major change and it almost killed the project. It probably even actually killed the project as we were late to the party and failed afterwards.
- BubRoss 7y agoWhy was dealing with a large project in erlang so difficult?
- 7y ago
- BOBOTWINSTON 7y agoI find it really amazing when a language's weakness drives an unintended strength to evolve like this. Ruby Example: Ruby projects tend to always have really well maintained test suites. The language makes it easy for you to introduce non-obvious bugs or write unreadable (yet efficient) meta code. This has lead to 1) very mature testing frameworks (meh) and 2) high adoption and usage of these frameworks (actually impressive). Funny enough, I think adoption of IDEs is extremely low in the Ruby world. 90% of the developers I interact with in my city are on Sublime/VSC/Vim. I've seen some pretty impressive usage of Rubymine that has made me curious, but never bothered to really spend time with it myself. I'd be really curious what the teams at GitHub/Stripe/[Insert big Ruby company] typically use editor-wise.
- codeduck 7y agoI do most of my ruby work in rubymine. I use it not so much for the IDE tools like refactoring etc, but because I can use it to condense multiple bash sessions into a single UI. I also use pycharm and IDEA, and certainly in IDEA's case I use it primarily because it's the best-in-class Java IDE.
- deleted 7y ago[deleted]
- albemuth 7y ago> condense multiple bash sessions into a single UI How does it compare to tmux/screen?
- codeduck 7y agoHaven't used tmux much, and last time I used screen was over 10 years go. Rubymine gives me my iterative test results, multiple independent launch commands, the ability to run a single rspec test, refactoring support, autocompletion, a coherent gem environment, debugging etc all in one place. Yes, I could do all this on the cli, but I'm lazy, and Rubymine means I don't need to.
- eeZah7Ux 7y agoHaving a problem so bad that you develop a good solution? That's the opposite of a feature.
- TeMPOraL 7y agoI have a bit of opposing viewpoint. One of my biggest hurdles ever in understanding large codebases comes from the sheer amount of code involved per any architectural unit. IDE may let me move around a codebase quicker, but if a single functionality is smeared into 20 classes in three separate inheritance hierarchies, this will still cause me headaches until I draw the entire structure on a large sheet of paper and keep it on my desk. There is only so much thing I can keep in my head or in front of my eyes at the same time, so the denser the language (in terms of ability to abstract and DRY things), the easier I find a large codebase to work with.
- ailideex 7y ago> I agree that Java is almost unwritable without an IDE, but that strictness has led to Java having better IDEs than most languages. I think the conundrum of java is not quite the same thing as strictness.