Learning Java

General discussion and socializing.

Learning Java

Postby Neptjunoue » Sat Oct 23, 2010 1:37 am

Anyone have any advice for someone that wishes to learn 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 » Sat Oct 23, 2010 1:41 am

Advice #1: Do not read the Haven client code. :)

Advice #2: More seriously, if you're trying to learn how to program (learning your first language), do consider a language other than Java. Java includes a lot of floating abstractions, and you need to be very comfortable around them to even be able to do even pretty basic stuff. Python, for example, offers less resistance in that you can learn the higher-level abstractions later, as you go along, and begin with the simple stuff.
"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 » Sat Oct 23, 2010 1:44 am

Well it's not exactly my first programming language as some of the difference in learning is the syntax as well as the commands. However since I did not do programming for a while, I am a bit rusty.

Can you clarify what floating abstract is, or at least refer to a webpage that tells? Thank you.
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 Igglebert » Sat Oct 23, 2010 2:15 am

http://www.byond.com/

This is a good way to start your programming journey. Not the best but it's a pretty simple language to learn.
Igglebert
 
Posts: 293
Joined: Wed Dec 02, 2009 9:50 pm

Re: Learning Java

Postby loftar » Sat Oct 23, 2010 4:36 am

What I mean by "floating abstraction" is not specific to programming, but a general concept of logic. A floating abstraction is a concept that someone has copied from someone else without understanding and/or caring about the ideas on which it builds.

What I mean in particular in relation to Java is that, even to write extremely basic programs, you need to understand Java's conception of classes, objects, methods, static/non-static data storage, symbol encapsulation and a couple of other things. (And I call them "floating abstractions" because it seems very much that they were, conceptually, just copied from C++ when Java was first conceived, without really evaluating their respective merits and functions.) In many other languages, you don't need to learn about all those things before you really need them for their actual merits; while in Java, you are forced to use them.

That doesn't mean that you cannot learn Java as it is, of course, but if you aren't used to Simula/C++ style object orientation, it will probably confuse you a bit before you wrap your head around it all.

If you really want to learn Java, you can try and follow Sun's tutorials. I recommend strongly against using an IDE (such as NetBeans) since they restrict the knowledge you gain about how the system works (and therefore make you a worse programmer), but the choice is, obviously, up to you.
"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 Onionfighter » Sat Oct 23, 2010 6:33 am

loftar wrote:What I mean in particular in relation to Java is that, even to write extremely basic programs, you need to understand Java's conception of classes, objects, methods, static/non-static data storage, symbol encapsulation and a couple of other things. (And I call them "floating abstractions" because it seems very much that they were, conceptually, just copied from C++ when Java was first conceived, without really evaluating their respective merits and functions.) In many other languages, you don't need to learn about all those things before you really need them for their actual merits; while in Java, you are forced to use them.


This may explain some of the problems I had with java.
Cheerleader
User avatar
Onionfighter
 
Posts: 2957
Joined: Sat May 30, 2009 8:45 am
Location: Mordor

Re: Learning Java

Postby Potjeh » Sat Oct 23, 2010 2:14 pm

I've only learned C(++) and Java, so I don't understand how it could be made any more intuitive without sacrificing versatility. I ain't about to go and Python, so could someone tell me just what makes such languages easier to learn?
Image Bottleneck
User avatar
Potjeh
 
Posts: 11812
Joined: Fri May 29, 2009 4:03 pm

Re: Learning Java

Postby jorb » Sat Oct 23, 2010 2:59 pm

loftar wrote:What I mean by "floating abstraction" is not specific to programming, but a general concept of logic. A floating abstraction is a concept that someone has copied from someone else without understanding and/or caring about the ideas on which it builds.


If by logic you mean "the study of arguments", then perhaps it is. I would argue that it is a concept of epistemology, rather than of logic, but nevertheless.

Neptjunoue wrote:Can you clarify what floating abstract is


