r/java • • May 21 '20

Java programming language celebrates 25 years

https://www.infoworld.com/article/3544229/java-programming-language-celebrates-25-years.html
309 Upvotes

38 comments sorted by

33

u/buckfutter4life May 21 '20

Thank you James 👍

29

u/talbhoggs May 21 '20

Looking forward for the next 25 years. :)

30

u/wsppan May 21 '20

And I am celebrating 20 years. Been consistently programming in Java longer than any other language I have learned (C, Perl, Tcl, Python)

19

u/agentoutlier May 21 '20

Been consistently programming in Java longer than any other language I have learned (C, Perl, Tcl, Python)

Ironically all 4 of those languages are older than Java.

Which is funny because people always say how old and dead Java is... it’s actually kind of young... hell I wish I was 25 again :)

3

u/wsppan May 21 '20

That's true but I always smile a bit when people say Python is as old as Perl is. It's around the same age as Perl5 and if we are being totally honest, it was not till version 2 of Python in 2001 where usage started trending upward. This is when the Python Software Foundation was was formed, a non-profit organization created specifically to own Python-related Intellectual Property. And where the license had become GPL compatible.

3

u/vlcmodan May 21 '20

I am 25, same as Java. If I may ask what would you do if you were my age?

8

u/wsppan May 21 '20

Study Computer Science. I majored in information Studies in the late 80s and fell backasswards into software engineering. Took me forever to learn everything from first principals on my own that I would have gotten with peers from a CS program. If you study CS from first principals and learn C as your first programming language then picking up future languages (especially those at higher levels of abstraction) is usually pretty quick and easy (except a few like C++, Rust, and Haskel! But those are nearly impossible without those first principles.)

So, my advice if you have not studied CS. I've posted this before on Reddit and it's what has worked for me and a few others who told me it worked for them as well. Ymmv.

People sometimes struggle with C when they start from scratch or come from a higher to lower level of abstraction. I struggled with this for a long time till I did these:

  1. Read Code: The Hidden Language of Computer Hardware and Software

  2. Watch all 41 videos of A Crash Course in Computer Science

  3. Take the Build a Modern Computer from First Principles: From Nand to Tetris (Project-Centered Course)

  4. Take the Harvard CS50 Course

  5. Grab a copy of C programming: A Modern Approach and use it as your main course on C. You can also use Modern C

  6. Follow this Tutorial on Pointers and Arrays in C

