Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
a lovely poster
Aug 5, 2011

by Pipski

Shinku ABOOKEN posted:

Point is: Learn Java even if you are 100% sure you won't write a single byte in it.

Wow, gross. Think I'm just going to go ahead and stick with my strategy of avoiding it.

Learn Scala, not Java. (or both)

Adbot
ADBOT LOVES YOU

libcxx
Mar 15, 2013
thread_local post<shit> shit_post("lol if u");
scala is great if you've grown too accustomed to modern niceties like working compilers, or if you feel like spicing up your identifiers with fun unicode to amuse and confound your coworkers.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

return0 posted:

Vanilla java is a joke these days man, surely nobody is making new java software outside of phone apps and maintenance.

Tons of places are still using Java for new projects because of momentum, you just aren't going to hear about it on HN. If you want to clasify that as maintenance then go ahead, but don't delude yourself into think it's an obsolete language.

libcxx
Mar 15, 2013
thread_local post<shit> shit_post("lol if u");
Tons of places are using Java for new projects because there is still not a language/platform that does what Java does. See also C++.

a lovely poster
Aug 5, 2011

by Pipski
Yeah it's less that I have something against Java as a career choice and more that programming with other languages tends to be more fun (at least to me)

NtotheTC
Dec 31, 2007


"If we argue about this for just a few pages more, we're bound to find out what the one true programming language is!"

there is no one true programming language

Just use the right tool for the right job and remember that that tool is never PHP and you're all set.

a lovely poster
Aug 5, 2011

by Pipski

NtotheTC posted:

Just use the right tool for the right job and remember that that tool is never PHP and you're all set.

My "day job" is working on a gigantic PHP project :negative:

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shinku ABOOKEN posted:

Just in case you don't know, that example was a joke.
The claim that Java is too verbose is just a nerdy exaggeration. Don't base your career decisions on it.
Java has excellent IDEs, toolchains, standard libraries, and 3rd party libraries.
Java is good. Learn Java. Use Java. Love Java.

Java has top-notch build and test tools, and the greater Java ecosystem has a lot of interesting stuff going on.

baquerd
Jul 2, 2007

by FactsAreUseless

libcxx posted:

I can't stand all this autogenerated boilerplate! *writes a literal novel in cucumber*

And it always seems that someone doesn't really get it.

Given I have started the process
When I call the method foo() with the argument bar
Then the result should be foobar

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

baquerd posted:

And it always seems that someone doesn't really get it.

Given I have started the process
When I call the method foo() with the argument bar
Then the result should be foobar

Sadly, your result was actually a segmentation fault

Pollyanna
Mar 5, 2005

Milk's on them.


"What is a conditional loop?" - the guy in charge of my Intro to Bioinformatics with Python class.

:saddowns:

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

baquerd posted:

And it always seems that someone doesn't really get it.

Given I have started the process
When I call the method foo() with the argument bar
Then the result should be foobar

:cry:

I'd be so sad if I ever saw that.

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

baquerd posted:

And it always seems that someone doesn't really get it.

Given I have started the process
When I call the method foo() with the argument bar
Then the result should be foobar

Implemented, of course, as
Ruby code:
Given /^I have started the process$/ do
end

When /^I call the method foo() with the argument bar$/ do
  @result = foo('bar')
end

Then /^the result should be foobar$/ do
  assert_equal @result, 'foobar'
end

Jewel
May 2, 2009

Re: the Javachat; I know C++, C#, Python, Javascript, Lua, and PHP (used in roughly that order, and I've been programming for about ~6 years now).

Someone recently told me to give up all of them and use Java because "That's the only way you're gonna get a job don't delude yourself, learn some database skills and Java" :allears:

The Insect Court
Nov 22, 2012

by FactsAreUseless

a lovely poster posted:

Wow, gross. Think I'm just going to go ahead and stick with my strategy of avoiding it.

Learn Scala, not Java. (or both)

Learn Java because it's insanely common and because a basic working knowledge of the language is very easy to acquire.

That said, basic Scala is also pretty easy to pick up. People like to talk about how horrifying the type system can make stuff but that's not something you have to worry about too much until you decide to start writing libraries in it.

a lovely poster
Aug 5, 2011

by Pipski

The Insect Court posted:

Learn Java because it's insanely common and because a basic working knowledge of the language is very easy to acquire.

Sounds like a reason to learn PHP

Amarkov
Jun 21, 2010

a lovely poster posted:

Sounds like a reason to learn PHP