An abstraction is a concept formed by reducing the information of several other concepts and/or empirical phenomenon to retain only some of the information contained in them. Abstractions are formed teleologically. If I, for example, wish to discuss the collective qualities of many human beings working and living together, then concepts such as "society" or "group dynamics" might be useful to me. By using those abstract concepts I can speak of "society" without having to conceptually keep my full, exhaustive understanding of what a human being is in my immediate "working memory", which is quite handy. Instead of speaking directly of "Cindy, Mindy, John, Mark, &c.", I can reference all people collectively with one single concept. A floating abstraction is an abstraction that I have adopted from someone else ("feudalism" "bourgeoisie" "proletariat") without any thought as to which concepts or phenomenon the abstraction was originally formed from (in those particular cases, a study of French history). A floating abstraction can cause one, among other things, to grossly misapply the concept (Speaking of feudalism in the context of Swedish history, for example), since one's understanding of the concept is fairly shallow. The abstraction is thus "floating" in the sense of being cut off from the realities from which it was originally formed.

The concept of the floating abstraction was originally formed by Ayn Rand, most likely after many years of arduous observation of American "Progressives".
"The psychological trials of dwellers in the last times will be equal to the physical trials of the martyrs. In order to face these trials we must be living in a different world."

-- Hieromonk Seraphim Rose
User avatar
jorb
 
Posts: 18436
Joined: Fri Apr 03, 2009 7:07 am
Location: Here, there and everywhere.

Re: Learning Java

Postby Lahrmid » Sat Oct 23, 2010 3:29 pm

I always felt like C++ was easy enough to learn using this tutorial: http://www.cplusplus.com/doc/tutorial/

I haven't had the time to jump abord the ship to heaven that is Java, but I intend to do so someday.
User avatar
Lahrmid
 
Posts: 609
Joined: Sat Mar 27, 2010 12:00 pm

Re: Learning Java

Postby loftar » Sat Oct 23, 2010 4:41 pm

Potjeh wrote:I've only learned C(++) and Java, so I don't understand how it could be made any more intuitive without sacrificing versatility.

If you know C++, then you should be able to see the contrast, because it exists between C++ and Java as well. I just don't want to use C++ as an example, since I hate that language for reasons outside the scope of this thread. :)

The main difference is that you don't need to use classes in C++, unlike Java. Python can still be argued to be simpler for the same reason, however, since C++ still requires you do grok its concepts of header files, namespaces and functions, but C++ is still simpler than Java. The difference is clear from a simple Hello World program.

Python:
Code: Select all
print "Hello World!"


C++:
Code: Select all
#include <iostream>

int main()
{
    std::cout << "Hello World!\n";
}


Java:
Code: Select all
public class MeaninglessSymbol {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}


In the C++ example, you need to understand what "#include", "int main()" and "std::" means. In Java, in addition to having to understand what "void main(String[] args)" means, you need to understand the significance of the "class" concept, the meaning of the Meaningless Symbol, which happens to have to be the same as the name of the file you put the code in, and the meaning of "public" and "static" and why the "void main" has to be scoped inside the "class" block. I'd argue that "#include" and "std::" are far simpler concepts to grok than all that; in particular, Java's distinction of static/non-static members can be quite difficult to understand before one has a quite clear grasp of what classes* and objects even are and how they encapsulate their members. In C++, you don't need to grok classes until you actually need them.

Note, also, that I don't argue that you have to learn what "cout", "System.out.println" or Python's "print" mean. That is the core part of what one actually wants the Hello World program to do, so it's only reasonable that one would have to learn that. My argument is that Java and, to a lesser extent, C++ (and C, mind you) force you to learn a lot of superfluous concepts in order to even begin to write actual, meaningful code.

* I write "classes" instead of "object orientation", since I don't really subscribe to the idea that "object orientation" necessarily must mean "Simula-style object orientation". This is also closely related to the reason why I dislike C++.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
User avatar
loftar
 
Posts: 9045
Joined: Fri Apr 03, 2009 7:05 am

Next

Return to The Inn of Brodgar

Who is online

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