Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Do I really have to learn Java?

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Do I really have to learn Java?
Mark Oates
Member #1,146
March 2001
avatar

:-/

Some software package asks that its plugins be written in Java. And, as far as I am aware it's the most common language, though I've never had to use it apart from the Comp Sci 101 class I took in college.

As a computer programmer, is it weird if you don't know Java? Is it worth it? Is knowing Java going to level up my haxor-ninja insight in any way or is it just ++ for knowing another common language?

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

CursedTyrant
Member #7,080
April 2006
avatar

Eh, depends on what you want to do, really. I'd say it's weird, if only because it's so popular and has been around since forever, but not everyone does, or has to, know it. It has its uses, but I believe it's mostly web apps these days, or at least that's all I ever do at work. :P

I'd say it's good to know Java, but it won't be a life-changing experience for you. If you're not aiming to learn any frameworks (e.g. Spring), the syntax is very similar to C#.

---------
Signature.
----
[My Website] | [My YouTube Channel]

l j
Member #10,584
January 2009
avatar

Java isn't too hard to learn if you know C++ or other more modern languages like C#. It probably won't level up your haxor-ninja insight.

There are lots and lots of frameworks out there. Also you might want to take a look at reflection, it's a powerful language feature, but complete overkill for most tasks.

torhu
Member #2,727
September 2002
avatar

I learned Java a few months ago, and the main thing that stood out was how simple it was. But it's also inflexible and has a handicapped implementation of generics. As a tool for getting things done, it's probably often better than C++ because of how simple it is, and how good the library support is. But you get what you pay for. I suppose it's mainly for server software or apps that have no competition, like apps that are for in-house use. Cause it's slow and uses a lot of memory.

If you want to know a wide variety of programming languages, a good base would probably be C++/assembly/Python/Scheme. But if you're interested in programming languages, you're going to learn more than that anyway.

If you're talking about what to put on your resume, that's just too boring to talk about here :P

bamccaig
Member #7,536
July 2006
avatar

There's a big difference between knowing Java and knowing Java frameworks enough to be useful in Java. :P The language is very easy to learn. The frameworks require a bigger time investment; for the most part, the best way to learn these is probably to actually get employed by a company that uses them and learn by example. Joining an open source project that uses them would be another option, but those are probably not too plentiful, and I would guess harder to get involved with because nobody is paying you to be useful so they don't really care if you ever get past cloning the repository.

Is it useful to know? Yes. Is it necessary? Probably not. Do I know it? The language mostly, the frameworks not at all. The language is quite similar to C#, and C# is probably the better of the languages. Of course, Microsoft is in control of that so I consider Java the better investment (Oracle is certainly no better, but at least Java is properly open source). Obviously if you plan to write a plugin for a software package that needs to be in Java then you have your own motivation to learn it already. Let's just hope that's enough (again, the language is easy, but the framework(s) will probably take some time). :P

Steve Terry
Member #1,989
March 2002
avatar

just implement a big giant JNI in C/C++ to interface to a simple Java API call :)

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

MiquelFire
Member #3,110
January 2003
avatar

just implement a big giant JNI in C/C++ to interface to a simple Java API call :)

Ain't that basically what Allegro for Android is?

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Steve Terry
Member #1,989
March 2002
avatar

Pretty much so :)

___________________________________
[ Facebook ]
Microsoft is not the Borg collective. The Borg collective has got proper networking. - planetspace.de
Bill Gates is in fact Shawn Hargreaves' ßî+çh. - Gideon Weems

Kris Asick
Member #1,424
July 2001

There was a time long ago when using Java for game development was laughable. :P

Nowadays though... more and more people are going Java over other traditional languages like C/C++ that it's making me a bit worried. I don't learn new programming languages very fast and I've been avoiding Java since every time I look at sample code for it, my brain hurts. So long as I can continue to get away with using C++ exclusively, I shall continue to do so. ;)

--- Kris Asick (Gemini)
--- http://www.pixelships.com

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Java is the main programming language my community college teaches. I plan to get certified in it so I can get a job somewhere, but its not my favorite. It's very similar to C++ in many respects which makes learning it easy for me, but a very important point that bamccaig mentioned is the tremendous amount of learning that it takes to use its frameworks properly. And the number of classes it uses is staggering. It's got some decent string handling built in to the language, but its not perfect. Learn it for kicks or learn it for money otherwise I would say avoid it.

Matthew Leverton
Supreme Loser
January 1999
avatar

