1) I often find myself writing factory type interfaces, but one of the problems with interfaces in Java is that, while you can include static variables, there isn't any way to include static methods.
This means if you want your getInstance and setInstance methods inside the factory interface itself, you either have to resort to using a static variable or you have to create a second clas
If you are new to the concept, here's a refresher. Or if you prefer the layman's version:
Let's say you want to have a lazily initialized singleton.
What is a Widget?
When I say â€œWidgetâ€, what kinds of things come to mind? If asked you to name a few widgets that you know of, what would you say? A button, perhaps? A scroll bar? Maybe tabs, check boxes, of course, and radio buttons, spinners, sliders and more? On and on I am sure you can come up with examples of widgets...
The argument started with the web developers assertion that unit tests could test just about everything. And to look at her code, you'd almost feel the same way. As a TDD proponent, she had nearly twice as many tests as she has methods and classes. Not a single like was untested... Well, that probably isn't 100% true, but it damn near looked like it.
So, for those of you who missed the first blog entry about this, I'll recap. The basic idea is the creation of an update/install mechanism that is as easy to use for developers as SVN.
So, now, as with many of these "spark of insight" ideas, it may very well be that it has been thought of and discarded over and over again, and I am just one of the many who will soon find myself with a sheepish grin and a dunce cap on my head...
Little known to most people who've tried to put a JMF application together is the fact that it seems to now be completely unsupported by Sun. Admittedly, it's a tough API to code for.
Object pooling in Java is generally a bad idea for many reasons, not the least of which it has the nasty ability to actually cause the very performance problems you are trying to solve on modern JVMs, but there are always cases where the resources available to your application are in such limited supply that you really don't have a choice in the matter.
Two bugs in two years, new features every week, deadlines met each and every time… and what’s with these ruby slippers?
It's been just under a year now since I started practicing XP programming, and I have to admit, as much as it is anathema to my style of programming, it is a flawless system that far surpasses the wildest dreams of my programming expectations.