I like Eclipse
by Volker Weber
Today was the day that I learned to appreciate Eclipse. It lets even a Bozo like myself slap some Java code together that actually works. :-) Thanks, Hubertus, for giving me a head start. I could take it from there and create the utility I needed.
Comments
Actually, eclipse is often mistaken as a Java IDE.
No doubt, the Java IDE that it comes with is great, but there's a lot more to eclipse.
E.g. if you're working with XML-based document formats, there are multiple plug-ins which allow you to create documents and validate them as you write. Also, there is a plug-in which checks XML schemas for standard compliance and plausibility (i.e. it applies certain typical design error patterns and notifies about their usage).
Beyond that, there's a plethora of other plug-ins for just about anything you might need. That's the beauty of a well-working open source community...
Just my two cents,
...and I like to see it running under MacOS X.
Recommended plugins: x-men(XML) and transclipse(XSLT)
Volker did you call the array variable 'siteSucker'?
Tobias
Uh. Improve XSLT plugin, not transclipse. Sorry
Tobias, siteSucker seems to be an array of concurrent HttpGet threads.
Volker, some remarks, maybe interesting for a Java newbie:
- There is no need to use "new Long(timeDiff).toString()", because (a) .toString() is always automatically called by the concatenation operator "+" and (b) timeDiff is automatically convertet into a String when used in String concatenation. Writing "timeDiff" instead makes the code a little bit more clear.
- Interesting you are using Date instances to measure the time. You could also have been using System.currentTimeMillis(), which would be a little bit more accurate, as it does not force a new instantiation. For displaying dates, DateFormat.getDateInstance().format(date) is recommended.
- It appears, that you are implementing some kind of "busy waiting" (but I cannot tell correctly as most of the code is hidden), when writing "stillAlive = true" inside a loop. This causes some processor load. Using Object.wait() and Object.notify() would be much more effective (but maybe you've already implemented it like that?).
Anyway, good start, using concurrent threads and the java.net. package is quite good for a beginner (did you take a look at Apache's httpClient project?).
-Mo.
Maybe you're trying to develop something which is already done in JMeter ( http://jakarta.apache.org/jmeter/ ), don't you?
I've used JMeter recently to stress a webapp, and it worked nicely. It's a very complete app.
Denis, JMeter is an aircraft carrier, whereas I am looking for a small boat. I believe that the organization would rather use Rational Robot than JMeter if they were to deploy a real solution.