A DIY: learn Java
an instruction

Rebecca and Wayne interpersonal dynamics
Overview
Do
It Yourself sites (or DIY for short) have run their course. It seems
that almost everyone now has posted a blog on creating, controlling and
doing at home. From homespun wool to hacking the latest gaming system
into a laptop, DIY-ers have sprouted across the internet like wild
flowers. Or weeds, depending on your opinion.
DIY-ers
are an interesting breed. For starters, most of us fit into that
category of specialization. You and I know people who have specialized
in something beyond our own understanding. What is interesting is the
DIY-ers who have reached hyperspecialization. Their communication on
their abilities breaks down and no longer can they communicate with
people outside the loop. Traditionally, this is when people get careers
relating to their hyperspecialization. Which puts the rest of us
outside their sphere of communication.
This
came to my attention a while ago when I realized I understood less and
less of what my wife was talking about when she'd tell me how her day
went. I tried. I tried very hard to understand it and it helped that I
was fascinated by natural language processing. But there is a point
which she crossed that I couldn't follow with a layman's perspective.
The reverse is true for her understanding art. In fact, the masses
don't understand visual arts (and haven't for the past 50 years)
because of this hyperspecialization which resulted in the distancing of
art from it's suckle: the community.
For
several months, I tried to approach this system in painting. I used
departmentally specific symbols which communicated only to those within
fields outside of the art community. The piece was abuot disfunction in
communication. Ironically, because it was about miscommunication, it
was a misrepresented body of work and being misread was taken down
prematurely.
But
returning to DIY-ers, I noticed that because of Web 2.0 models DIY
communities had taken the place of hobbist communities and physical
social groups. Someone commented the other day that if you truly wanted
to become an attorney in California, all you needed was to study the
information to pass the bar online and then pass the test. There is no
requirement for law school. Save yourself some money: teach yourself
online! So, why doesn't it work like that?
I
have a couple theories. First, the internet has become too large.
According to Google, Inc, during the year of 2005 the number of
websites surpassed 8.5 billion. Web 2.0 platform feeds that number.
This surplus of information requires a precision of search which can't
be reached with outdated search algorithms. Personally, I'd like to see
NLP taken beyond the theoretically academic institutions into a
processing locale where it could make a difference in this area.
Second
theory: learning from DIY-ers requires you to already be "in the know."
There are dozens of projects I want to do (anyone know how to make a
LCD laptop monitor into something worthwhile?) which I can't do because
studying online help guides makes about as much sense as stereo
instructions. This is really the point of the beast - DIY is only as
helpful as what you already learned. Stereo instructions mean a great
deal to someone who knows audio equipment, but where did they attain
that information?
I
decided to mimic the DIY community by documenting my process of
learning skills which I have wanted to learn: java, linux, etc. The
list will grow as I learn and learn what other people around me know.
But there's one important catch: I need to learn it from someone I
know, one-on-one. If I fail miserably... well, maybe I wasn't meant to
learn something. The art project is to analyze the social interaction
between teacher and learner - between the experience of learning and
the experience of adapting to new information. I will
post documentation on this work.
package
ralph;
* My first java file.
* @author wayne
*
*/
public class TheCode {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println("monkey " + getNumber());
System.out.println(getNumber());
}
public static int getNumber() {
return 3;
}
}
This was my "first" written java class
taught to me by my wife, Rebecca.
I am an artist. Or a non-artist. Or
whatever. My wife got her master's degree in computer science and
programs full time in java programming language for Magma Design
Automation. When we moved out here, she specifically wanted a job that
used java because it is her favorite computer language. Me? Besides my
brief career in programming with actionscripting for flash
presentations to children, I don't understand anything about computer
programming.
My last "real" job was designing flash
language tutorials. Six months before I left the job, they installed
flex 2.0 on my computer at work and asked that I start programming my
activities in flex. I spent 6 months hating work because I couldn't
teach myself flex. The funny thing about learning anything in today's
world is that it should be all on the internet. I strongly believe that
everything is on the internet - all information exists somewhere in
digital form and can be transferred through bits, insignificant ones
and zeros. However, as I have found, it is next to impossible to find
anything anymore because the internet has become so massive and the
search algorithms for major search engines are outdated beyond
resolving the burgeoning world wide web.
I realized that the only way to learn
anything is by going back to the most basic elements of learning -
passing information from one person to another. The personal touch. It
has become out-of-style in the information age to get information
directly from one person, but I am realizing that it is essential in
order to learn anything. I'm not just talking about the personal touch
in a physical realm - one of the greatest beauties of a digital world
is the non-presence of others through digital means. I am hoping that
this experience I am putting myself through can be a part of myself -
my learning - which I have plugged into the internet and exists as a
personal one on one learning process which might help others.

