Click to See Complete Forum and Search --> : Request for bored java gurus...


kmj
10-11-2000, 10:37 PM
I've just finished writing my first two java programs, and they seem to work fine. They were done as a homework assignment, and submitted today...


If any of you java guys get a few moments of boredom and would like to excercise<sp?> some of your hubris, I'd appreciate it if you'd take a look at it (http://www.cs.rit.edu/~kmj9907/assign1.tar.gz) and tell me how I can make it better. It looks really ugly to me; I'd like to use it in that little "examples" thing that LinuxDuck and I were talking about, and I don't want anyone who might use it for help to learn bad practices from me...

so you get my point, and if my link actually works, I'll STFU. (that's shuttheFup. http://www.linuxnewbie.org/ubb/smile.gif )

Edit --Heh, heh. forgot to close the url tag; trying again...

[This message has been edited by kmj (edited 11 October 2000).]

klamath
10-12-2000, 07:58 AM
BTW, it's just a tarball - it's not been gzipped.

------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)

klamath
10-12-2000, 08:04 AM
In looking at it for 2 minutes, here's a couple comments:


static int dayTimePort = 13;


This should probably be final as well.

timePack = new DatagramPacket(msg, msg.length, dayTimeHost, 13);

Shouldn't this use 'datTimePort' instead of a literal 13?

I'll take another look at it when I get home.

------------------
- Klamath
Get my GnuPG Key Here (http://klamath.dyndns.org/mykey.asc)

[This message has been edited by klamath (edited 12 October 2000).]

kmj
10-12-2000, 08:20 AM
oh, strange... I must of messed up when I tar'd it; it's only 5 k anyway...

Thanks for the initial comments; final is like const right?

that 2nd one was a stupid mistake; I'll fix it. I really need to learn to look things over better; I'm sure I'll get slammed for that. Oh well, life goes on...

Thanks again...
It wasn't too hideous w/ all the try/catch blocks?