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

 

staufferjames's blog

Can documentation be a "bad smell"?

Posted by staufferjames on July 15, 2013 at 1:42 PM PDT

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)?

Interfaces: balancing debugging vs. customization

Posted by staufferjames on July 15, 2013 at 1:39 PM PDT

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 it?

Posted by staufferjames on July 15, 2013 at 1:21 PM PDT

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:

  1. Spoof websites are more easily detected because the username and password don't show up (this may be a mute point if the username is saved but not the password).

Source Control Message for Single File Add

Posted by staufferjames on July 15, 2013 at 1:07 PM PDT

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 duplicate to also include in the commit message.
  2. File add: Already part of the commit
  3. Issue identifier

Can java.util.concurrent.lock.Lock detect deadlocks caused by two threads acquiring the same locks in a different order

Posted by staufferjames on July 15, 2013 at 1:01 PM PDT

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

Consider:
In lock:
Check the ThreadLocal list and if there are no other locks then proceed.

Format for design, requirements, etc

Posted by staufferjames on October 21, 2010 at 8:02 AM PDT

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 that information?

Consider this idea:

What kind of programming work do you like best?

Posted by staufferjames on January 23, 2008 at 12:18 PM PST

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: Creating new software.
Since that isn't the answer that I would give I asked my co-workers and between 4 of us we had 3 different answers:

  1. Creating something new
  2. Debugging problems
  3. Improving (ad

Zooming to better use desktop space

Posted by staufferjames on January 23, 2008 at 12:17 PM PST

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 objects are "zoomed out" and therefore take less space (in my field of view). I received an iPod Touch for Christmas and the zooming of web pages and pictures works well.

Defaults have consequences: Microsoft Word margins

Posted by staufferjames on January 23, 2008 at 12:17 PM PST

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.

Form post with URL paramters (after question mark)

Posted by staufferjames on January 23, 2008 at 12:17 PM PST

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

[prettify]         <form name="doForm" action="" method="post">         </form> [/prettify]
and used JavaScript to set action and call submit. But Tomcat showed the request as a GET (I.E. 7 is my browser).