the tremendous amount of learning that it takes to use its frameworks properly. And the number of classes it uses is staggering

The truth. :-X

Marco Radaelli
Member #3,028
December 2002
avatar

As others said, Java has its fields of application (webapps, most Android, although others languages can be used there aswell).
About being the most common language, I have no idea, but I guess it <a href=http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html>shares the place with at least a couple others</a>.
I'd say, either choose a field you're insterested in and then learn the languages it requires, or make up a knowledge on a handful of not-so-much-overlapping languages like others suggested :)

LennyLen
Member #5,313
December 2004
avatar

and has been around since forever

Java hadn't even been released yet when I started taking computer science courses at University.

Mark Oates
Member #1,146
March 2001
avatar

Hey, I didn't know Java was open source.

{"name":"607859","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/c\/5c57453a0bd962037cc5b95f5523c774.png","w":243,"h":160,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/c\/5c57453a0bd962037cc5b95f5523c774"}607859

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

MiquelFire
Member #3,110
January 2003
avatar

Yet, even though it is open source, Oracle still sued Google over using Java in Android...

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Arthur Kalliokoski
Second in Command
February 2005
avatar

Isn't part of the reason MS came out with C# because Oracle got so upset about the differences of J++?

They all watch too much MSNBC... they get ideas.

MiquelFire
Member #3,110
January 2003
avatar

Dunno. Never paid attention to that.

Isn't part of the reason MS came out with C# because Sun got so upset about the differences of J++?

FTFY

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

larienna
Member #3,185
January 2003
avatar

I read a book about java lately and it's not so hard to learn. Like mentionned by another user, it's more learning the framework you are going to use that takes time, but that depends on what you want to programm.

I intend to use LibGDX to make video games in java, so in my case, I don't need to learn other frameworks like Java Swing for example.

It also made me realised that my code was not 100% C++. In java, everything MUST be in a class, so you cannot have simple loose procedures. So it forces you to think out of the box.

I think the global aproach was to make things simplier and less annoying to manage. For example, no need to have each class in 2 separate .h and .cpp file. It's now all in 1 file.

The biggest drawback is the garbage collector, which is a plague for video game development. LibGDX seems to have controlled this and it is supplying it's own template classes, to manage vectors for example, that minimise the use of the garbage collector. One of the key is to make for example temporary objects actually static objects of a class instead. This make sure the object does not get instanciated and destroyed all the time.

Enjoy! and have fun

MiquelFire
Member #3,110
January 2003
avatar

I forgot the exact name (it was an article for Javascript, which has the same issue with garbage collection), but using memory pools would be ideal in Java (and other garbage collection languages actually). Basically, if each object takes the same amount of memory, you request memory from the pool, and when you're done, you tell the pool to "release" it, but it keeps it around until it's needed, so to Java, you haven't released it, and it's still in use.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

l j
Member #10,584
January 2009
avatar

In C++ memory pools are also useful, to minimize dynamic memory allocation and to keep memory closer together.

larienna
Member #3,185
January 2003
avatar

So memory pool is actually a chunk of memory managed yourself?

Enjoy! and have fun

pkrcel
Member #14,001
February 2012

A memory pool is some ancient concept, useful in C C++ Java and I guess a LOT other amenities ;D ;D ;D ;D

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Steve++
Member #1,816
January 2002

Unless you are being forced to use it for work or whatever, I wouldn't bother. Java was nice in its day, but those days are long gone. I still use it for some non-work stuff simply because I know how to use it enough to get stuff done, but I certainly wouldn't be inclined to learn it now if I didn't know it.

Some software package asks that its plugins be written in Java.

Unless they require you to provide the source (unlikely), you can use alternative JVM languages such as Jython and JRuby.

In terms of bang for your learning buck, you might be interested in C#. Thanks to Mono, you can pretty much use it everywhere, including Windows, Linux, Mac, iOS and Android. C# is Java done right. Very right.

james_lohr
Member #1,947
February 2002

If you don't know Java or C#, then you should definitely learn one of them. Ideally Java first, as it is essentially a feature subset of C#.

Other than that, pretty much everything bamccaig said was accurate. They are both nice languages to learn. They have a relatively small number of key words, and you don't need to touch a framework, unless the goal is to be employable.

LennyLen
Member #5,313
December 2004
avatar

and you don't need to touch a framework, unless the goal is to be employable.

I've used C# for a few projects, but they were all C# with .net. How viable is learning C# without .net?

 1   2 


Go to: