Skip to main content

James Stauffer

James Stauffer is a senior software engineer for SPS Commerce. His
14 years there have been mostly maintaining and enhancing one Java
enterprise web application. He wasted almost all of his money from
high shool graduation gifts adding a 16 MB RAM chip to a Windows 3.11
machine that already had 4 MB and learned the important lesson of
"right sizing".

 

Weblogs

How much code documentation is a symptom of bad coding (i.e. poor method or variables names, poor class or package structure, missing logging, etc)?

What are the cost vs. benefits of creating interfaces and how should they be balanced? I am only considering cases where interfaces are optional and aren’t needed.

Is it more secure to allow the browser to save a website password or prohibit the browser from saving the password?

    Benefits of allow the browser to save the password:...

What should be in a source control commit message for a single file add?

    Ideas:
  1. Reason: The reason for the file should be in a comment in a file so it would be a...

Could java.util.concurrent.lock.Lock use a static list of all threads that have locks and ThreadLocal locks lists to know about all in use locks and then check for incorrect order when lock() is...

Do a "requirements document" and "design document" use an outdated format? Is one monolithic document the right way to handle that information? Are there better ways to handle...

When interviewing candidates (only 3-4 interviews) I would ask them the following question:
What kind of programming work do you like best?

They always gave then same basic answer:...

On a real-life desktop I will often move toward an object to work with it. i.e. When I want to look at the calendar I will move closer to it. That allows better use of my desktop because some...

How much paper would be saved each year it Microsoft changed the default margins in Word to 1" on each side (or even 1/2")? Remember that when you choose your program defaults.

I had a URL that I wanted to POST with JavaScript so a made a

[prettify]
        <form name="doForm...

Normally I see abstract classes named as AbstractClass. But when there are many abstract classes that requires typing at least AbstractC when using code...

Does widening or autoboxing happen first? Which param method will be called from the autoboxing method?

I wish I had a terminal program that distinguished (i.e. with different colors) standard output, standard error, standard input, command input, and the command prompt.

I have been telecommuting 1-2 days/week for a few years so I present the following tips to those who want to telecommute:

  1. Practice communicating by email (especially when it is easier...

One connection good.
Then two connections better.
Or maybe not so.

Technorati Profile

I initial asked about
adding dynamic types to Java
but someone pointed out that I probably...

Here are my thoughts on the Midwest Java Technology Days: Minneapolis that I attended yesterday. (In order to get them out quickly I haven't refactored them.)

Free stuff: breakfast, lunch...

What if a Java allowed both static and dynamic types? That might allow the best of both worlds. i.e.:[prettify]String str = "Hello";
var temp =...

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...

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...

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...

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...

Would it be useful to be able to provide method return values for null objects?
For the List interface, the null return values might include:

get(int...


Is there any downside or problem potential to changing the Java compiler to automatically cast? In the example below the result of list.get(0) would automatically...

I use Source Insight as my primary IDE.

Searching my code and other files outside my IDE is something that I need to do often but I haven't found a good solution.

Some of my co-workers had their cvs login name changed so we had the problem where every directory checked out from cvs had a CVS subdirectory with a Root file in it that had the old...

The code below actually prints "yikes!"

A pet peeve of mine is when a variable is declared way before it is needed. It is much easier to understand a piece of code if a variable is declared just before it is needed.

When the user drags an item to a location, slows movement, and then makes a quick movement right before finishing the drag, the user probably wanted the ending location to be the mouse location...