[1685] in java-interest
Java How-to Guide
daemon@ATHENA.MIT.EDU (Glen C. Perkins)
Thu Sep 14 04:33:48 1995
Date: Wed, 13 Sep 1995 20:32:25 -0700
To: java-interest@java.sun.com
From: Glen.Perkins@MediaCity.com (Glen C. Perkins)
A very rough analysis of the mailing list traffic indicates that there are
more than ten people out there "just listening" for every one of us who
actually posts something. My guess is that there is a LOT of interest in
the answers to basic how-to questions.
There isn't ONE single tutorial book available yet. The tutorial on the
java server, while appreciated, qualifies as perhaps day 1 of a "Learn Java
in 21 Days" book. The "manual" is just an incomplete reference guide at
this point. It's too early for us to be snapping at people for asking
newbie questions. Telling someone who wants to know how to send mail thru
Java to "RTFM" with that manual is like telling a kid who wants to know how
to give his first public talk to "read Websters dictionary--everything you
need to say is in there."
We desperately need as many beginners as we can attract, but it will drive
us all crazy if we have to answer the same questions over and over again
for all the programmers we will (hopefully) attract to Java. We need to
make these answers easily available to everybody on demand, though. We'll
eventually have a usenet newsgroup, but that FAQ won't be quite what I
think we need.
I would love to see the creation of a library of Java code samples that
answer hundreds of "how do I...?" questions. A "Here's how to ..." FAQ with
megabytes of tested code samples. Start with the very simplest, primitive
operations: how to read a local file, how to write a local file, etc. to
more interesting things like how to implement all the basic object
relationship types with Java. Some random examples:
-- How do you send mail from within an app/applet?
-- How do you write text to a file? Will it be unicode or ascii?
-- How do you read a plain text file if it's ascii? What if it's
unicode? What if it's ISO 8859?
-- What's a "socket" and how do you use one?
-- How do you use a "hashtable"? What would you use it for?
-- How do you use "threads" to read something over the net while
doing something else? How do you know when it's finished reading? What if
the read failed?
-- In C++, a "car" object may have have four "wheel" objects as
parts, and contain three "person" objects as passengers, but the passengers
aren't parts of the car. Therefore, the C++ class definition would use
wheel objects but only pointers to person objects. If Java doesn't have
pointers, what do you do to make the part-of vs. contains distinction in
Java?
-- How do you do a perl-style associative array in Java?
-- How do you make an applet that does ...? (dozens or hundreds of
applet templates)
-- Etc., etc.
I'd also like to see it as a repository for useful classes, too. Bigger
projects than code samples and applet templates. Jonathan Payne took a stab
at a regular expression handler. Others are talking about applets for
creating multiuser chat sessions at your site. What about a handler that
turns the input from an HTML form into a hashtable for use in CGI scripts?
I'd like to see Sun provide some space for it on a server and a
moderator/librarian to organize the submissions. The rest of us could then
provide the questions and the code samples, although we'd love to have as
many code samples from Sun as they have time/resources to produce.
You'd jump to the "Java How-to Guide" with a (hopefully java-savvy) web
browser, and see zillions of questions that lead to well-commented source
code in the answers. The applet questions would be answered with working
applets that you could try out before grabbing the source code to see how
to do it yourself. (That part has already begun, so let's see it grow.)
The questions could be organized in multiple ways, and one way would show
off "neat" things that can be done with Java that might not have even
occurred to you if you hadn't browsed the "Java How-to Guide." For example,
a hot link that says: "Any machine that can browse the web can send e-mail
across the internet from within a Java program. It's easy. Here's how...."
That might come as quite a surprise to a lot of people who've been doing C
programming for a while on PCs or Macs. "E-mail from my PC from within a
program? I wouldn't have any idea how to do that in C.... Maybe I should
check this out...."
It's pretty easy to think of things that other people should do ;-) but I
can't imagine a more useful resource to jumpstart thousands of new Java
programmers. Maybe we could try it on a small scale, maybe just expanding
the applet samples section of the server and adding a little How-to FAQ,
and grow it from there step by step.
__Glen__
http://www.nativeguide.com
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com