Learning Java

General discussion and socializing.

Re: Learning Java

Postby Lahrmid » Sat Oct 23, 2010 5:38 pm

loftar wrote: I just don't want to use C++ as an example, since I hate that language for reasons outside the scope of this thread. :)


But throw it in nonetheless! I'm intrigued :)
User avatar
Lahrmid
 
Posts: 609
Joined: Sat Mar 27, 2010 12:00 pm

Re: Learning Java

Postby theTrav » Sun Oct 24, 2010 4:25 am

Neptjunoue wrote:Anyone have any advice for someone that wishes to learn java?

What languages are you coming from?

As loftar says, there is a lot of extra crud you need to learn in java before you can do meaningful stuff.

I've heard the "don't use an IDE" argument many times, but I don't think it's a particularly important factor. If you DO opt to use one, I recommend the community(free) version of intellij IDEA. Eclipse is another well known free one that will do what you want, more people seem to use it than netbeans, I haven't used netbeans much so can't make meaningful comparisons with it.

My advice is to do something you enjoy / benefit from with your programming. I always found abstract cases to be good for initially groking a concept, but for deepening(it's a word damnit!) and retaining that understanding nothing beats applying it to solve a problem that you are having.

Other than that I recommend learning to read javadocs for just about everything, have the J2SE api bookmarked, if you're going to use third party libraries, bookmark their java docs. If you're going to use ant as a build tool, bookmark the ant task reference.

Speaking of third party libraries, I advise sticking to open source ones, Apache Commons has a lot of good stuff and Google has a pretty good collections library.

I advise starting out with either console apps or swing apps, messing around with JEE will probably do your head in as there's quite a bit of PITA packaging with servers and configs etc.

If you want help there's a ton of people on #java in irc.freenode.net but they can be a surly bunch, especially if they think you're trying to get them to do your homework. If they don't help you try www.stackoverflow.com
User avatar
theTrav
 
Posts: 3464
Joined: Fri May 29, 2009 11:25 pm

Re: Learning Java

Postby Neptjunoue » Mon Oct 25, 2010 9:41 pm

Well it makes sense for Java to have some concepts that will be different from other programing language. As for my programming background, I just know enough programming to make a small game that a good amount of my classmates enjoyed. Here is a link of the program that my group made as a project as a final a while back. The making of his was actually pretty fun so I actually improved more on the game even when the class session ended. Of course when I obtain more knowledge, I will have to get to another project so I can apply more of the things I know into something productive.

http://www.megaupload.com/?d=AK4KARDO

I also have enough programming skills to kind of "tinker" with codes in some other languages as well, taking a very basic java calculator (it only add subtract, multiply, and divide). I added more functions such as decimals (I had to use logarithm for this). Object Oriented Programming isn't really new to me and I am trying to get into a habit of thinking in such a term unless a group of experienced programmers say it is not a good idea, at least not all of the time. Essentially I have at least some ground that these concepts aren't without roots.

Going check on those links that was posted in these threads. Is it alright if this thread stays alive for the sake of learning Java?
Reaper, Reaper, that's what people call me! Why?
Cause they all die! When I sing, I end their lives
You act as though payback makes you a noble man
Is that a fact? Well, you're a goddamn Philistine!
User avatar
Neptjunoue
 
Posts: 344
Joined: Sat Aug 21, 2010 3:20 am

Re: Learning Java

Postby loftar » Mon Oct 25, 2010 11:17 pm

Neptjunoue wrote:Object Oriented Programming isn't really new to me and I am trying to get into a habit of thinking in such a term unless a group of experienced programmers say it is not a good idea, at least not all of the time.

It is definitely not an idea think in those terms all of the time. Object oriented programming is definitely not groundless, and there are many instances where it can be applied very naturally, but it is extremely overhyped (see my sig), and some of the worst design decisions I've seen stem from trying to fit things into an OO mold where it should be obviously that it is not reasonable (square pegs in round holes and all that). This is also, IMNSHO, one of Java's absolutely greatest problems -- it gravely penalizes doing something other than the object oriented way.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Learning Java

Postby Neptjunoue » Tue Oct 26, 2010 2:06 am

I'm not sure but this is what I think I read. Although you do acknowledge that Objected Oriented programming has its place needed as well as its usage, you feel that it is overused, particular in situation that another concept would have done a better job. The overusage of this in Java makes it rather inflexible for those that are not object oriented mindset. Correct me if I'm wrong.
Reaper, Reaper, that's what people call me! Why?
Cause they all die! When I sing, I end their lives
You act as though payback makes you a noble man
Is that a fact? Well, you're a goddamn Philistine!
User avatar
Neptjunoue
 
Posts: 344
Joined: Sat Aug 21, 2010 3:20 am

Re: Learning Java

Postby JustasJ » Wed Oct 27, 2010 9:20 am

I tried to learn Java last summer and it only confused the hell out of me. Personally, I prefer Ruby. It had Object orientation as the core of it's design and yet it doesn't bound you to all kinds of arbitrary rules like Java. However, classes tend to have unmodifiable values and it's often difficult to get data out of objects. At least for a newb programmer like me :)
Throughout the centuries there were men who took first steps, down new roads, armed with nothing but their own vision.
- Ayn Rand
User avatar
JustasJ
 
Posts: 205
Joined: Wed Feb 03, 2010 1:48 pm

Re: Learning Java

Postby loftar » Wed Oct 27, 2010 9:04 pm

Neptjunoue wrote:I'm not sure but this is what I think I read. [...] Correct me if I'm wrong.

That's pretty much a correct interpretation, yes.

JustasJ wrote:Personally, I prefer Ruby. It had Object orientation as the core of it's design and yet it doesn't bound you to all kinds of arbitrary rules like Java.

Mind you, "object orientation" has become a very confused term, in that it is often used to refer to rather different (though related) concepts. In the context of C++ or Java, "object orientation" refers to a very specific data model, invented largely for the Simula language, back in the 60s. I regard this sense of the term with a very high degree of derision, since, while having sometimes reasonable roots, it includes so much enforced structure, much of it which is directly superfluous and even more of which is just floating abstractions. The actual semantic core of this model, which is implemented e.g. by the CLOS (and by SmallTalk from what I've heard, though I have no personal experience by that language) in a far more reasonable way than Simula ever did, is what is called the "message passing" paradigm of programming.

In a broader context, however, "object orientation" refers to the semantic model invented for Lisp even further back in time, where each conceptual object is opaque and defines its own semantics, as contrasted against "digital" languages such as Assembler, Fortran or C, where no structure is enforced and everything (including pointers) truly are numbers.

In the context of languages like Ruby or Python, the term refers to a Frankensteinian chimera of the two above senses. Such languages are, indeed, "object-oriented" in the true Lisp-sense of the term; but they also include bits and pieces of the Simula-sense of the term, more often than not (just as if to explicitly prove that it's a floating abstraction) caring rather little about implementation and underlying concepts, as long as they can reuse the Simula syntax for what they reuse -- "methods" come to mind particularly.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Learning Java

Postby Mqrius » Thu Oct 28, 2010 3:30 am

I love python, because it feels easy and natural. I hate it, because in some cases it's hundreds of times slower than even java.

The backend of the world map is written in python, with an sqlite database. It works pretty well, but if the project would be any bigger, it just wouldn't be sufficient. sqlite is very bad with concurrency. Right now, when I'm inserting a new batch into the database, you probably can't view the map for a few seconds. And before I recoded the entire matching algorithm, matching large batches could take over half an hour.

Frontend is of course built in javascript and some php, html and css. Javascript was pretty new for me, and the abstracting google maps API didn't help. But it has some interesting concepts. Not sure if I like it yet.
User avatar
Mqrius
 
Posts: 367
Joined: Sun Aug 29, 2010 8:58 pm

Re: Learning Java

Postby loftar » Thu Oct 28, 2010 5:03 am

Mqrius wrote:in some cases it's hundreds of times slower than even java.

"Even" Java? I thought we were past that. :)

Java is bad in many ways, but slowness is not one of them. If anything, Java makes it deceptively easy to write slow programs, since it easily makes one use more complex things than one may think that one uses, but that's all avoidable if one knows what one is doing. I've covered it many times on the forum, but the JVM's compiler (at least Sun's Hotspot) is a really cool piece of technology and just about the only thing I admire about Java.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Re: Learning Java

Postby kaka » Thu Oct 28, 2010 7:25 am

Mqrius wrote:I love python, because it feels easy and natural. I hate it, because in some cases it's hundreds of times slower than even java.

I had placed my hope in the Unladen Swallow project, run by Google, that was supposed to up the speed by 5 times.
They never got very far, though, and the results where disappointing.
User avatar
kaka
 
Posts: 673
Joined: Fri Apr 03, 2009 8:31 am
Location: Château de Gâteau

PreviousNext

Return to The Inn of Brodgar

Who is online

Users browsing this forum: Claude [Bot] and 5 guests