Live data from Hacker News

Why and how I write Java

stevewedig.com

51–60 of 67 posts

Re: Why and how I write Java

#51

I think one thing that this post touches on is the effectiveness of Java as a programming language for large projects. Although personally I've moved on to Python since it greatly simplifies web-related tasks, a lot of our legacy projects are in Java and I still hear plenty of people sipping the Java haterade. So I thought I'd share some of the most common things I hear. Only my grandpa writes in Java anymore. I hire…

>>I hired a junior developer a couple months ago ... his arrival meant our code base should be rewritten in a "more modern language". Needless to say that he didn't last very long.

Aha, Let me tell you what the problem is here. This junior guy and most of his gang else where are starting companies with those 'Everything Else' languages.

All these 20 hr/day working kids are working on all these cool shiny projects, building billion dollar companies with these new language. While Java can perfectly manage to hang on and survive in ICU thanks to doctors like you. The new languages will get lions share of popularity, new projects and all they need to make it best language of the current times.

Needless to stay you can still work on Java. But it will mostly legacy code, and by and large unimportant projects which no one really cares about in any company. People working on such stuff are easily disposable. It gets difficult to get jobs by the day. Even your existing company will find it difficult to give you raise.

This happens every now and then. Fighting this as a whole is impossible. They best way out is adapt to the new stuff and move on or risk getting obsolete.

Re: Why and how I write Java

#52

I think one thing that this post touches on is the effectiveness of Java as a programming language for large projects. Although personally I've moved on to Python since it greatly simplifies web-related tasks, a lot of our legacy projects are in Java and I still hear plenty of people sipping the Java haterade. So I thought I'd share some of the most common things I hear. Only my grandpa writes in Java anymore. I hire…

I think one thing that this post touches on is the effectiveness of Java as a programming language for large projects. I agree that Java has its uses, but I've always thought that this was one of the weaker ones. Java's poor syntactical support for clarifying abstractions like lambdas or rich data structures like hashmaps makes small projects larger than they need to be. The answer isn't to find a way to manage large…

Size is poison, true. Not nearly as much as, say, dynamic typing. At that point you start having the exact same code mean different things at different times.

Plus those analysis tools you have for java do help with complexity.

That always baffles me. People get frustrated with java's verboseness for a large project ... and switch to ... python or ruby. Those languages require ridiculous amounts of discipline to work well in large projects (and needless to say, said discipline tends to be absent in the vast majority of developers).

Re: Why and how I write Java

#53
post #26

Earlier quoted context omitted.

And especially not if you have type erasure. Java makes you type class names, and the compiler makes you cast things, as for it being a statically typed language, I'm not really sure. As with most things java it's a lot of typing for not a lot of accomplishing anything useful, but somewhat better than C. OCaml/F#/Scala have far better type systems that check a lot more things, and require less typing.

The static type system is still worth something for packaged client-side applications, as long as you avoid reflection. The GWT compiler (for web apps) and ProGuard (for Android apps) can do very thorough tree-shaking, because they know which code is used and which isn't.

GWT is by far my favorite way of writing javascript. It's work to get it working, but it's ironclad, has client-server RPC built in, and works on pretty much any browser out there.

Re: Why and how I write Java

#54

> High efficiency languages include C, C++, Rust, D, etc. I would love one language to rule them all, but it seems that for now there is still a gap between what language to choose application programming and for high efficiency programming. What is this supposed to mean?

It was also pretty weird to see Erlang on that list. Erlang may be good at parallelism, but I've never heard that BEAM is especially fast at sequential operations. edit: s/linear/sequential/

You're confusing "parallelism" with "concurrency." Also, being fast at sequential operations (throughput) is often times not as useful as having low latency.

Re: Why and how I write Java

#55

I think one thing that this post touches on is the effectiveness of Java as a programming language for large projects. Although personally I've moved on to Python since it greatly simplifies web-related tasks, a lot of our legacy projects are in Java and I still hear plenty of people sipping the Java haterade. So I thought I'd share some of the most common things I hear. Only my grandpa writes in Java anymore. I hire…

There are plenty of reasons not to have GC run on a server. Let's say you're running an FPS client-server architecture. Good luck writing that in Java. Latency matters.

Re: Why and how I write Java

#57
post #51

