Stan James

(instanceof Sidekick)
+ Follow
since Jan 29, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
10
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 Stan James

Hi, welcome to the ranch!

I'm not sure if you mean "generic" as in a general discussion, or the generics language feature introduced in Java5. If you Google "Sun topic tutorial" you'll almost always find something good at Sun.

Collections Tutorial

Generics Tutorial

Let us know what new questions those tutorials raise.
16 years ago
Per the spec and Sun implementations, Java doesn't generate exe files. You can find tools that do ... Google for "Java to exe" for examples.
16 years ago
To Rob's point, the abstract keyword is the way the author of a class tells readers and users that it is not complete and ready to use. Kind of like "Some assembly required" on the box a toy comes in.
16 years ago
I just ran across a photo of Steve Ballmer excitedly gesturing during a stage presentation ... and heard "Puttin on the Ritz" in the back of my mind.
16 years ago
my file is not markable ...

I'm curious, why is that?
16 years ago
Kool, thanks. Eggzellent point about the flexibility to choose other executors.
I always make sure I can change all these flags in a running system without changing config files and restarting. In one previous systems, we could turn logging on and off at package, classes and method levels for fine grained analysis. I added the "running system" bit to a vendor framework for that one. We worked long and hard to remove a ton of junk logging with a goal of a perfectly quiet log in the absence of errors. Never quite got there.
16 years ago
Is a SingleThreadExecutor significantly better than just a BlockingQueue with a consumer on other the end?
Timer should be fine. Set one to repeat every hour or minutes or whatever you need.

Does the file change? If not, it should be easy to read it once and schedule Timer events for time ranges that are in the future. Tools like Quartz and Cron handle complex schedules.
16 years ago
FWIW:

I've been using DEBUG extensively lately just to confirm the path through the code is what I expect. Stepping through with debug is deathly slow. Some of the framework is not "under test" and does some surprising things now & then.

I'd expect INFO to be usage metrics or business metrics and such, which really ought to be someplace else.

I put WARN on a few exceptions that are not expected but are recoverable. This might be nice in a situation where ERROR goes to help desk or problem escalation but WARN is just interesting to the developers.
16 years ago
Quick binary tree description: each node has two children, the left one is smaller, the right one is larger. But the right one or both may be empty, meaning no more children.

To walk a tree in order

1 start at the root
2 go left as far as you can
3 back up to the last place you could have gone right
4 go right
5 repeat from 2

Draw some on paper and try it:

See if you can write a Node class with a value and two references to child nodes, load up some values and walk them in order. Show us your work! That's how we know where you're stuck.
16 years ago
If you're into "ignoring rants" you probably don't pick up Cedric & Hani in the first place.
16 years ago
I've always wondered why "they" don't recommend overriding compareTo to be compatible as well. I guess because Comparable is optional.
16 years ago
Hmmm, I often name mine after the input or expected result. testTooLarge() testTooSmall() testWithPunctuation(). Can't say I have a convention.
16 years ago