Log in

View Full Version : Java


Jess
January 2nd, 2013, 05:20 PM
I'm learning Java this term (Object Orientated programming). I looked up some tutorials online and tried to read them, but I still don't really understand it.

Frankly, I want to know this. How hard is Java to learn?

TheMatrix
January 2nd, 2013, 05:51 PM
Depends. Do you know how to program? As in, not one specific syntax, but programming in general. Do you know how a computer works? Are you inclined to think about an objective in the way that a computer can understand it(that is what a program is)?

If you don't, you probably don't understand the fundamentals of Java. There are many good books on the topic, I suggest getting one from your local library.

Note that the language of Java itself is really not that hard to learn. It's the many libraries, frameworks, and APIs that make everything seem complicated.
In Java, you cannot do much without reading the manual. Java SE is a very large distribution with many APIs -- you cannot learn them all out of your head.

nick
January 2nd, 2013, 05:53 PM
Note that the language of Java itself is really not that hard to learn.
Disagree, and I'm a professional programmer. Java sucks big time.

Kagetora103
January 2nd, 2013, 09:33 PM
I don't know much about java, but I've been studying flash and C++

DreamInCode.net has forums and tutorials for most programming languages, you can probably find some step-by-step tutorials or answers to any specific questions you might have.

Once you start programming, it might help to use an IDE if you don't already.

I use MS Visual Basic for C++ and it has program templates and uses different text colors for variables/etc. makes it alot easier to keep track of things.

TheMatrix
January 3rd, 2013, 02:00 AM
Disagree, and I'm a professional programmer. Java sucks big time.

Well let's agree to disagree, then. :-)
Everybody is entitled to their own choice of programming language(you would leave your job if you hated it), and apparently you've chosen yours. But as cool and flashy as "professional programmer" sounds, you sound like a huge hypocrite when you don't realise that Java has its purpose. Because, you see, many systems run it just fine.
If you were as professional as you make yourself out to be, you probably wouldn't even have thought of that statement.

But sure, I'll bite, just to raise some important points.
Yes, Java does consume a lot of resources. A key choice in system development is the programming language, and you must evaluate whether a language's runtimes, dependencies, etc. are compatible with your budget and/or existing systems and/or skill sets of your workforce. An improperly or not-well-thought-out system -- using any programming language, for that matter -- will bring headaches and frustration, as well as service disruptions, in most cases leading to loss-of-profit.
Another key thing is optimising things. Java can and will be slow if you write crappy code with too much overhead, which goes for most other programming languages as well. Also, make sure your runtime and/or code perform proper garbage collection, which helps as well.

Personally, I think Java is a good programming language. The "compile once, run anywhere" philosophy was one of the first of its time(before that, you had to compile your program for many unique architectures, hardware, etc). PHP has a similar idea, but that's a scripting language(which comes with a different set of problems), and has some issues that I won't get into here.
It's also an active language that's sure to continue for a long time, and can be understood by many, if one takes the time for it. Compare this to C, for example, which can be daunting for the average beginner. Of course that is simply my opinion, someone else may come along with a very different one.

TL;DR: "Professional programmers" know what the right tool for a job is.

nick
January 3rd, 2013, 07:32 PM
as cool and flashy as "professional programmer" sounds, you sound like a huge hypocrite when you don't realise that Java has its purpose. Because, you see, many systems run it just fine.
If you were as professional as you make yourself out to be, you probably wouldn't even have thought of that statement.



TL;DR: "Professional programmers" know what the right tool for a job is.
I am a professional software engineer. You can like it or lump it, it's a simple fact.

Silicate Wielder
January 5th, 2013, 03:53 PM
I've decompiled the files for minecraft here and there and the style it's coded in seems similar to that for Javascript. perhaps Learning javascript before you learn java would be helpful. I want to learn Java eventually but I first need to master Javascript. CSS is a bit of a pain for me though.

nick
January 5th, 2013, 04:36 PM
CSS is a bit of a pain for me though.
Technically CSS is not a language because it contains no processing logic, it's a presentation tool. It's made it a lot easier to produce web pages that will look more or less the same in different browsers although lack of common interpretation of web standards is still a big issue. I find CSS pretty straightforward, certainly the basics of it are. Some of the more advanced positioning can be a bit tricky.

ethanf93
January 5th, 2013, 06:29 PM
Technically CSS is not a language because it contains no processing logic...Semantics: CSS is a language but not a programming language, much like HTML.

I'm learning Java this term (Object Orientated programming). I looked up some tutorials online and tried to read them, but I still don't really understand it.

Frankly, I want to know this. How hard is Java to learn?
Well, compared to other programming languages Java probably isn't too bad. All programming has some requirements though. Are you making sure to only look for beginner tutorials (and not more advanced/intermediate stuff?)

Some stuff in programming can be difficult for people to get their heads around- having a good book & a good instructor can be really valuable there.

nick
January 5th, 2013, 06:52 PM
Semantics: CSS is a language but not a programming language, much like HTML.
Nope. Neither of those are true languages, certainly not programming languages. They are standards. A very different thing. The L in HTML stands for Language but there's a huge difference between a markup language and a programming language. One is only about presentation and the other is about processing.

ethanf93
January 5th, 2013, 07:23 PM
Nope. Neither of those are true languages, certainly not programming languages. They are standards. A very different thing. The L in HTML stands for Language ...
Cascading Style Sheets (CSS) is a style sheet language ...
A style sheet language ... is a computer language ...

They (CSS & HTML) are languages, albeit not programming languages.

... but there's a huge difference between a markup language and a programming language. One is only about presentation and the other is about processing.

My comment was about the (very specific and probably accidental) wording of your post, I agree that CSS & HTML aren't meaningfully "programming languages."

TheMatrix
January 6th, 2013, 03:49 AM
I've decompiled the files for minecraft here and there and the style it's coded in seems similar to that for Javascript.
That's pretty interesting, because JavaScript is not at all like Java. Sure, the syntax for some things is similar: it's all mostly derived from C.
You would not, for example, have to declare variables like in assembly(this specific snippet is MIPS assembly):

.DATA
sentence: .asciiz "Foo$"


In Java, you can do functional programming(using different functions as opposed to objects, an idea that doesn't really exist in Java), and the idea of an object is very different, too. Java has different access levels(private, protected, public) for functions, as well as specific return types(void, int, String, ...) and parameters(static, final, volatile, ...). You don't have any of that in Javascript, you have conventions instead(prefixing an object with an underscore indicates it should be "private". That will not, however, actually prevent something else from using that "private" function, however).

perhaps Learning javascript before you learn java would be helpful. I want to learn Java eventually but I first need to master Javascript.
I think you can start with whatever is easier for you.

CSS is a bit of a pain for me though.
It shouldn't be, unless you're diving in too deep too quickly.
Compare CSS to all the options in your word processor. You typically write out your document first, and then you later go back and add fonts, change colours, and all that, if you still have time.
Well, CSS is no different. If it's absolutely vital for the content(centering a title, for example), you could do that earlier. But pretty effects like shadows and colourful borders are best left for when everything else is done and you have extra time and will.

I am a professional software engineer. You can like it or lump it, it's a simple fact.
You're still technically wrong. The title means nothing to me.
The fact that you're basing your flawed statement on your title alone only makes you look silly, and makes the whole field look bad.