I mean, you probably should know a bit of PHP. You shouldn't put it on your resume or apply to a job which requests it, sure. But when someone is like "Hey can you make a map showing all the places our product is active", I'd rather spend 30 minutes in PHP than an hour or two in some better language.

Which I guess is less applicable if you have a job with well-defined responsibilities, but not everyone does.

a lovely poster
Aug 5, 2011

by Pipski
I guess I just don't see where Java would ever come into play in a discussion like that. What's the "this is really quick and easy to do in Java whereas other languages would take a lot longer" project? I'm primarily a python/php/c# guy and through all the jobs I've had, I've never seen a programmer whip out Java to do something interesting and quick. This may be just because I'm outside of the Java ecosystem though.

Sure, it's a great way to find a job. But for me personally and many other programmers, learning Java is neither desirable nor necessary.

Amarkov
Jun 21, 2010
I thought the point you were making was much more on the PHP sucks side. I'm a huge Java guy, but I do agree with you; if you aren't primarily working with Java, there's no real reason you need to know it.

Doctor w-rw-rw-
Jun 24, 2008

a lovely poster posted:

What's the "this is really quick and easy to do in Java whereas other languages would take a lot longer" project? I'm primarily a python/php/c# guy and through all the jobs I've had, I've never seen a programmer whip out Java to do something interesting and quick. This may be just because I'm outside of the Java ecosystem though.
I used Dropwizard to build a full blown API backed by a database in just a couple of hours. When I was actively dabbling with Java it would take me probably 20 minutes to go from nothing to Eclipse project and maven producing a jar, deployable anywhere, with all the bells and whistles.

---

I think that Java is good to learn and get good at, because it's "the strongly typed language/VM which has its poo poo together" more so than its alternatives, i.e. C# and the .NET family, Go (which is strong but still maturing), C++, and so on. Even if the language and VM themselves are flawed, there's a lot of good engineering that's gone into the tools, libraries, and platforms that "better" languages would do well to learn from.

In comparison:
Python's dependency management is a joke unless you use virtualenv, and deployment is a little bit of a pain. I can see someone who learns the tools well getting to a similar point I got with Java, though.

PHP has composer and now phar - PHP has spent the last 13 years adopting Javaisms in companies' efforts to mature it to enterprise levels, because of its vast success on the perceived low end of the programming spectrum.

C# is Microsoft's take on a strongly typed language with a powerful runtime, and possibly the best alternative to Java on a language level, but the ecosystem just isn't as wide and constantly active and growing as Java's.

pigdog
Apr 23, 2004

by Smythe

a lovely poster posted:

I guess I just don't see where Java would ever come into play in a discussion like that. What's the "this is really quick and easy to do in Java whereas other languages would take a lot longer" project? I'm primarily a python/php/c# guy and through all the jobs I've had, I've never seen a programmer whip out Java to do something interesting and quick. This may be just because I'm outside of the Java ecosystem though.

Sure, it's a great way to find a job. But for me personally and many other programmers, learning Java is neither desirable nor necessary.
Being quick and easy to do really simple stuff isn't Java's forte compared to many other languages, but it's easier to do bigger stuff thanks to strong typing and good tools.

Anyhow I really like dependency management with Maven (when it works) as integrated with IDEs. You could be like, hey I want a search engine, or a PDF generator, or whatever publicly available library, push a couple of buttons, and it gets downloaded and used in your project as a dependency and/or included in the final artifact. You needn't even store the libraries in your version control, all you say is "this needs XYZ library version 1.23" and XYZ version 1.23 gets downloaded and used in your project.

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe

Pollyanna posted:

"What is a conditional loop?" - the guy in charge of my Intro to Bioinformatics with Python class.

:saddowns:

I didn't know what a "conditional loop" was until just now when I read your post and looked it up. I mean, I knew what a loop was and what a conditional was, but had never heard the phrase "conditional loop" before. Turns out it more or less means the same thing as "loop".

NtotheTC
Dec 31, 2007


Hammerite posted:

I didn't know what a "conditional loop" was until just now when I read your post and looked it up. I mean, I knew what a loop was and what a conditional was, but had never heard the phrase "conditional loop" before. Turns out it more or less means the same thing as "loop".

Agreed, call a spade a spade.

QuarkJets
Sep 8, 2008

Java can be good, but for whatever reason a greater percentage of the good software than I see is written in Python and C++, whereas when I see a Java app it tends to suck. Java is easy enough for a novice to use, but it's not as easy and intuitive as Python, so you end up with a bunch of coding abominations written by "Java programmers" who just wanted to make Minecraft mods or whatever. The same novice in a Python environment would be able to get by and probably produce something that's pretty good with minimal effort because there's almost no learning curve by comparison. The same novice in a C++ environment will probably just give up before releasing anything.

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

QuarkJets posted:

Java can be good, but for whatever reason a greater percentage of the good software than I see is written in Python and C++, whereas when I see a Java app it tends to suck. Java is easy enough for a novice to use, but it's not as easy and intuitive as Python, so you end up with a bunch of coding abominations written by "Java programmers" who just wanted to make Minecraft mods or whatever. The same novice in a Python environment would be able to get by and probably produce something that's pretty good with minimal effort because there's almost no learning curve by comparison. The same novice in a C++ environment will probably just give up before releasing anything.

I don't think its effective to gauge the quality of a language on the results of projects by bad coders. It affects the ecosystem sure, which can make it an overall worse tool if it becomes a problem, but bad projects would probably have sucked no matter which language got to them first.

Wouldn't it make sense to evaluate a language based on it's best examples? Then you can genuinely see where the limitations of the language are becoming a liability, and where the strengths are being used to best effect.

FrantzX
Jan 28, 2007
As a C# programmer who is learning Java for Android development, I am curious. What are Java's strengths?

Bongo Bill
Jan 17, 2012

Java's got a very mature ecosystem surrounding it. There are Java libraries for drat near everything and the standard library is quite featureful (some would say bloated). It basically defines what "enterprise" coding looks like, for good or for ill, which is to say it tends to encourage verbosity and is probably overkill for very small-scale projects. There are open-source and commercial tools for Java development that surpass most other languages in their sophistication; the most widely-used open-source IDE was originally developed for (and still best supports) Java development. JVM bytecode can be run virtually anywhere unaltered, and there are many other stable languages that target the JVM (and call Java libraries) if you don't like Java proper.

The language itself is basically a subset of C#. (Or, since Java is older, say that C# is a superset Java.) If your background is in C# then you might find Java a bit stifling and awkward but you won't have to learn any new tricks.

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...

QuarkJets posted:

Java can be good, but for whatever reason a greater percentage of the good software than I see is written in Python and C++, whereas when I see a Java app it tends to suck. Java is easy enough for a novice to use, but it's not as easy and intuitive as Python, so you end up with a bunch of coding abominations written by "Java programmers" who just wanted to make Minecraft mods or whatever. The same novice in a Python environment would be able to get by and probably produce something that's pretty good with minimal effort because there's almost no learning curve by comparison. The same novice in a C++ environment will probably just give up before releasing anything.

That's because most of the programs written in Java live places that you'll never see. Java is EXTREMELY common in the enterprise world, where the emphasis is less on client apps and more on back end services.

You're right that it's easier to create a small prototype or client in Python, but no one has seriously used Java as a client language in years.

One exception though is Android; there's a massive number of Java client applications in the world thanks to Android.

Mr. Crow
May 22, 2008

Snap City mayor for life
Legacy unit tests, the best unit tests.

code:
[TestCleanup]
public void MyTestCleanup()
{
    Thread.Sleep(1000);
    _mocks.VerifyAll();
}
Guess we gotta make sure we're only verifying after everything is finished running! :shepface:

Mr. Crow fucked around with this message at 15:49 on Oct 2, 2013

Opinion Haver
Apr 9, 2007

Amarkov posted:

I mean, you probably should know a bit of PHP. You shouldn't put it on your resume or apply to a job which requests it, sure. But when someone is like "Hey can you make a map showing all the places our product is active", I'd rather spend 30 minutes in PHP than an hour or two in some better language.

Except then that map winds up growing and growing because of scope creep and now it takes you twice as long to add each new feature because you wrote it in PHP.

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

yaoi prophet posted:

Except then that map winds up growing and growing because of scope creep and now it takes you twice as long to add each new feature because you wrote it in PHP.

A few months ago I had to develop a web app that routes submission forms to various emails depending on what the user's request is. I was specifically told to write it quick and dirty because the configuration was never going to change.

It changes, on average, about three times a week.

Pollyanna
Mar 5, 2005

Milk's on them.


Hammerite posted:

I didn't know what a "conditional loop" was until just now when I read your post and looked it up. I mean, I knew what a loop was and what a conditional was, but had never heard the phrase "conditional loop" before. Turns out it more or less means the same thing as "loop".