The first three really helped by approaching C from a lower level of abstraction (actually the absolute lowest level and gradually adding layers of abstraction until you are at the C level which, by then is incredibly high!) You can do all three or pick one and dive deep. The fourth is also an excellent intro to CS as well and worth taking. The fifth is just the best tutorial on C. By far. The sixth is a deep dive into pointers and one of best tutorial on pointers out there (caveat, it's a little loose with the l-value/r-value definition for simplicity sake I believe.)

When you are done with those, follow the curriculum of a good CS program like Stanford or CMU or MIT. Explore the big topics like Data Structures Algorithms, Compilers, Operating Systems, etc.. By the time you get through all the above then Java is just a tool in your toolbelt and a fairly straight forward one at that. This will take a long time but were all lifelong learners right? Right now I am studying Rust and its async/await framework and functional programming with Scala.

If all the above does not apply to you, lol! Then ramp up on all the pereferals like Git, a decent IDE, JUnit, Mockito, Maven/Gradle, Debugger, Linux, etc..

1

u/amalik87 Jun 03 '20

In the age of heavy web development (Think: Javascript, SQL, etc), you think starting with C is still a good approach?

1

u/wsppan Jun 03 '20

Yes, I think grounding your education in computer science and first principles is the best approach. It gives you the vocabulary that is required to understand the problem space and define the solution space. Otherwise you are just a cut and paste code monkey in a pidgeon hole domain. BTW, the only technology that's web centric is javascript and Http/Rest/Soap endpoints. And those endpoints are so abstracted out by various language frameworks that what's left is thinking about the problem space in terms of abstractions and data structures and extracting and transforming data from the various data stores (SQL is but one of the tools available here and limited to relational databases and most definitely not limited to web development.) Having a solid grounding in CS gives you and enormous leg up here and vocabulary to define and describe the proble space. These skills translate to every domain out there making you much more valuable (to yourself and to others.)

12

u/OtherOtherNeRd May 21 '20

Anyone else want to write some programs in Java 1.0 for some frustrating nostalgia?

26

u/SomervillainSB May 21 '20

The nice thing is that if compiled on Java 1.0, it will run faster on a modern JVM....and if you actually did write a library in Java 1.0 25 years ago, it will work great with the latest Java code you write today.

It used to be heavily hyped, but I sense people don't appreciate it enough the "write once, run anywhere" features. Originally, it was hyped to allow windows/UNIX/linux cross-compatibility...but now I really appreciate how it means it works great across OS generations. Patch your underlying OS all you want, your Java code will still run great...I have been burnt by Node and Python apps breaking on OS updates.....NEVER had such an issue in Java and the Java apps I write and run are far more complex.

Java is not as fashionable as it was 15 years ago, but it really underappreciated. People take for granted how great it is.

8

u/sefsrgerhdtr May 21 '20

Totally agree. People like to bash the language because of how they feel about Oracle.

But if we put politics aside and focus solely on the text, there is something to be said for my ability to deploy openjdk on a raspi, run all the code I expect it to run at quite a high level of performance, and it is just about as easy to use as node.

For me it is the perfect sweet spot of performance and lack of needless complexity (C++...)

2

u/SomervillainSB May 22 '20

Plus your libraries written on today's Raspberry Pi, will work on whatever device you use 20 years from now...no matter the OS evolution. You really can just solve a problem once and never think about it again.

20

u/s888marks May 21 '20

It's not 1.0, but I had occasion to run a snippet of code on JDK 1.2 the other day to see how it behaved. Here's how it went:

// what I wanted
var strings = List.of("a", "b");

// get rid of var
List<String> strings = List.of("a", "b");

// get rid of collections factory
List<String> strings = new ArrayList<>(Arrays.asList("a", "b"));

// get rid of diamond
List<String> strings = new ArrayList<String>(Arrays.asList("a", "b"));

// get rid of generics
List strings = new ArrayList(Arrays.asList("a", "b"));

// get rid of varargs
List strings = new ArrayList(Arrays.asList(new String[] { "a", "b" }));

// oh that's ugly just add the strings explicitly
List strings = new ArrayList();
strings.add("a");
strings.add("b");

It was like going back in time....

19

u/schubart May 21 '20 edited May 21 '20

Go back further in time and you will have to switch to java.util.Vector...

3

u/nutrecht May 22 '20

I'm pretty sad that back then github didn't exist. I created a ton of Java code when I started with Java in school in '98 but all of that is gone now. Would be fun to see some of my projects from back then and how the way I do things has changed over the years. That was 1.2 though; never used older versions.

I can see what 'period' I was in from my Github repo's. When I worked on a project where the rule was to prefix member vars with underscore I did the same in my personal projects for example. It's a bit like counting tree rings and finding there was a fire 10 years back :)

6

u/havoc313 May 21 '20

Damn I'm older than Java I feel old I'm only 27

4

u/seraph582 May 21 '20

Does anything except facebook’s man-handling of PHP scale as well as Java yet? I know it was kinda in a league of its own in terms of number of top tier scale solutions.

2

u/yawkat May 22 '20

Languages don't scale. Systems do, and they can be composed of many languages. You'll find many of the biggest websites out there are systems of applications in multiple languages working in concert

2

u/Chaoslab May 21 '20

24 years here. And still enjoy coding in it.

Software rendering, gui and application frame work (real time based). Also custom xml parser and IDE's for code generation / round trip modelling.

0

u/[deleted] May 22 '20

[deleted]

4

u/Parable4 May 22 '20

It's a career long marathon. You never stop learning. Don't be scared by everything you don't know. Just take it one step at a time.

0

u/pure_x01 May 21 '20

I have 15+ years of Java experience and 4+ years of C# experience. There language really needs to catch up and its a good thing that there is an increased release cadence. The problem is other things as well. With .net core you can now install tools the same way as with npm. .net is evolution so fast with webassemby and all kinds of stuff. If i would bet my career .net has a brighter future unless java steps up its game. But i hope Java will do that.

10

u/SomervillainSB May 21 '20

2 points:

  1. Since Oracle pushed things over to openjdk, the updates are coming much faster than ever before.

  2. The JVM is the crown jewel, not the Java language....if you don't like Java, there are many great languages like scala to close the gap.

C# was always a good language, but most of us are wary of committing to the MS ecosystem. I don't think .NET will be the successor to Java. No matter how great the technology is, the Balmer/Gates eras has permanently burned bridges. You'll have a hard time finding anyone over 30 who will trust Microsoft (unless they're a pure MS shop). We all remember what the .NET ecosystem used to be....a very exclusive marriage. Most shops greatly prefer linux and would rather skip the benefits of .NET than risk things going back to the Gates/Balmer days of severe vendor lock in.

Unfortunately, the hot trend lately is using open source products from advertising companies, like Google and Facebook and deploying them on infrastructure from an e-commerce provider (Amazon). For the first time in my life, I am not hopeful for the future of the industry.

I think the future is impossible to predict...something crazy will happen because I don't see the status quo as sustainable. I just have no clue what that radical shift will be.

That said, I am confident I'll be able to find work in Java for the next 20 years.

1

u/[deleted] May 21 '20

I’ve always thought the next natural step after “cloud” is a distributed architecture.

1

u/amalik87 Jun 13 '20

.NET core is completely open source and runs on any platform.

-3

u/pure_x01 May 21 '20

That said, I am confident I'll be able to find work in Java for the next 20 years.

That I agree with. I do however see .NET as having a better future if you consider current innovation. But that is not however something that has to continue in the coming years. Who knows maybe oracle steps up its game even more.

2

u/nutrecht May 22 '20

I do however see .NET as having a better future if you consider current innovation.

Can you make a comparison then? Because whenever people say stuff like this they never really give any arguments. And without them it just depends on 'gut feeling'.

1

u/pure_x01 May 22 '20

Language features in C#. Runtime enhancements such as out of the box AOT . Self contained deployments.

They might seem small but they change alot for developers. There are more things as well of course

1

u/nutrecht May 22 '20

But this same stuff is happening in the Java ecosystem as well. So how is .Net better or faster?

1

u/pure_x01 May 22 '20

Yes to some extent .. in terms of language features it will take many years to get to feature parity. .NET has a a lot of things built in but as with java it is separate initiatives. Ex : graal-vm .. With .NET everything is always out of the box. Have you generated a native-image with java? the setup is really bad. .NET has new constructs for pinning memmory. it has constructs for memory regions etc to make things faster by preventing copying and also improve interop. And above all the cadence is much much higher in terms of innovation and trying to create good things for developers. Ex global tools.. etc. .NET sees why people like the node ecosystem and adopts the good parts. Java is basically stuck in the early 2000

1

u/SomervillainSB May 22 '20 edited May 22 '20

.NET may produce a superior product, but people have negative attitudes towards it. Kids don't want to learn it and old people were burnt by the Ballmer/Gates era of terrible behavior.

The winner of this race will do so through adoption, not superior technology. I can't picture Nadella or his successors doing anything to really win hearts and minds enough for people to ignore the stigma and history of .NET if they prefer Linux.

I have no doubt Java has much to learn from .NET. I just know I could never sell a .NET solution to management at any place I've worked in the last 15 years. Python or Node?...maybe...Scala, maybe.... .NET...hard pass.

1

u/flipbits May 22 '20

You must be a horrible salesman then

1

u/SomervillainSB May 22 '20

You must be a horrible salesman then

That's why I write code for a living! :)

I honestly have never heard of .NET getting much traction in any big tech company other than Microsoft. Everyone drank the open source koolaid and most places won't consider anything commercial...not sure if it's out of ignorance or principle. I'd be surprised if you could get Apple, Twitter, Google, Netflix, etc to make a huge investment into .NET.

1

u/flipbits May 22 '20

I've had the complete opposite experience actually, including large banks, government jobs, etc...