Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Christopher Arthur

Ranch Hand
+ Follow
since Mar 09, 2004
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Christopher Arthur


I passed programmer exam in 2004 and haven't really done much to change my way of coding. Would I find that this book would be appropriate to learn what's new in Java?

Chris Arthur

sachin potu wrote:if i am not wrong , At that time you cannot do any thing, except having two different implementations.

like, HorseImplAnimal and HorseImplBird

or like Pegasus...
have you tried to reference the interface by (Bird) or (Animal)
Aerotek Petroleum is a fuel/energy accounting technical interface software design engineering consultancy with a tradition of powerful service and quality, and is looking for sanity engineering programmers to establish our mission to Mars. Based in Almaty, Yeravan, and Plano, our international herd attracts special people to one another through our astronomical ambition to rustle up good computer talent.

Suitable candidates will have at least five years experience, and have a bachelor's degree in engineering, computer science, mathematics, or metalsmithing and art history.

Job dutes/skills include:

* drinking a fuckload of coffee
* composing graphical interfaces for webcam services with Java
* Eclipse monitoring software
* Stuffing garlic up your nose

Email professional contact:
14 years ago
why don't you make a e-ouija with java2d?
14 years ago
I might be the only weirdo who thinks this is a good idea, but now that we can get the source to java and compile it ourselves: has anyone seriously considered translating the api into another human language? I mean all the class names. It seems that this would be a lot of work, but mostly grunt work for someone with the right kind of dictionary. Heck, for all that we could translate the api into latin or greek, ha ha...I mean if they're dead languages, then programming languages are 'undead' since they never lived.
Since from reading I've found different approaches to doing animation with Java2D, I thought I'd ask here before embarking on a new project.

Suppose you want to use either circles and lines, or bitmaps to make a simple animation, and you want to be sure that swing performs it faithfully without artifacts or lags. So naively, you instantiate a jpanel and override its paint method with something clever to draw any frame of the animation. Also, you have a good idea of how it should look and when its going to change, so you set a thread looping and waiting for signals to tell the jpanel to repaint itself.

Does this seem like the best approach?

15 years ago
Anyone used this? I just installed it, and it seems pretty extensive, although I can't seem to find a graphical editor for swing components. Does it not have one or am I looking in the wrong place?

15 years ago
is there a preset way to do this?

Suppose the user moves his finger in a circular motion on the laptop touchpad, and we want to know the average angular velocity of this motion. I have some mathematical ideas that involve an analysis of position and time, but I am thinking that some experimenting is necessary to know how many points are needed to get a control that feels smooth.
15 years ago
That's really great to know! Coincidentally I was thinking of a page design where one applet would be the view and the other would be the conroller, but i wasn't sure it was possible.
15 years ago
If an applet produces content wanting printing, how can the programmer take steps to ensure that the browser's print request is faithful to the content? Supposing that the applet shows a graphics canvas, are java printing services recommended?

If the produced content is wanting to be heard, can the programmer expect theh JavaSound API to function as in application contexts? Supposing that the audio source is purely mathmatical, is the java media framework recommended?
15 years ago
I'll try to take a deeper look into the description of the File class, if I ever have time. My application seemed to work fine on Mac, Fedora Linux, and even XP. Ironically, the one system which did not run it properly was Solaris 10.

The advice about serialization is helpful. Otherwise, using abstract path names does not seem to solve the problem that someone has to tell my application where its datafiles are. Either me, as the java programmer, needs to know a priori the executing operating systems, or the user needs to know a priori the location of the datafiles. Thus, no one can use my application without particular approval from sys admin.

While that seems fair in some respects, for my case I am more inclined to curtail my application into an applet rather than to pine for disk access.
15 years ago
JAVA is capabable of very much, and I am happy to use it, but one thing that I cannot comprehend is working with file systems. This issue seems to be where the run-everywhere principle seems to fail. Some OS's are case sensitive, others are not. Some point applications to the directory where they are executed, and others point to the users home directory.

I began developing my application in a single operating system, not thinking that file access would be an issue. Now I have discovered that to bundle an application as a jar and also with a set of data directories for runtime use is not a good idea. It's too difficult to ensure that the application will know how to find the directories if it has to use the operating system to do something as easy as find a file by name. Especially, my users should not have to configure at this level.

For my next revision, I'm considering a different approach and wondering what people here might think of it. The approach is to put everything necessary for execution into the jar. I might even take it further, as to make every object a java class, including the bitmap icons. The reason behind this is that up to this point I can't even seem to get consistent access to files that are not classes, even if they are in the jar.

My hope is that if every object is either compiled code or a serialized object, then java-2 will have no reason whatsoever to complain that it couldn't find a file. Then to access objects, assuming they are in the jar, I could uniformly use the package naming style "org.mypackage.myclass" and never use another slash again in my application unless i'm dividing two numbers or trying to print a tab character.

[ January 26, 2007: Message edited by: Christopher Arthur ]
15 years ago
The point is well-taken that learning everything isn't practical. As many here would know that studying and taking half a dozen certifications doesn't ease the racing feeling to stay current. So, the programmers making the big open source projects like eclipse or apache would do it because as inventors they would be current. I'm yearning to see the future of open source.
Ulf, what you say seems to fit with what I imagine about for-profit- corporation programming. It seems to say generally that understanding has diminishing returns.

Personally, I know as much about programming as I do about music, and I do neither professionally. However, I think there is a valid comparison between the two:

If a song is performed using digital samples of another song, then the sampled artist may have rights. If a song is performed from a theoretical analysis of another song, then the secondary artist might not have rights. Naturally, if a song is code and performance is running code, then the comparison is just, and "sampling" open-source code is a bit like signing yourself up to a record label.

But I wonder, though, about the longevity of this way of coding, since I believe that much of the music made with heavy sampling doesn't even last long in the market,and much less in the schools of music.
Just a point for discussion, possibly:

If you, as a programmer, choose to make use of open source code as part of your own programs, then at least, you should look at the code, and better yet, you should try to understand it.