Good point. I wish programming terms were more standardized.

Also, if I suddenly need to know a programming language to do a little work on a project, I can just loving pick it the syntax and idiosyncrasies on the fly. No freakouts over "MUST HAVE ALL LANGUAGES ARHRHRHRHRHR" needed.

a lovely poster
Aug 5, 2011

by Pipski

Pollyanna posted:

Good point. I wish programming terms were more standardized.

Also, if I suddenly need to know a programming language to do a little work on a project, I can just loving pick it the syntax and idiosyncrasies on the fly. No freakouts over "MUST HAVE ALL LANGUAGES ARHRHRHRHRHR" needed.

Programming is a relatively new field and you're going to run into plenty of people who know way more than you do but might not know the correct jargon or have the traditional education. Be careful about coming off as a dick when it's a semantic issue.

Bognar
Aug 4, 2011

I am the queen of France
Hot Rope Guy
Holy hell I hate Microsoft.

We just switched one of our client's ASP.NET MVC websites to run on a new server. Everything went pretty smoothly, until we started getting e-mails this morning about users not being able to log in on IE 10. We didn't change any code and we copied the configuration settings from the old server, so things shouldn't have changed.

After spinning for a few minutes trying to figure out why only IE 10 was affected, I went a Googling. As it turns out, IIS 7 and below consider IE 10 to be a cookieless browser.

Microsoft's own web hosting software is incorrectly classifying Microsoft's own browser. So our application would send Set-Cookie headers, IE 10 would send them back on each request, but IIS would completely ignore them - thus rendering IE 10 users unable to log in.

:bang:

Opinion Haver
Apr 9, 2007

Pollyanna posted:

Good point. I wish programming terms were more standardized.

Also, if I suddenly need to know a programming language to do a little work on a project, I can just loving pick it the syntax and idiosyncrasies on the fly. No freakouts over "MUST HAVE ALL LANGUAGES ARHRHRHRHRHR" needed.

Not all languages are just learning 'syntax and idiosyncrasies'. Maybe going from Java to C# is relatively easy, but going from C++ to Haskell is going to be absolutely killer.

Uziel
Jun 28, 2004

Ask me about losing 200lbs, and becoming the Viking God of W&W.

yaoi prophet posted:

Not all languages are just learning 'syntax and idiosyncrasies'. Maybe going from Java to C# is relatively easy, but going from C++ to Haskell is going to be absolutely killer.
Yeah, my 5 year plan or whatever is to have at least passing familiarity in one language per type of :imperative, functional, memory management, garbage collected, static, dynamic.

New Yorp New Yorp
Jul 18, 2003

Only in Kenya.
Pillbug

Uziel posted:

Yeah, my 5 year plan or whatever is to have at least passing familiarity in one language per type of :imperative, functional, memory management, garbage collected, static, dynamic.

What about class-based/prototypal OO?

Dr Monkeysee
Oct 11, 2002

just a fox like a hundred thousand others
Nap Ghost
I've been a C# developer for most of my career. I thoroughly understand the roots of C# in Java and what aspects they inherited from it, expanded upon, and improved. I agree that the Java ecosystem is very expansive and dynamic, and is generally a more mature environment than .NET.

And yet I *cannot* read Java code. My eyes just glide right off the screen and my brain shuts down. It's literally the most boring thing in the world. As a C# dev I'm no stranger to boilerplate, verbose names, and layers upon layers of interfaces for IoC and the like. But my brain just refuses to commit whenever I have to read Java code. I can read C# just fine.

Dr Monkeysee fucked around with this message at 18:31 on Oct 2, 2013

Dietrich
Sep 11, 2001

I have very few complaints about C# as an ecosystem.

Some of the really old stuff isn't implemented with generics, which would make it work a lot better.

That's pretty much it.

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

Volmarias posted:

You're right that it's easier to create a small prototype or client in Python, but no one has seriously used Java as a client language in years.
I seriously use Java to write client software today. :(

It can have some genuine advantages in that space, when you don't have any control over the target environment. For example, deploying a JAR is trivial compared to C++ (compile a different version for every user platform? no thanks) or Python (it's much more likely that a random computer will have a JVM than a Python interpreter). I can literally email a single file to a new user and be confident that they can just double-click on it and the application will appear on their screen. I don't know of any other technology that offers that.

Basically, if you still need to write desktop software at all, Java isn't actually a terrible choice for that.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply