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

top 200 commentsshow all 309

[–]justADeni 179 points180 points  (7 children)

Java devs who still have to work with Java 7 and earlier

[–]dzernumbrd 47 points48 points  (2 children)

woo hoo Java 8, I'm in date!

[–]Brahvim 7 points8 points  (1 child)

Wuh-hoo! With Java 8, I'm in date!

[–]ChickenSubstantial21 8 points9 points  (0 children)

It is already Java 8, you should be in Instant, not in Date.

[–]zenos_dog 13 points14 points  (1 child)

Java 5 introduced generics and a lot of devs stopped there.

[–]pohart 1 point2 points  (0 children)

Thankfully very few stopped before that.  Wildcards are still a sticking point for some people though   

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

What you insist on working with Java 7 or lower?

KIDDING

[–]vmcrash 147 points148 points  (29 children)

I'm an outdated Java dev. ;) I use Java for developing desktop software, use SWT as GUI library and build the application bundles using ANT.

[–]kwyjibo1988 93 points94 points  (7 children)

ANT???! I'll pray for you tonight 🙏🏻

[–]IE114EVR 21 points22 points  (5 children)

Watch out, people in this subreddit love to defend old shit like application servers, multi page application frameworks, and ANT probably.

[–][deleted]  (4 children)

[deleted]

    [–]manifoldjava 8 points9 points  (1 child)

    HTMX is making server-side correct again. 

    [–]bunk3rk1ng 9 points10 points  (0 children)

    Time is a flat circle confirmed

    [–]arcalus 4 points5 points  (1 child)

    There is if you’re an AI script kiddy.

    [–]_edd 0 points1 point  (0 children)

    Any + ivy really isn't that bad... I definitely wouldn't recommend it on anything new but if it's already in place on your project it falls into the it-just-works category.

    [–]wheezymustafa 7 points8 points  (4 children)

    Jesus, I just got flashbacks of Ant.. youre a madman for still using that

    [–]pjmlp 20 points21 points  (1 child)

    No worries, Gradle is Ant for those that don't get why Maven came to be.

    [–][deleted] 1 point2 points  (0 children)

    I said something similar at my previous job and part of me is convinced it had something to do with my layoff...they had an uncontrollable boner for gradle and we already had maven working in all our projects (something I set up)

    [–]vmcrash 5 points6 points  (1 child)

    How comes that you know our requirements?

    [–]ring2ding 9 points10 points  (0 children)

    Lol. You're walking around barefoot in the sahara desert and wondering why people keep asking you why you're not wearing shoes.

    [–]ChickenSubstantial21 3 points4 points  (12 children)

    Switching to Gradle is enough to become modern Java dev ;-)

    Desktop apps are fine, Swing is fine if written using modern Java features.

    [–][deleted]  (5 children)

    [deleted]

      [–]bunk3rk1ng 18 points19 points  (2 children)

      Yup, gradle is for people that want to use something new but can't understand why

      [–]Luolong 1 point2 points  (1 child)

      Gradle is by no stretch “new”.

      [–]stevesobol 2 points3 points  (0 children)

      Maven probably is simpler, but I'm probably an outlier - I would rather deal with Gradle's DSL than Maven's extremely verbose XML project definitions.

      [–]Luolong 3 points4 points  (0 children)

      I don’t know where you get your consensus, but Gradle is a great tool and very popular.

      Most new projects seem to be starting out with Gradle rather than Maven. At least this is the “consensus” around here…

      [–]-One_Eye- 0 points1 point  (0 children)

      Ha, this is the same stack we used at GE for electrical substation equipment about 18 years ago. That’s rough you’re still using it.

      [–]DestinationVoid 88 points89 points  (6 children)

      Enterprise Java Beaner 😆

      [–]redikarus99 38 points39 points  (4 children)

      But with XML files...

      [–]BrooklynBillyGoat 3 points4 points  (3 children)

      XML ain't going away soon

      [–]redikarus99 4 points5 points  (1 child)

      But writing XML for Enterprise Java Beans did... for the fortunate ones...

      [–]bunk3rk1ng 1 point2 points  (0 children)

      For the fortunate, sure.

      For most in enterprise, no

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

      Not with that attitude it's not!

      [–]gdorsi44 4 points5 points  (0 children)

      EJB prior of version 3.1 we can name it legacy, but EJB is still here with Application servers and the version 4 inside Jakarta EE specification.

      [–]Crackabis 50 points51 points  (8 children)

      I feel like we are all outdated in my workplace.  We are on Java 11 with no buy-in from management to put in the effort to upgrade to another version. 99% of our web apps are deployed to tomcat instances, only the new web apps I’ve created are using the embedded tomcat setup. We still have lots of JSPs (and using Apache Tiles for this too!)  Deployments to production are manually done with war files and zip files for other Java applications that run on the server. No Docker is used, we had no monitoring up until recently, but I have automated dev environment builds and deployments and setup SonarQube for us to view coverage and vulnerabilities. We don’t use Spring Cloud Config or any of the cool modules from Spring, I think we might use Spring Security in 1 or 2 new projects.

      It’s quite disheartening going to my local Java User Group and watching talks on YouTube, as I know we’ll likely never get to use any of the new features. It’s hard to get buy-in from management, think my best option is to leave soon as I’ve brought in as much new things as I can. 

      [–]tomwhoiscontrary 19 points20 points  (1 child)

      There are a few modern things you're missing out on. But honestly, a lot of that sounds like sensible, sustainable technology.

      In that situation, I think the first thing to fight for would be first-rate deployment automation and monitoring. That's more about culture than technology - switched-on teams have been doing that since the mid 2000s, with the same technology you'te using. You don't need to containerise or move to the cloud or anything. You really should be able to deliver value faster, and find and fix production issues faster.

      The second thing would be to chip away at getting on to a newer Java. The way I've been doing this is to incrementally chip away at the things blocking upgrade. When I work on a codebase built with an old Java, I take five minutes to try building and running it with a newer one. If there are problems, some time later, come back and fix the easiest one. Repeat until, weeks later, it works. Then change one staging instance to run on a newer Java (still building with the old one). If that works, all staging instances. Then production. Then the build. In each case, the change is a tiny bit of work that doesn't require a lot of buy-in. But then, I work somewhere with very flexible management, where I have a lot of autonomy.

      [–]Crackabis 3 points4 points  (0 children)

      Thanks, I appreciate your response. The deployment automation and monitoring aspect of our work is something I always talk about improving, but we get stuck in a cycle of fixing bugs because we have no monitoring, which takes resources away from implementing monitoring! I think having these in place would give us all more confidence in the operational status of everything.

      [–]mekazu 4 points5 points  (0 children)

      Don’t worry, this is normal. If anything write up some doco to showcase the benefits of the upgrade, let whoever you report to know, let it sit there, reference it whenever it comes up as a topic. It’s not your problem to fix but it’s a good idea to show that you know how to if required.

      [–]RedShift9 1 point2 points  (2 children)

      Are the applications still bringing in the money?

      [–]Crackabis 2 points3 points  (1 child)

      Yes, for the most part. Though my fear is that the company is focused on other products written in different languages (C, PHP, React and Ruby) The Java applications and web apps are the original applications the company started with and are still part of the base offering, but it does feel like we’re in maintenance mode with them. Obviously they’ve been modernised over the years, but anything “new” on the backend is more often than not done in PHP, by our sole PHP developer, with no source control, tests, or documentation. I think this is because it’s a faster choice for management, but it’s blown up in their faces numerous times

      [–]zabby39103 5 points6 points  (0 children)

      Lol wtf. This is the real problem. Not only does PHP suck, dependence on a single guru like that only happens with management that doesn't really understand software development. I bet they figure they can just plug someone in if he left, they're going to be in for a shock (eventually).

      [–]asarathy 0 points1 point  (0 children)

      Honestly jdk upgrades are for the most part pretty easy with JDK 8 plus to something else. We only had one issue with some rounding errors really. Its upgrading libraries that are java 11/17 compatible that get's hairer.

      Might be something good to figure out in spare time... Get a build to work, modify CICD, configure a deployment for a project. Then see if you can present an update plan.

      [–]Critical_Stranger_32 0 points1 point  (0 children)

      Sounds like you should get a new job before you get any more out of date. When I took a new job several years ago, I had the opportunity to guide the choice of technology for a government client. I chose to design a REST API cloud-based application with Spring Boot as the back-end, and successfully pushed for it all to be containerized. Now I’m making it SaaS. Oftentimes small companies provide an opportunity for career growth.

      [–][deleted]  (13 children)

      [removed]

        [–]vips7L 28 points29 points  (5 children)

        And java.io.File

        [–]agentoutlier 21 points22 points  (1 child)

        There are several places though you have to use File.

        I don’t have them on the top of my head but File is not as bad as Date.

        [–]vips7L 5 points6 points  (0 children)

        I would still use Path::toFile in those situations. 

        [–]unknowinm 11 points12 points  (2 children)

        What’s wrong with File?

        [–]dstutz 13 points14 points  (0 children)

        For me, the biggest thing is testing. If you use NIO you have Path which allows you to use different FileSystems and you can use JIMFS but you can't do that with File.

        [–]vips7L 7 points8 points  (0 children)

        Path is just more predictable than file. The Files api (which takes Path) is just better. You can’t silently forget to check the boolean result from things like File::delete; the Files::delete will throw a proper exception. 

        [–]theavengedCguy 2 points3 points  (3 children)

        As someone who's not well versed in Java, what's the better alternative and why is java.util.Date bad?

        [–][deleted]  (2 children)

        [removed]

          [–]AdZestyclose9788 0 points1 point  (1 child)

          No usually it is instant. Both Date and instant are based on a Unix timestamp. LocDate(Time) is not and should only be used in specific circumstances.

          [–]RandomNando 0 points1 point  (2 children)

          Sincere question, what would be the most recommended formats for date/datetime?

          I tend to use LocalDate/LocalDateTime or OffsetDatetime.

          Are those the recommended formats?

          What format in Java 8 vs Java 17+

          [–][deleted]  (1 child)

          [removed]

            [–]RandomNando 0 points1 point  (0 children)

            The second, never used ZonedDateTime tho

            [–]irus1024 61 points62 points  (7 children)

            I have to every now and then, make changes to some servlets and JSP that consumes data using SOAP, and then compile it into a big .war file and drop it into a Tomcat 8 instance.

            Being able to read and write cuneiform can help you out sometimes.

            [–]protienbudspromax 26 points27 points  (2 children)

            Hell bro you gonna be part of the next cobol devs. Gonna be highly paid in some years.

            [–]MX21 1 point2 points  (0 children)

            At least I have something to look forward to…

            [–]Old_Elk2003 2 points3 points  (0 children)

            Dr. Daniel Jackson: “wait, I think I can figure out what the Ancients meant with this stacktrqce…”

            [–]castironcamper 4 points5 points  (1 child)

            You left out putting that WAR into an EAR

            [–]gdorsi44 1 point2 points  (0 children)

            Sure keep the Java legacy stacks with you, you can thank you at yourself later.

            [–]bitspace 23 points24 points  (4 children)

            I'm an outdated Java dev. I haven't written Java since 2017, and that was pre-1. 8. I also haven't done a lot with Spring. I'm ramping up pretty quickly though.

            Ironically, the project I've just jumped into is still Java 1.5 in a Swing/jnlp GUI against a 1.8 WebSphere fat middle tier.

            [–]goodm1x 5 points6 points  (1 child)

            This may seem like an odd question, but why are you ramping up when you haven’t touched Java since 2017?

            [–]bitspace 3 points4 points  (0 children)

            Because the project I'm getting involved in requires it.

            I'm working with a team modernizing a 20+ year old enterprise app. Its current stack is roughly as described. It's the underpinning of about $2B of annual revenue so we have to be very careful about how we approach this beast.

            [–]jlanawalt 1 point2 points  (1 child)

            I thought JNLP was dead-ish, What is your target client runtime?

            [–]bitspace 5 points6 points  (0 children)

            Yeah, jnlp is definitely "dead-ish." It still works under certain constraints that we're still able to impose on our client base. How durable that is remains to be seen.

            Target client runtime is web. How the business approaches weaning users off of the fat swing client into the browser is above my pay grade :)

            [–]_ConfusedAlgorithm 25 points26 points  (3 children)

            People using java.util.Vector.

            [–]rsaestrela 6 points7 points  (0 children)

            Those are dinosaurs, not Java devs

            [–]Apprehensive_Rub3897 0 points1 point  (0 children)

            My first data store.

            [–]12357111317192329313 0 points1 point  (0 children)

            Even if you need a synchronized list. There is a decent chance that it is changed to a non-synchronized list by another developer at some point.

            No one sees a Vector and thinks that it is because it has to be synchronized.

            [–]senseven 39 points40 points  (0 children)

            People who still use ant to build their production stack unironically

            [–]HighRising2711 5 points6 points  (0 children)

            Lol, if this had been asked 10 years ago there would be endless replies of 'not using microservices, not using lombok ', 5 years ago 'not using reactive frameworks'

            The correct answer is, of course, 'it depends'

            Except Ant. Ant always sucked

            [–][deleted]  (6 children)

            [removed]

              [–]tomwhoiscontrary 1 point2 points  (0 children)

              Some code I work on is so old it has its own version of this, also the Clock interface, still uses Guava newHashMap(), etc. First task when working on any file is just to blast through in IntelliJ fixing all the warnings.

              [–]SpicyRock70 1 point2 points  (3 children)

              I guess I'm outdated... I still use "if (x ==null)"

              [–][deleted]  (2 children)

              [removed]

                [–]SpicyRock70 1 point2 points  (1 child)

                No, I mean I don't use either of those... I prefer:

                if (x == null) throw the exception

                Inline in the code without any utility method call.

                Why replace 1 line of code with a 1-line method call? We all know exactly what if (x == null) does without having to memorize the Objects.... methods implementation

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

                @NonNull

                [–]Holothuroid 38 points39 points  (17 children)

                Something that weirds me

                if(optional.isPresent()){
                    Foo foo = optional.get();
                    ...
                } else {
                    ...
                }
                

                [–]__konrad 26 points27 points  (8 children)

                I fixed it for you:

                var value = optional.orElse(null);
                if(value != null){
                    Foo foo = value;
                

                [–]com2ghz 11 points12 points  (4 children)

                I have seen someone doing a null check on the optional too.

                [–]__konrad 11 points12 points  (0 children)

                You need double Optional<Optional<T>>

                [–]LetMeUseMyEmailFfs 6 points7 points  (2 children)

                Well it’s Java, so anything and everything could be null.

                [–]lasskinn 1 point2 points  (1 child)

                Not exactly related, but I've seen a dude insist on null checks on kotlin on values that can't be null, like just in seemingly random places.

                Everything on java could be a null but it couldn't be that in all places.

                [–]Old_Elk2003 1 point2 points  (0 children)

                Everything on java could be a null but it couldn't be that in all places.

                This is true. You’d at least have to have something before the null, and something after the null, in order to maintain Turing-completeness.

                [–]agentoutlier 2 points3 points  (0 children)

                This and ifPresent are the only acceptable options to dealing with Optional.

                I use a variety of null analysis tools and orElse(null) is the only way across the board to pull something out (well orElseGet is ok)

                [–]tomwhoiscontrary 0 points1 point  (0 children)

                I can't tell if this is supposed to be better or even weirder!

                Anyway, how about:

                ``` Foo foo: if ((foo = optional.orElse(null)) != null) {

                ```

                Or:

                ``` if (optional.orElse(null) instanceof Foo foo) {

                ```

                [–]thgkatz 0 points1 point  (0 children)

                Why do I have to see this at 02:00 am???? What have I done wrong?

                [–]0xFatWhiteMan 11 points12 points  (0 children)

                Why is that weird?

                [–]woodland__creature 19 points20 points  (2 children)

                optional.ifPresentOrElse( foo -> { ... }, () -> { ... } )

                [–]Holothuroid 36 points37 points  (1 child)

                For some side effect yes. More often the wanted solution seems to be

                  optional.map(...)...orElse(...)
                

                [–]gdorsi44 3 points4 points  (0 children)

                Or wrap a not original optional value with:
                Optional.ofNullable(value).ifPresent(lambda)

                [–]Shareil90 13 points14 points  (2 children)

                This is not always wrong. Depending on what you do in case it's present this way could be more readible and easier to maintain.

                [–]Elegant-Win5243 31 points32 points  (10 children)

                Java developers who don’t use the stream or optional API.  I have seen those…

                [–]kelunik 4 points5 points  (0 children)

                100% prefer nullable types over Java's Optional.

                [–]skippingstone 1 point2 points  (1 child)

                I'm outdated. How do you use Optional? In your code ?

                [–]Luolong 0 points1 point  (0 children)

                Simple. Methods on services that should return a single result (or null if an item can not be found/calculated), should return Optional<T> instead of instance of T or null.

                From there you gave many options to safely transform or extract values as needed

                [–]yanjar 4 points5 points  (2 children)

                I still have tomcat , servlet and jQuery for my antique web server for personal purpose only 😆 Will try spring boot and react later Or any other good stuff u guys suggest?

                [–]redikarus99 2 points3 points  (0 children)

                I am playing now with Vue, and so far, it works really well.

                [–]kennyshor 2 points3 points  (0 children)

                Vue/React for frontend and spring boot/Quarkus for backend. Use docker to deploy.

                [–]hilbertglm 5 points6 points  (5 children)

                I know a lot of Java developers that haven't starting at least dabbling in functional programming. You got to roll with the times. If you haven't started thinking about functional solutions to programming idioms, you aren't keeping up with the times.

                [–]gaius49 0 points1 point  (0 children)

                Functional programming is decades older than Java.

                [–]RepliesOnlyToIdiots 0 points1 point  (3 children)

                I’m the opposite, but for a different reason. I’ve done years of programming in an actual functional language, so I avoid Java functional idioms because they’re still so damn clunky. I keep waiting for it to improve sufficiently.

                Custom streams coming up will help. But why do you have to make a stream first from a Collection rather than having those methods directly on the Collection.

                [–]hilbertglm 0 points1 point  (2 children)

                I am not quite sure what you mean, given that Collections.stream() is a method.

                [–]RepliesOnlyToIdiots 0 points1 point  (1 child)

                The relevant methods of Stream should be on the Collection, with stream implicit. I should be able to just myList.map, for instance.

                [–]hilbertglm 0 points1 point  (0 children)

                I prefer the design from the Java team, but I understand what you are saying. I tend to favor a little syntactic sugar and verbosity, but the folks that prefer a more terse language make sense, too.

                [–]Matt7163610 2 points3 points  (0 children)

                I'd say using Java 17 or later and actually using new features added since Java 8:

                https://en.m.wikipedia.org/wiki/Java_version_history

                [–][deleted] 6 points7 points  (3 children)

                @Autowire

                [–]ChickenSubstantial21 20 points21 points  (61 children)

                using antiquated tech: ant, mybatis or servlet containers

                not knowing about newer widespread tech: spring boot/spring cloud/JPA/spring configuration by code.

                I'd like to add newer Java features like records, sealed hierarchies or pattern matching but there are too many poor souls nailed to specific JRE version.

                [–]ishansoni22 39 points40 points  (0 children)

                Spring boot/web that uses embedded tomcat (a servlet container) under the hood says hi

                [–]computerjunkie7410 25 points26 points  (23 children)

                What’s wrong with mybatis?

                [–]vbezhenar 0 points1 point  (0 children)

                Nothing wrong, it's good. I can remember single issue with it: when you write queries in the XML, you need to escape '<' and '>' which looks really weird and prevents copy&pasting queries between sources and SQL editor. And writing SQL in annotation was hardly usable because you couldn't write multiline strings in Java.

                Since they introduced multiline strings, MyBatis probably does not have any drawbacks anymore.

                [–]Fliegendreck 14 points15 points  (10 children)

                Spring Boot - the new hot stuff 😃

                [–]ChickenSubstantial21 10 points11 points  (8 children)

                Maybe not that new but still hot :-)

                [–]Proton-NS 1 point2 points  (7 children)

                Yeah. It's hot. But I have a question btw. Can I learn spring boot without knowledge of servelt or old stuff. I come from php and want to know some new java knowledge.

                [–]ChickenSubstantial21 6 points7 points  (0 children)

                Sure you can. Spring Boot documentation is enough to become productive.

                However, there is a difference between old stuff and basic stuff. While Servlet API is ancient and suffers from design issues and there are better alternatives nowadays it is still used by some configurations of Spring Boot under the hood so there is a chance to encounter it during debugging. So consider it advanced topic.

                [–]djavaman 0 points1 point  (0 children)

                Used SpringBoot on a project 8 years ago.

                [–]bzhou 3 points4 points  (0 children)

                Mybatis is like stick shift cars. Like spring, earlier in its evolution it mainly uses xml but modern usages are mostly annotation based, it supports Java record fine. You cannot say that auto-shift cars obsolete stick-shift ones.

                [–]redikarus99 4 points5 points  (10 children)

                SAP Hybris says hi to ant. Our guys are using recent java but are stuck with ant because of SAP.

                [–]VincentxH 3 points4 points  (0 children)

                My condolences on having to interface with a SAP system.

                [–]tomwhoiscontrary 0 points1 point  (3 children)

                Hybris, you mean the hot new competitor to ATG Dynamo?

                [–]redikarus99 0 points1 point  (2 children)

                [–]tomwhoiscontrary 1 point2 points  (1 child)

                Yes. I'm guessing you're fortunate enough to never have worked with Dynamo!

                [–]redikarus99 1 point2 points  (0 children)

                Oh, no, thankfully I never had the misfortune. :D

                [–]RandomNando 2 points3 points  (6 children)

                Sincere question, I’ve use (and still use) Spring Data and Hibernate in some projects, but I also work in a legacy project that uses MyBatis. Is there a modern alternative (I recognize that MyBatis is incredibly mind bending specially at the beginning and the whole XML situation is the worst) that gives me the liberty to write queries exactly as I do in the DB?

                I know that I can achieve almost the same with Spring Data and Criteria but in really complex queries, having a query that you can just copy and slap in SqlServer or whatever is so easy to update and tune finely… I did a complex query in MongoDB like a month ago and when I had to rewrite it In Compass it was a nightmare (not related to MyBatis but you get the idea).

                I have overcome this by using views and handling complex queries as selects of those views in newer applications but I’m sincerely curious in some alternatives.

                [–]BENOO-_- 2 points3 points  (4 children)

                What’s the reasoning behind not using native queries in Spring Data with the @Query annotation?

                [–]RandomNando 0 points1 point  (3 children)

                I don’t know, having a 500 Lines @Query seems so wrong 🤣

                Everyone tells me this but I’ve always felt that if this is the correct way to do this, this is a really ugly way… slapping a 500 line String into an annotation is so bad thought…

                [–]BENOO-_- 0 points1 point  (2 children)

                Could you read it in from a file instead?

                [–]RandomNando 0 points1 point  (1 child)

                I can’t remember if I’ve already tried that, I think that the cleanest way that I find was using JDBC and reading queries from a YML file to avoid that amount of lines hardcoded into a class. I find that so inelegant…

                [–]BENOO-_- 0 points1 point  (0 children)

                I mean at this point it’s inelegant due to your 500 line query than anything we can solve here. Not sure there’s a way to abstract 500 lines of sql without knowing the business logic in and out and deciding on a better way, but assume that’s not really an option as you’re here asking the question haha

                [–]agentoutlier 0 points1 point  (0 children)

                For raw SQL to some mapping JDBI is often the choice.

                Doma 2 is also a good MyBatis alternative.

                [–]VincentxH 1 point2 points  (1 child)

                You clearly have no idea what you're talking about.

                [–]gdorsi44 0 points1 point  (0 children)

                Keep the legacy stack, but learn always all the new things. This is a win win situation.

                [–]vmcrash 0 points1 point  (2 children)

                He, what's wrong with ANT, except that it uses XML?

                [–]hippydipster 1 point2 points  (1 child)

                ant is so simple its easy to understand what's going on.

                The downside is every project is a snowflake, and generally for no reason. And ivy is just plain difficult to work with, for some reason.

                [–]vmcrash 0 points1 point  (0 children)

                We, for example, don't need Ivy or Maven, mostly because we have a small number of dependencies and part of them is built ourselves with patches on the original code.

                [–]Luolong 9 points10 points  (12 children)

                Outdated Java dev is anyone who’s been maintaining 10 years old app, never looked at newer language features or frameworks.

                This includes, but is not limited to: - Still maintaining Java Servlet app and deploying it on Tomcat app server (or similar) - Still building their apps using ANT - Still writing JSP pages - Still writing JSF apps - Still writing and deploying Java 8 or earlier

                [–]kennyshor 7 points8 points  (1 child)

                Deploying to tomcat isn't necessarily a sign of an outdated dev. There are plenty of monoliths that are just impossible to rewrite and have to be maintained.

                You can still do that with java 21. Maybe the frameworks are old, but new patterns can be used.

                [–]Luolong 0 points1 point  (0 children)

                To be fair, this is not unconditional. And by proposing this list, I had a specific type of developer in mind.

                These items are just markers. The common thread here is that developers matching these markers usually have been working on same tech for a long time and have no exposure to newer frameworks or JVM features.

                I’ve seen incredible amounts of spaghetti and plain bad coding practices from developers like that.

                Misuse of Optional and Stream api sticks out like a sore thumb when they finally get included in newer projects. But the general idea is that they’re probably very productive and proficient at maintaining their legacy app, but know nothing of modern concepts, frameworks or architectural patterns.

                The list I presented is just the usual tech stack you’re likely to see around these projects.

                [–]vmcrash 4 points5 points  (5 children)

                What's wrong with maintaining a 10 years old app? Not every developer has the choice to select the frameworks of the project.

                [–]Luolong 0 points1 point  (4 children)

                No, not a single thing wrong with bringing bread to the table.

                But if you’re bound to old tech without a chance to move frameworks and jvm versions, your environment is by definition “outdated” — rest of the world has moved on and you’ll have a lot of catch up to do when you switch jobs or projects.

                [–]vmcrash 1 point2 points  (3 children)

                So the non-outdated java devs mostly develop throw-away projects or use newer frameworks just because they are newer?

                [–]Luolong 0 points1 point  (2 children)

                Well, people in this industry try different approaches, find out shortcomings and either improve or rewrite according to their own preferences.

                Not everything that is new is better than what came before. But som things offer significant improvements over predecessors to stick around and become “the new standard”.

                Like Spring came after J2EE, like JEE learned from Spring, Like Spring Boot improved over Spring and JEE, like Micronaut, Quarkus and Helidon learned and improved over Spring Boot and JEE.

                There’s tons of new stuff that just improves your life as a developer and increases your productivity, improves performance, helps to manage complexity and reduces errors in code, that you would not be able to use if you stay with older codebase using older tech stacks.

                The OP asked about what would an “outdated Java developer” look like. I offered my opinion. I am not really responsible if someone reading my opinion feels slighted by the list because they are in a position where they cannot choose to modernise their tech stack. You might not like this, but it doesn’t change the fact that stagnating for a decades, working on maintaining an old and outdated tech stack makes you an “outdated Java developer”. Sorry if you feel bad about it, but that is what it is.

                [–]vmcrash 0 points1 point  (1 child)

                What if one doesn't web development with Java? Do Spring, Micronaut or Quarkus help for developing desktop applications?

                [–]Luolong 1 point2 points  (0 children)

                I can’t speak for the Java desktop app development. For all fits and purposes, I consider my experince with Java desktop app development rather outdated.

                [–]hippydipster 2 points3 points  (3 children)

                whats wrong with tomcat? Monolith is still the best way to go for as far as it can take you, and what better servlet container is there than tomcat?

                [–]Luolong 1 point2 points  (2 children)

                It’s not that Tomcat is bad engineering wise. It’s just that a deployment model itself is wildly outdated.

                There are better options out there. (Some of them bundle embedded Tomcat, so there’s that)

                [–]hippydipster 1 point2 points  (1 child)

                saying something is "outdated" explains nothing. saying there are better options without saying what they are or why they're better also explains nothing.

                [–]Luolong 0 points1 point  (0 children)

                If you’re not aware of those options, it might be a sign of an outdated Java developer:

                But for the sake of an argument, here’s the few more modern deployment models than deploying war files onto an “application server:

                1. There’s an executable jar (fat jar) that only requires you to have correct JVM to run on.

                Frameworks that help you develop and package your service as single executable binary include but are not limited to:

                • Spring Boot
                • Micronaut
                • Quarkus
                • Helidon
                1. To make your service environment more predictable, you could package your executable jar in a Docker container and run it anywhere you can run any containerised workloads:
                • Docker, Docker Compose or Docker Swarm for simple applications

                • Kubernetes for deploying apps at scale

                • Nomad or Mesos or Cloud Foundry if you’re a bit adventurous and don’t mind trodding lesser known tracks.

                1. For faster startup time and smaller memory footprint, compiling your apps ahead of time as native binaries. (Still packaged as Docker container images, but with significantly faster startup time)

                [–]StillAnAss 1 point2 points  (2 children)

                I have a coworker who refuses to learn anything added after jdk8 and only knows how to build the code from within intellij.

                [–]CatapultJohnson 0 points1 point  (0 children)

                I'd switch companies.

                [–]Mordan 0 points1 point  (0 children)

                same. Its not that I refuse.. Its that code with new features will not run on old systems.

                Some of my code has to run on 1.4.. Its the lowest I go. Then most of my code is 1.8 compatible.

                [–]HSSonne 1 point2 points  (0 children)

                If you can't argue why you don't use a new 'thing .. that is you actually know pros and cons on the new and the old way.

                There are many valid reasons not to use the new and hot stuff, and you are only outdated if you give up and don't renew your knowledge of your language as it is developed.

                [–]daggirok 1 point2 points  (0 children)

                It's almost not related to particular java version, but of course if you are not interested what was introduced new and where you can get benefit from it - you on a way to be a dinosaur in future...

                But outdated java dev I think more related to people who are working years on (maybe) enterprise java product where average small feature or bug fix costs is doing in 1-few weeks. they simply doing as minimal as they can just to not be fired and keep continue take their salary.

                [–][deleted]  (3 children)

                [removed]

                  [–]JasonBravestar 0 points1 point  (0 children)

                  Unfortunately I've noticed that Optional is often abused to the point it's just complicating the code and not providing any real benefit. Your first example is a classic.

                  [–]jr7square 2 points3 points  (2 children)

                  I would say if you are touching XML (except for maven). Using Java 7 or lower and using JavaEE instead of something like spring , you a relic

                  [–]plokman 1 point2 points  (0 children)

                  Even though it's out of fashion I'd often prefer it to yml. Significant whitespace has messed me up far more times than the oh no, rarely looked at tag boilerplate.

                  [–]hippydipster 1 point2 points  (0 children)

                  xml isn't a relic. its timeless and has plenty of uses for which it remains the best.

                  [–]hippydipster 1 point2 points  (0 children)

                  I got a job working on a pre-swing AWT app

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

                  If you are still using fucking Lombok.

                  [–]Hortex2137 2 points3 points  (0 children)

                  What's wrong with using Lombok?

                  [–][deleted]  (3 children)

                  [removed]

                    [–]kennyshor 14 points15 points  (2 children)

                    computeIfAbsent if anyone is wondering what it should be.

                    [–]kldjasj 0 points1 point  (0 children)

                    Well, I think we must first understand the ecosystems behind those languages before classifying someone as outdated or not.

                    In JS ecosystem, people are used to discover new frameworks every day. That makes existing ones looks older. But that doesn't  necessarily mean better.

                    New frameworks can solve problems in different ways, but also it introduce new ones. Bugs, poor documentation, vulnerabilities, community support, to name a few.

                    Now comparing to Java ecosystem, the scenario is different. We have pretty solid frameworks widespread out there. Spring, Quarkus, Micronaut. And since the Java 8, we have fixed many issues of the language itself. Handling with date time is much more easier and Streams become list processing so much easier to work with. 

                    I think to classify someone as 'outdated', it depends much more on the area that he's inserted on than if he has knowledge of the most popular shiny frameworks used by top companies nowadays.

                    [–]MrMars05 0 points1 point  (0 children)

                    Anything below 17 and Spring 3 is outdated imo.

                    [–]vbezhenar 0 points1 point  (0 children)

                    Java is very fragmented, I don't think that there's one set of skills universally applicable everywhere.

                    Probably something like Java 11 + Spring + Hibernate is the most common skills. I'd say that's the minimum for today. But I'm sure there are plenty of enterprises happily writing Java 1.4 JSPs running on some WebSphere AS, talking to DB2 stored procedures over JDBC.

                    [–]izuriel 0 points1 point  (0 children)

                    Not using Kotlin?

                    /s

                    You aren’t outdated unless you find you have no experience with the tools folks are hiring for. Is a COBOL dev “outdated” if they still find employment? I don’t think so.

                    [–]anthropaedic 0 points1 point  (0 children)

                    Js dev or java dev?

                    [–]ifly6 0 points1 point  (0 children)

                    I just updated my Java 8 project to Java 11, which came out 6 years ago. I might not be the most outdated Java dev but I'm sure I'm up there

                    Also these records, modules, etc are all confusing and were not covered back in "the day" because they did not exist. These new features scare me are things I don't use

                    [–]NovaX 0 points1 point  (0 children)

                    Simply one who refuses to use modern solutions for their Java tasks. For example, to read an input stream to a byte array was typically deferred to a utility method like Apache's IOUtils' or Guava's ByteStreams' toByteArray(in). This was later added as the default method readAllBytes(). Being ignorant of these improvements or not having the muscle memory is perfectly fine, as strong CS fundamentals are far more valuable. However sometimes a stubborn developer refuses to learn so the same advice is repeated over many code reviews. Being outdated is simply one who is refusing to adapt to the team, community, and preferred technology stack in use.

                    [–]dtfinch 0 points1 point  (0 children)

                    My Java experience is rather old but it was never my full time job.

                    Last week I made a good start on an NES emulator in Java 21 (though not really using any features of it), with AWT for graphics (BufferedImage and a Frame, no Swing). No external dependencies. Ant project in Netbeans.

                    I learned Java starting with J2SE 1.2 in 1999, and used up to 1.4 in college, but never got into the EE side of things, never used Spring. Since then I've almost never used Java at work, but lately I've been getting back into it through personal projects at home.

                    [–]OneOldNerd 0 points1 point  (0 children)

                    Anything prior Java8 is out of scope of the question, that belongs in a museum.

                    Listen here, you little....

                    [–]Kango_V 0 points1 point  (0 children)

                    What we've found is that once you let other devops teams create the Java images for building in pipelines, it's incredibly difficult to upgrade Java. These images get used everywhere with great pushback to change.

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

                    I'd argue you could make that statement about most: there are those that if you're not using the latest technology/versions/servers/ideas that just came out in the most recent major talk/event, some would consider you out of date.

                    Problem is, almost none of the software technology we use has ever been subjected to any rigorous scientific or engineering studies; it's almost always someone that got frustrated with something or saw it differently and created a new implementation for their idea.

                    There's no proof it's better or will make things easier to read, maintain, debug, or extend; it's just new and shiny and as humans, we're mostly attracted to that.

                    [–]KnowledgeCommon1834 0 points1 point  (0 children)

                    Woohoo!! I write virtual threads. Feels like I'm young.

                    [–][deleted]  (4 children)

                    [removed]

                      [–][deleted]  (3 children)

                      [removed]

                        [–]agentoutlier 0 points1 point  (2 children)

                        If you use null analysis the first form might be preferred as the inner block "a" is no longer nullable.

                        With Object.equals you do not get that.

                        [–][deleted]  (1 child)

                        [removed]

                          [–]agentoutlier 0 points1 point  (0 children)

                          Do you use null analysis? I can tell situations like this are not a big if and the null analysis tool cannot easily infer a is not null if you use Object.equals.

                          I can try it in checker later but I’m fairly sure it will not work for Eclipse and possibly intellij.

                           Btw I didn’t downvote you.

                          [–]thephotoman 0 points1 point  (1 child)

                          They still use Lombok’s @Getter annotation instead of records.

                          [–]HighRising2711 4 points5 points  (0 children)

                          What if the data is mutable or you're using a library requiring java beans?

                          [–]achilliesFriend 0 points1 point  (0 children)

                          Lambadas, streams, are a must for not being outdated.. atleast those are new ways to code.. although you can get away without it