Skip to main content

Blog Archive for staufferjames during August 2007

What if a Java allowed both static and dynamic types? That might allow the best of both worlds. i.e.:String str = "Hello";var temp = str;temp = new Integer(10);System.out.println(temp.intValue()); Would that be possible? Would that be beneficial? For languages that support it, how is it used? When are static types used and when are dynamic types used? Are there patterns? Is this a...
Do you assume that toString() on any given object has a low cost? I do. Is that assumption generally valid? If it has a high cost should that normally be changed? What are valid reasons to make a toString() method with a high cost?
As I build *nix piped commands I find that I want to see the output of one stage to verify correctness before building the next stage but I don't want to re-run each stage (especially when steps are expensive). Does anyone know of a program that will help with that? It would keep the output of the last stage automatically to use for any new stages. I am visualizing a tabbed GUI where each tab is...
One way that I evaluate a new IDE is by opening a file in a fresh install and determining how much I can do with that file. Obviously features that need to know about the other files in the project won't work. I recently tried to use NetBeans and JDeveloper to generate getters and setters. Neither would allow me to do that and one of them allowed me to choose that menu item but it just did...
Here is a quick tip: Do you have two anonymous inner classes that need to communicate? I had two anonymous inner classes that implemented Runnable and needed to communicate with a boolean value. Therefore I decided to make a boolean variable in the declaring method but in order for the inner class to access the variable it needs to be declared final. But that would prevent me from changing the...