JC Cook

Ranch Hand
+ Follow
since Nov 13, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by JC Cook

I would recommend reinstalling the SDK on the D: drive as well, then pointing both PATH and CLASSPATH there. It works fine that way for me.
Here are my environment variables:
22 years ago
In the 'about the Cattle Drive' page it says "We'll mail you back our comments, usually within 24 hours." I think it's safe to say that is generally true, but I think everyone should be aware of some unfolding circumstances that could change that a little.
1. The number of students submitting assignments on the Cattle Drive is increasing at a pretty hefty rate. Word gets around! Meantime, the number of volunteers to help nitpick is increasing also, but not at so rapid a rate. There is a "peaks-and-valleys" kind of demand that can occasionally put us behind. Some days we arrive home from a long workday to find 15 or 20 assignments to grade, and there just isn't enough time to get them all out that night.
2. For those who get into the 4.x and 5.x assignments, you're finding this to be a lot more coding than the simple problems you started with. Well, these are a lot more work to nitpick as well. Allow your nitpicker a little more time to get back to you.
In no way am I suggesting that the world-famous nitpicking service is diminishing to any degree. Just keep in mind that with increasing volume and longer, more complicated problems, that the goal of "...usually within 24 hours" may have to put the emphasis on the "usually". Sometimes it may take longer, even 2 or 3 days. In college we paid big bucks, and were lucky sometimes to see our graded work in 2 or 3 weeks! Cattle Drive is still a good deal.
23 years ago
Rashid, remember to always submit a new assignment to nitpick@javaranch.com. You never know who might be assigned to nitpick your next.
You sent your assignment to jc_cook@javaranch, but since I don't have an email address here, it went to Paul Wheaton. When he got to his mail and found it, he forwarded it to nitpick, who eventually forwarded it to me. I received it on 3/14, and it went back to you on the same day.
23 years ago
An assignment came in tonight to be nitpicked once again, and it began with this statement:

ok...hopefully your tips are starting to soak in..... I appreciate the fact that your comments are making me think about not just 'will it work' but also 'is this the best way of making it work'. Thanks


I gratefully wrote back

Thanks. That's all the pay we get, and all the pay we ask.


23 years ago
Here's an old post that perhaps merits repeating occasionally:
IMHO, writing optimized code is a good state of mind to be in all the time. You don't always know when you are writing a specific section whether it will later prove to be processing-intensive or not. Why would you want to write less-optimized code on the assumption that it won't matter, when it only takes a few more keystrokes to write better code?
In my early days as a greenhorn doing the Cattle Drive assignments, I felt myself resisting the advice that came with nitpicking. I thought my own years of programming experience should count for something. I finally came to realize that it was all meant to help me be a better Java programmer, and that if I spent my energies in employing the suggested styles and techniques instead of trying to prove why my way was just as good, I came out way ahead.
23 years ago
Each new assignment assumes you have read everything in the previous one and mastered it. For answers to this problem, go back to the information on assignment 1 and check out the link that says "get the name from the command line."
23 years ago
On the Cattle Drive we tackle one assignment at a time, working on it until we get it perfect. Then we go on to the next assignment, employing what we've learned so far. Most nitpickers will just ignore out-of-sequence submissions without comment.
When I went through the Cattle Drive, I worked on assignments way ahead of my nitpicker, then each reply I got, I'd fix the future assignments too, so they'd be ready to go when the time came.
And all the learning doesn't come from just getting each assignment to work. Don't underestimate the learning value of careful code review, like you get from nitpicking. Those who work hard to implement all the suggestions will learn far more than they bargained for.
23 years ago
No offense taken, Pres. And none intended in my reply.
23 years ago

I was told "Don't include an explanation [sic] point in writing unless you would shout at the person for whom the sentance [sic] is intended".


Well, I was told that opinions are like noses -- everybody has one. In this case, Webster's New World Dictionary defines exclamation mark as "a mark (!) used in punctuating to show surprise, strong emotion, etc." So assume no one is shouting, just emphasizing.
23 years ago
It seems there are always a lot of little details that get in the way when you first try to get going. Any one of them could be a part of the problem, but here are a few things to check:
1. Be sure the correct information is in your PATH and CLASSPATH statements.
2. When you compile, you enter:
javac Hundred.java
But when you run, leave off the .java and enter:
java Hundred somename

P.S. I'm betting it compiled into Hundred.class
[This message has been edited by JC Cook (edited February 17, 2001).]
23 years ago
...or to quote a popular Java study guide

"Notice that the declaration does not specify the size of an array. Size is specified at runtime, when the array is allocated via the new keyword.

23 years ago
It's ok if you do it, but you won't get a reply.
We tackle one assignment and beat you into submission until we get it perfect. Then we go on to the next assignment, employing what we've learned so far. Most nitpickers will just ignore out-of-sequence submissions without comment.
When I went through the Cattle Drive, I worked on assignments way ahead of my nitpicker, then each reply I got, I'd fix the future assignments too, so they'd be ready to go when the time came.
And that "extra credit" term is a little deceptive. It really means "the part you have to do later, after you get the basic part working."
[This message has been edited by JC Cook (edited February 14, 2001).]
23 years ago
My 2.2 (then called 1.6 Grains) took 18 lines, but when I filtered all the comments and blank lines out of the instructor's solution, he only took 17 lines.
Conclusion: You didn't comment enough.
23 years ago


This sort of optimization should be done only in heavily used parts of a program, where this sort of consideration is worhtwhile.


IMHO, writing optimized code is a good state of mind to be in all the time. You don't always know when you are writing a specific section whether it will later prove to be processing-intensive or not. Why would you want to write less-optimized code on the assumption that it won't matter, when it only takes one more keystroke to write better code?
In my early days as a greenhorn doing the Cattle Drive assignments, I felt myself resisting the advice that came with nitpicking. I thought my own years of programming experience should count for something. I finally came to realize that it was all meant to help me be a better Java programmer, and that if I spent my energies in employing the suggested styles and techniques instead of trying to prove why my way was just as good, I came out way ahead.
23 years ago
Once again, someone named "Paul" comes to the rescue!
It took me a while to find where Netscape stores cookies. Eventually I located them in a .TXT file in the \Program Files\Netscape\Users\MyUserName\ folder, under the cleverly disguised name of COOKIES.TXT ! Go figure.
Anyway, even though the text file has a warning NOT to edit it, I deleted the JavaRanch line, restarted Navigator, and voila! I'm back in the Saloon. Thanks, Thomas.
23 years ago