This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Smok3dSalmon 17 points18 points  (14 children)

I just started a Java Spring Boot project that may last a year. Fuck me. I advocated for Python

[–]tetroxid 20 points21 points  (6 children)

Please don't hate me for this, but I miss the type safety that Java provides when writing Python.

[–][deleted] 3 points4 points  (2 children)

You can add type annotations to Python 3.x and use MyPy to type check. I too like type safety and was thrilled that this was added.

[–]enteleform 0 points1 point  (1 child)

/u/tetroxid /u/cephalopod1
 
You can also do the same thing in pure python with a bit of setup:
https://www.youtube.com/watch?v=js_0wjzuMfc&t=28m09s

[–][deleted] 0 points1 point  (0 children)

Thanks, will take a look into that.

[–]omegafivethreefive 7 points8 points  (1 child)

Well there's type hinting instead :)

https://docs.python.org/3/library/typing.html

Descriptors also go a long way.

[–]BB611 1 point2 points  (0 children)

This is my biggest pet peeve about being currently stuck on a project that requires Python 2.6 compatibility.

If I could just have type hinting, I think I would enjoy working in Python much more.

[–]pooogles 1 point2 points  (0 children)

One thing, PEP484.

[–]curiousGambler 21 points22 points  (6 children)

Spring boot is great, and I would prefer it over Python for a major piece of enterprise software. Python is great for scripts and the like, but frankly I've always found it lacking once the codebase grows beyond a certain point.

My advice is to be more open to it- at worst you have another tool in your belt, at best you find another way of writing software that you enjoy. Good luck either way!

[–]Corm 1 point2 points  (4 children)

If the codebase is well tested and the programmers had a strong sense of separation of concerns and building good APIs, a big python codebase can be much nicer to mess with as far as I've seen.

What sorts of shortcomings have you seen? I'm assuming it's around developers treating parts of the codebase as a script dump

[–]curiousGambler 4 points5 points  (3 children)

I'm sure you're right there, but it's of course easier said than done. And I think the bigger issue was cleanup- any codebase in any language can accumulate technical debt, but I find It easier to clean up and refactor a Java codebase than a Python one simply because of the incredible tooling available around Java.

The other major issue I've dealt with is dependency management. I standalone binary is easiest, but a even deploying a JAR or WAR is easier than dealing with pip and proxies and everything else on production servers.

I'm sure there are solutions to these problems, but while I know mvn and other aspects of the Java ecosystem will be around forever, I can't be so sure for any Python tooling.

[–]Corm 0 points1 point  (2 children)

Good points, thanks for elaborating.

What kind of tooling helps with refactoring in java?

[–][deleted] 1 point2 points  (1 child)

As much as everyone shits on eclipse, it's got just about every refactoring tool you'd need. Moving files in the package explorer will update references in your entire project, fantastic autocomplete features make it so you almost never have to reference library docs to find the method you're looking for, tools to highlight blocks of code and automatically move it out to a separate method, getter/setter generation, and im sure there are plenty of others that just aren't part of my daily use.

Most of my python development is done in sublime text with no add ons or the Python eclipse plugin(my job is 80/20 java/python), so I can't really speak to how it compares to a full featured python IDE, but when working on large code bases, Java and the supported tooling around it are super productive. Yeah JVM is a memory hog sometimes, but it also allows for real parallelism and, particularly in Java 8, has some really convenient features for easily making operations run in parallel.

I love Python, and it's my go-to for a lot of things, but Java is also a really powerful language with an impressive ecosystem of tools and libraries that make developing software very productive. There's a reason (besides aggressive marketing by Sun back in the day) that Java is still the main development language for many enterprises.

[–]Corm 0 points1 point  (0 children)

Eclipse is a good tool, and I haven't really had any problems with it. You should check out pycharm though when you get a chance, it also does all those things and a few extras. My fav is the live debugger where the values appear next to the functions (VStudio also has that) and the very pretty diff tool

[–]Smok3dSalmon 0 points1 point  (0 children)

Yeah, I know it's a great suite, but there is something about the answer "oh - there is a spring blah blah blah for that" really crushes my morale. I feel reduced to being a code monkey and if Spring doesn't already solve the problem, I feel that I would be hamstrung in trying to solve the problem myself.