One character

Over the course of the last two days I spent about 2 hours total debugging a problem on a virtual machine running on one of my computers. Describing the problem was fairly straightforward: the scheduled task wouldn’t run.

I read and reread the instructions. I looked at another virtual machine where the same scheduled task was running without a problem. I cursed a little and slept on it, hoping the solution would hit me overnight.

It didn’t.

I looked at forum pages and scoured knowledgebase articles all to no avail.

Then I took the rubber duck approach: I read the instructions, out loud, word for word. Slowly.

The Rubber Duck method of debugging

It goes like this:rubber-duck_0

1) Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety)

2) Place rubber duck on desk and inform it you are just going to go over some code with it, if that’s all right. Also works with printer problems and other application problems too (such as Outlook Rules, for example).

3) Explain to the duck what your code is supposed to do, and then go into detail and explain things line by line, or step-by-step. Very important that you do this in excruciating detail.

4) At some point you will tell the duck what you are doing next and then realize that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way.

Works every time. Actually, if you don’t have a rubber duck you could ask a friend to sit in, but you’ll be sure to embarrass yourself.

Here’s the magic text:

For the process to access the correct database, add more information to the end of the text in the Run field:
The [database number] is the number found on the AFN_INI registry key (e.g. enter 1 for INI_1)

  • To be prompted each time the task is scheduled to run, enter a space after the last quotation mark and enter:
    /p[database number] /n[serial number] 
  • For the task to run without prompting you, enter a space after the last quotation mark and enter:
    /p[database number] /n[serial number] /s.
    For example:
    “C:\Program Files\BadProgram\Integration.exe” /p1 /nWGLASA11115 /s.

Can you guess what my problem was?

hint:  For the task to run without prompting you, enter a space after the last quotation mark and enter …. database number…. serial number.

Here’s the input screen to help you along.  This was the screen that, as it turns out, was the root of the problem.

j1

 

 

 

 

And, just for the sake of completeness, here’s the same screen after the problem was fixed.

Clear as day, right?

j2

 

 

 

 

See that space before the /p1?

  • For the task to run without prompting you, enter a space after the last quotation mark and enter:
    /p[database number] /n[serial number] /s.
    For example:
    “C:\Program Files\BadProgram\Integration.exe” /p1 /nWGLASA11115 /s.

My fault.  I missed the importance of the “enter a space but I have to wonder if the process should be so fragile that the absence of a space should cause a fatal error with no hint as to the root cause or the corrective action needed.  And to further complicate things, the example text looks like this:

“C:\Program Files\BadProgram\Integration.exe” /p1 /nWGLASA11115 /s.

And sure enough, there’s the required space.  But there’s also a period at the end of the example and that will break the process.

  • The nothing that’s there (the space) is required.
  • The something that’s there (the period at the end) is not permitted.

Perhaps the documentation can be enhanced to indicate that the input box needs to begin with a space, since that is counter-intuitive.  Or there be a bit of error-checking code looking for the space.  Or the example text could indicate that there’s a space indeed there.

Or, better, I should just invoke the rubber duck 10 minutes into the issue, not 2 hours.

How do you solve problems like this?

 

 

Advertisements

About rondfw

Dad, Husband, Techie, Boilermaker
Image | This entry was posted in Work. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s