🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #650

Re: how to learn java (books, source code, docu, newsgrps), how to structure it

#650
From: Paul Murray
Date: Fri, 30 Jun 2000 00:00
118 lines
5851 bytes
"Michael Bauer" <htmlized@gmx.net> wrote in message
news:7cgmlsoj2i5cc13gbk07vu31blg75lfbt9@4ax.com...
> Hello,
>
>  I am food engineer, no job, therefore I want to change to be an
> Javaprogrammer.

Oh dear.

>I have income till end of the year, and free time to
> learn fulltime. My problems is how to structure my learning. How much
> time to be on a book (have Eckels/and a german one go2Java, and some
> other books too), how much time to read source code from others (where
> ??), how much time on sitting before the puter and try to write on my
> own programms.

I can't help you here because that's not the way I learn. I learn by bulding
small things and getting them working. See the java applet on my webpage,
for instance, which I wrote in an effort to understand Java thread
synchronization. I learn what I need as I need it. I *still* dont really
know how TreeModels, for instance, work.

> How much time to read the jdk-documentation. I really
> tried to learn, but what makes it so difficult for me is: if you can
> write a simple programming, you must know so much. If you want to
> programm a simple user input, you must now about streams and so on,
> you have to know about 10 or more classes, and to read the docu is
> really difficult to understand, an more for me cz i am from germany.

Bummer. That explains why you made "Javaprogrammer" inot one word, I
suppose.

You might not think so, but an easier way to start is by building swing
applications. If you are accustomed to visual basic or anything like that,
then you'll be used to attaching events to visual objects.

Start here:

//  Go.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Go {
    public static void main(String[] av) { new go(av).go();}
    String[] av;
    private go(String[] av) { this.av = av;}

    private go() {
        JFrame f = new JFrame();
        f.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        f.getContentPane().add(new JButton("PressMe!"),
Borderlayout.CENTER);
        f.show();
    }
}

And play with it. Add a listener to the button. Pop up a message with
JOptionPane. Find out how to resize the initial frame so that it doesn't
start up in the top lefthand corner of the screen. Try different layouts eg:
f.getContentPane().setLayout(new GridLayout(3,2));

When you want to write demo apps, use JTextFields to get your values from
the user. It looks better, which helps you feel beter about what you are
doing, and you dont have to negotiate java streams and character encodings
and stuff like that. Building applications with swing is really easy - you
just plonk the components down and add event handlers.

> I
> really want to improve my skill, but after reading in the book or
> studying source code i got depressed so much, i think i cannot afford
> it, that i do nothing for some days.

There is nothing cheaper than learning java. Everything you need is free. I
bought a couple of books, but they are useless. The javasoft site has the
software and megabytes of tutorials. You can even get a free IDE (Forte) if
you want, although I am most comfortable programming with notepad.

But as for the doing nothing, I find that I really need a concrete problem
or project to motivate me. For instance - I don't have the code anymore but
I wrote:
    A thing that projects the globe onto a mercator projection, but spins
the globe in all directions so that you can see how the projection distorts
the shapes
    A thing that goes through your disk drive and builds a directory tree
with a display of how much disk space each dirctory (and it's
subdirectories) uses, so that you can get an idea of where all your dis
space is going.
    A thing that attempts to factor numberts by building and solving a
boolean expression for the bits It worked, but it kept running out of memory
with anything more than 4 bit numbers. Oh well. This one was not visual.
    An applet to play Hexx - a game played on a hexagonal grid.

I have recently bought "hidden order" - a book about emergent systems. I
might code up some of the ideas in that. It's something that interests me.

>So, now you will say, all is
> individually. And that is of course true, but may you tell me how you
> did structure your learning, or how you would do it when you must
> begin for new to learn java.

Well, I downloaded the language reference manual and read it, then write
some code,  but that's not for everyone <g>.

> I have an impression what means oo, and i
> really fascinated from reusing classes, but i cannot launch.

Oo is really a differnt way of doing things. Another advantage of building
your first programs usibng swing is that it is heavily OO, so you pick up
the philosophy without trying.

--------------------------------------------------------------
http://www.users.bigpond.com/pmurray/index-2.html
ICQ: 26066755
Technical Details
Message-ID: <YHa75.3658$c5.10077@newsfeeds.bigpond.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7cgmlsoj2i5cc13gbk07vu31blg75lfbt9@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,49610ddb33aa0e8b
X-Google-Attributes: gid10d6db,public
From: "Paul Murray" <pmurray@nospam.bigpond.com>
Subject: Re: how to learn java (books, source code, docu, newsgrps), how to structure it
Date: 2000/06/30
Message-ID: <YHa75.3658$c5.10077@newsfeeds.bigpond.com>
X-Deja-AN: 641045094
References: <7cgmlsoj2i5cc13gbk07vu31blg75lfbt9@4ax.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
X-Trace: newsfeeds.bigpond.com 962410360 139.134.123.234 (Sat, 01 Jul 2000 10:12:40 EST)
Organization: Telstra BigPond Internet Services (http://www.bigpond.com)
X-MSMail-Priority: Normal
NNTP-Posting-Date: Sat, 01 Jul 2000 10:12:40 EST
Newsgroups: aus.computers.java