This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have just started programming, and I would very much like to have someone review my code so that I don't compound mistakes when I modify it. Essentially, I want to know if I am making any fundamental mistakes that could hurt me later when I try to make the code more sophisticated. Is there a forum or service available? Can it be done here? BTW, the code I wrote is short and easy to understand. And it compiles and works with no errors. But naturally that doesn't mean errors, or substandard programming, don't exist.
Marilyn, The Cattle Drive is now a fee-based service, right? Do you mean to say that folks can't post non-Cattle Drive related code here and get it nitpicked for free?
>Do you mean to say that folks can't post non-Cattle Drive >related code here and get it nitpicked for free?
That is not what I intended to say. I had the impression that Tina was looking for more than what she can get in the regular forums by posting code here.
Tina Parks
Ranch Hand
Joined: Jun 30, 2001
Posts: 35
posted
0
How about if I post the code and see? If so, in which forum?
If it's only a page or so I'd dump the code anyway If it belongs somewhere else you'll find out. (don't worry about the semi-militant nature 'round these parts, comes from giving ppl guns ) Dave
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
10
posted
0
This, Java in General (beginner), is a good forum to begin in.
Tina Parks
Ranch Hand
Joined: Jun 30, 2001
Posts: 35
posted
0
Okay, here is the code. It is designed to draw vectors with the mouse. I stripped it down quite a bit to shorten it, including the import statements. I am most concerned with the Canvas call (is there a better way?) and the drawRect() method I implemented in order to draw a border around the applet window. (There has to be a better way.) But most importantly, I am concerned about the overall structure -- I want a code that is robust. At any rate, thanks in advance. I loooove this forum! __________________
(edited by Cindy to format code) [This message has been edited by Cindy Glass (edited July 28, 2001).]
Tina Parks
Ranch Hand
Joined: Jun 30, 2001
Posts: 35
posted
0
Should I interpret the lack of responses as a good sign -- that there are no recommendations needed?
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
posted
0
It's just that we are in awe of your wonderful code, and don't want to sound stupid by critiquing it . Actually it looks pretty good to me.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Nura Horne
Ranch Hand
Joined: Jul 26, 2001
Posts: 40
posted
0
Yup, I lloked through it also and it has no errors in it that will be detrimental to programming more sophisticated works. Good luck, A
Tina Parks
Ranch Hand
Joined: Jun 30, 2001
Posts: 35
posted
0
Great! I do have one question -- what about the rectangle? In the above code I explicitly tell the program to draw a rectagle to use as a border around the applet window. Is this preferred?