I think one thing that this post touches on is the effectiveness of Java as a programming language for large projects. Although personally I've moved on to Python since it greatly simplifies web-related tasks, a lot of our legacy projects are in Java and I still hear plenty of people sipping the Java haterade. So I thought I'd share some of the most common things I hear. Only my grandpa writes in Java anymore. I hire…

>>I hired a junior developer a couple months ago ... his arrival meant our code base should be rewritten in a "more modern language". Needless to say that he didn't last very long. Aha, Let me tell you what the problem is here. This junior guy and most of his gang else where are starting companies with those 'Everything Else' languages. All these 20 hr/day working kids are working on all these cool shiny projects, bu…

>> But it will mostly legacy code, and by and large unimportant projects which no one really cares about in any company

Tell that to Google and Amazon.

Re: Why and how I write Java

#58
post #51

I think one thing that this post touches on is the effectiveness of Java as a programming language for large projects. Although personally I've moved on to Python since it greatly simplifies web-related tasks, a lot of our legacy projects are in Java and I still hear plenty of people sipping the Java haterade. So I thought I'd share some of the most common things I hear. Only my grandpa writes in Java anymore. I hire…

>>I hired a junior developer a couple months ago ... his arrival meant our code base should be rewritten in a "more modern language". Needless to say that he didn't last very long. Aha, Let me tell you what the problem is here. This junior guy and most of his gang else where are starting companies with those 'Everything Else' languages. All these 20 hr/day working kids are working on all these cool shiny projects, bu…

You seem to enjoy generalizations and hyperbole quite a bit.

First of all, such a small fraction of companies actually end up worth anything at all, so jumping to the conclusion that an arrogant prick who couldn't adopt to an unfamiliar development environment will go out and build a billion dollar company is incredibly unlikely. Maybe I'll be completely wrong, but the odds are undoubtedly in my favor.

Second of all, you clearly didn't read my post where I talked about Python being our new weapon of choice. We aren't going to rewrite our legacy Java codebase in Python or something else because there is absolutely no need for it, and those codebases put the bread and butter on the table.

Third, when you're running the company, you have to consider things from a business perspective rather than a technical one. I'm a developer myself so I understand technical details and limitations, but my first question about the product is "does it work?". Nobody is going to give two shits what language or optimizations you used for a product if it doesn't work. They aren't going to pay you a dime, either.

Your comment really exemplifies my point, that people do nothing but sip the Java haterade without realizing what it is good for. Honestly I couldn't care less- I'm not trying to change your way of thinking, and based on your radical assertions that Java is dead, neither are you. But in case some other aspiring dev is reading this, I'd strongly suggest to not be close-minded about powerful tools like Java that have mature ecosystems and an excellent community around them.

Re: Why and how I write Java

#59
post #38

> I use Java for application programming. I recommend Python or Ruby for learning programming. Define "application". There are plenty of cases where Python or Ruby makes sense. And Java actually makes sense as a learning language aswell, as it has more OO depth which is what most courses focus on largely, without the pain of trying to teach students C++.

> Define "application".

I think he/she defines application as "application", as opposed to the web folks' definition that a web site having a text box, a button and 1 mb of JS libraries is an application.

Re: Why and how I write Java

#60
post #57
post #51

Earlier quoted context omitted.

>>I hired a junior developer a couple months ago ... his arrival meant our code base should be rewritten in a "more modern language". Needless to say that he didn't last very long. Aha, Let me tell you what the problem is here. This junior guy and most of his gang else where are starting companies with those 'Everything Else' languages. All these 20 hr/day working kids are working on all these cool shiny projects, bu…

>> But it will mostly legacy code, and by and large unimportant projects which no one really cares about in any company Tell that to Google and Amazon.

Even in those companies. The legacy systems are in place only because the cause of replacing them is prohibitively high.

I've worked in Indian IT companies where most of the outsourced projects are legacy system which the contracting company doesn't want its own people to maintain anymore. Its a bad situation to be in. One company I know of had something like 40000 COBOL programmers, who work on projects from big banks. Most projects are maintained only until they are phased out, Projects shutting down and people being moved around is common.

One metric we had to measure top technologies was to see which one were not used in our company.10 years back that was Java, 4-5 years back that was Python. Today that's Go and Scala. Bleeding edge one's never get outsourced out, the projects with older languages were a common place.

A programmer must never attach him/herself to any tool in general. Adapt and move on, such people survive and win in the longer run.

Post reply on HN