in eclipse IDE
Realistically, I don't expect anyone to
learn anything from this documentation. I do, however, expect to get
something from it besides a better understanding and ability to program
in java: I just want to understand what my wife is talking about when
she explains her job.
My head hurts after today's session. I
think I understand what classes are now. I vaguely knew what objects
were before. I am still frightened by trying to find code to do what I
want. Rebecca told me that what I need to do is first decide what I
want to do in java and then work backwards to learn how to do it. That
seems easy enough. I'm used to the way things were in flash coding: I
knew a good chunk of the commands that existed so I could easily call
them to memory to write my code.
Session one:
Set up eclipse. This is easy to do on
both windows and linux platforms. We had some problems getting java 5
working on eclipse in linux. We're still working on it.
Create a project. I named my project
"helloworld" because that was the name of the exercise. The java
libraries are loaded into this project.
Create a package. I remember strange
names. I named the package "ralph." See attached files for .class and
.java files.
In the package, create the code .java
file "TheCode." Make a main method "public static void main..." within
which we call a method from the java library.
System.out.println("whatever your message
is")
[see the code at the beginning of this
post]
The video follows our session; I learned
how to print "monkey."
View
video (needs quicktime 7)
Session 2
Rebecca gave me homework. It was the
only
way.
Most of learning comes from plugging
away
at something and playing with it, of course with the fastidious
guidance of a tutor. I've thought a great deal about tutors over the
past couple of days since my last lesson. In grade school, when you
fall behind your studies you are recommended to take on a tutor. This
person acts as a mediator to maintain personal contact and guidance in
training your mind and studies to understand the skills that are being
taught. I believe that I once had a tutor for math when I was in high
school. Amanda Gambino. A friend who was in advanced math who was
willing to help me out. I wasn't in trouble of flunking: I just felt
behind because I was in the advanced classes and didn't grasp math as
fast as my brother might have.
Interesting in looking back that my
tutor
then performed her great charity to me in part because she wanted to
date me. Here I am, getting tutoring lessons from my wife, the person
who I want to spend all my time with.
Rebecca gave me some twenty pages of
text
in our "textbook," Lewis & Loftus' 5th edition Java Software
Solutions text. I believe she used a similar text when she went through
her studies of early java. A couple of confessions for those of you
reading this, hoping to learn a bit of java along the way: I think I
had a headstart. My limited actionscripting knowledge has transferred
easily to the basic skills we're dealing with here. Since I know what a
string is and the difference between a string an integer, I can't say
that my reading was terribly enlightening. I read pages 42 - 90;
truthfully, I skimmed most of them. However, a few pages before the
discussion on scanning data, I got really lost and had to do the work
in order to understand what was going on.
While reading this, I thought about
the
Battleguard group I infiltrated earlier this year and how similar this
experience is to that experience. There is a limit/threshold which I
was able to go up to comfortably, without experiencing any conflict
with previous personal experience - or lack thereof. I could go to the
practices and pick up a sword, but the moment I was considering
becoming more engaged than that, it plunged me into a social experience
I wasn't prepared for. This is an experience that we all go through by
crossing thresholds between our inner social matrix and the outside
matrix which includes the greater public sphere. Somehow, I'm trying to
reach that sphere and chip away at it, by learning scanning in java.
After a couple of attempts with using the scanner method to input data,
I eventually fulfilled the requirements to create a conversion from
pounds to kilograms (see TheCodeb.java).
/**
* */
package echo;
import
java.util.Scanner;
/**
* @author wayne
*
*/
public class TheCodeB {
/**
* @param args
*/
public static void main(String[] args) {
Scanner scan = new Scanner (System.in);
double pounds, kilos;
System.out.println("Please enter amount of pounds:");
pounds = scan.nextDouble();
kilos = pounds * .45359237;
System.out.println("You currently have " + kilos + " kilograms of
stuff.");
}
}
Scanning is an input to the code.
System.in.
Scanning isn't actually a string/text/number, but an object. It must be
converted to a string or number.
Why shouldn't I get in the habit of
always using double for a numerical value, and then choose from the
other possible options when those limitations are necessary?
I'm still not sure I understand what
a
class is. Or what an object is.
Method makes sense to me. A method is
a
group of code which is called with a single line of code anywhere else
after the declaration of the method. I used a lot of functions (the
equivalent of a method in actionscript) when I did flash designing.
The beginnning of a cultural
introduction
revolves a great deal around language. And rightfully so, according to
Jacques Derrida. Over the summer, I read a translation of his speech
and discussion of his speech entitled Ethics, institutions,
and the right to philosophy, among other books on the
philosophy of language/grammar. I've become more interested in the
cultural structure of a language and the symbols which that culture
takes on which give support to conscious philosophy.
I don't understand the language of
the
programming community, thus I am on the out group. I got a little
frustrated with this because my wife and I don't talk the same way
about code and although I thought I was asking a clear question, I
obviously wasn't because her answers weren't clear to me. This is very
important to note because communication between the in-group and
communication from the in-group to the out-group is one of the primary
keys to understand how to become apart of the in-group.
I get really frustrated because she
says
"directory" and I have no idea what that means. This is the code we
wrote together.
/**
* */
package tutorial;
import
edu.byu.phun.*;
import edu.byu.phun.body.*;
/**
* @author Wayne
*
*/
public class TutorialMain {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
Win3D win = new Win3D ("Tutorial", 100, 200, 400, 300);
Floor monkeydancefloor = new Floor (10);
SphereObj monkeysphere = new SphereObj();
Axes myaxes= new Axes();
win.add(myaxes);
win.add(monkeydancefloor);
win.add(monkeysphere);
monkeysphere.setLocation(1, 2, 0);
win.setLookFrom(10,1,10);
}
}
PUT A CAPTION 1