Welcome to the QA Tech-Tips blog!

Some see things as they are, and ask "Why?"   I dream things that never were, and ask "Why Not".  
Robert F. Kennedy

“Impossible” is only found in the dictionary of a fool.  
Old Chinese Proverb

Wednesday, July 31, 2013

A Cute Gadget
The iGo "Green" Computer Power Adapter

In a previous blog article I mentioned that, when thinking about this article, the thought path took me to thinking about garage sales, (also known as "yard sales"), which lead me to thinking about Heisenberg's Uncertainty Principle, a weird association if I ever saw one.

As I promised, I began writing how I made that association.  At second glance I noticed that I was taking up too much space in the article discussing something totally irrelevant - so I deleted it.

However, the bottom line is that it is possible to score very interesting and useful stuff at garage sales for practically nothing.

And so it is here.  I found the iGo "Green" AC power adapter at a garage sale, being sold by someone who had no idea what it was.  Ergo, I was able to buy it for one dollar.  (MSRP is $80.)  Of course, it was missing a power cord and had no instructions, but I have plenty of power cords and a computer power adapter isn't that hard to figure out.  (And I can get the instructions on-line at iGo's web site, if I really want them.)  And, more luck, it had the right adapter plug to fit my laptop!

So, what makes the iGo"Green" adapter such a cute gadget?  It's a whole new take on the standard laptop AC adapter, designed to save power.

A "normal" (as supplied by the manufacturer), laptop AC adapter is usually a standard switching power supply converting the normal AC "mains" voltage, (either 110 or 220 volts, depending on locality), to the DC charging voltage required by the laptop, and includes a plug guaranteed to fit.

"Da' Bitch Part", so to speak, is that these switching supplies can consume non-trivial amounts of power from the wall mains even when the laptop is fully charged.  (A good test of this is to touch the adapter and note how warm it is when your laptop has been turned off for a while.)  Likewise, the ever-fussy folks in California, as well as in the European Union, consider this "wasted" power a Scourge to Mankind.

The iGo "Green" adapter claims to eliminate much, if not all, of this wasted residual power by detecting the power consumed by the device it is supplying power to.  Theoretically, laptop power draw through it's charging port drops dramatically once the batteries are charged. So, by detecting the amount of power the laptop wants to consume - and by allowing the laptop to spend at least some of it's time on battery power - it claims to reduce wasteful standby power by up to 80%.

Well, I don't happen to have a laboratory-grade micro-wattmeter in my back-pocket, so I cannot give you my own measurements on the actual, real-world, "where the rubber meets the road" consumption, (or lack thereof), of this device when connected to my laptop.  What I can tell you is what I have observed while using the device.

The Good:
  • It is a "universal power" device and can be used on both 110 and 220 volt mains.  However since this is, essentially, universally true for device supplies in general, and computer power adapters in particular, this is not exactly the strongest selling point the device has to offer.
  • It checks the power demand of your device every fifteen minutes, and if it's not demanding power, the charger switches to its "Green mode", and stops supplying power to the device.
  • Once the charger notices that your device has an increased power demand, it switches back to full-power mode.
  • Theoretically, this will save bucket-loads of energy by reducing residual power waste.
The Bad:
  • The device will - if it decides that you don't need it running - turn itself completely off.  This can happen, (and has happened to me), when you turn your laptop off for the night.  Translation:  When you power up the laptop in the morning, you're running sans adapter, even though it is plugged in.
  • I have noticed that it, sometimes, does not exit its "Green mode" when it is supposed to, leaving the laptop running on its batteries.  This is especially obvious if the laptop is turned off, the adapter switches to "Green" mode, and then the laptop is turned back on again.  You can mitigate this by pressing the green "power" button on the device, but that assumes you're checking the device to see if it's running in full-power mode.
  • Likewise, the device does not return to it's last running state if power is interrupted and then restored.  If I turn off a power strip briefly to reset a network device connected to it, the iGo adapter remains off.  A standard adapter continues to supply power when mains power is restored.
  • On all of the more modern, (say within the last five to ten years), laptops I have purchased, the power adapter is as cool as a cucumber when the laptop is off.  Which, IMHO, takes much of the wind out of the iGo adapter's sails since that implies that the amount of wasted residual power is minimal.
The Ugly:
  • Depending on your laptop's power settings, suddenly entering "battery powered" mode may cause a significant drop in performance.  (Not to mention that your laptop screen may suddenly become unreadable when it switches to it's low-brightness mode.)  Note that this effect can be eliminated by changing your device's power-profile to a more piggy, (power-hungry), setting.  Which, IMHO, is counter-productive if you are trying to save power.
  • By making the power profile changes noted above, your laptop's battery life will likely go right into the toilet when not connected to the adapter.  That is unless you are thoughtful enough to re-switch your power profile back to a more power-friendly setting.
  • If unused for a period of time, it shuts itself entirely off.  Ergo, when you fire up that trusty 'ole laptop in the morning, you may suddenly discover your machine is NOT running on adapter power at all.  I have discovered this by turning on the laptop, expecting it to be on adapter power because the adapter is both plugged in - and plugged into the laptop - walk away from it for a bit, and come back to a hibernating computer.  That, in and of itself, is not entirely bad.  However, some software, (including some of Windows' own stuff), does not recover from hibernation gracefully.  (Translation:  Your machine may begin doing strange things, depending on what you're doing with it.)  I have learned not to trust hibernation - or standby - completely and it annoys me no end when a computer goes into hibernation when I don't expect it to.
  • This means you have to be much more vigilent about what power mode the adapter is in.  Am I in "Green" mode?  Am I in the normal full-power mode?  Has it shut itself off completely?
  • You also have to be much more aware of your computer's power profile settings and adjust them as necessary to avoid undesired behavior when in battery power.

The bottom line:

If you are willing to make the effort to be aware of, and regulate, both the adapter's and the computer's power settings, this can be a useful tool.

If you want to impress your friends with your "Ecological Awareness" with the newest Eco-Gadget, this is it.

If you want to keep your laptop set to sane and useful power settings, you can do a great job of eliminating wasted standby power just by turning off the power-strip the laptop is plugged into.  And you can do that for free.

What say ye?

Jim (J.R.)

Sunday, July 28, 2013

The Uncertainty Principle
(as it applies to QA)

In 1927 Dr. Werner Heisenberg first wrote of what has become known as his "Uncertainty Principle".  Though a thorough understanding of this principle involves boatloads of mathematics and quantum physics, it can be expressed, (in a very simplified form), like this:

It is not possible to know both where a particle is, and what the particle is doing at the same time.

This had profound implications for particle physics back in the 1920's when it was first stated, and it is still very much a part of atomic physics today.  In fact, there are certain properties of very interesting things - superconductors, for example - that cannot be expressed or discovered without using the Uncertainty Principle.

The idea for this article came while I was thinking about writing another article.  The thought path for that article lead me to "garage sales", and from there to Heisenberg's Uncertainty Principle.  How thinking about garage sales lead me to quantum physics is a whole 'nother story, but when I got thinking about it, it struck me as something very interesting to write about.

Now what the heck does Heisenberg and his Uncertainty Principle have to do with QA?  Plenty.

In QA, especially software QA, we often forget that the observer and the observed interact, and that interaction can lead to results that may not be true in real life.  A classic example of this is the "I haven't found any bugs, (yet), so it must be ready for release" concept found so often as a project deadline approaches.  In this case, the seeming lack of defects has given the "observer", (the software tester), a potentially unreasonable confidence in the "observed", (the software product), setting the stage for a possible disaster come release time.

What should be happening is for the tester to seriously examine how applicable the test methodology might be to the object being tested.  Are assumptions being made that may not really be valid in the real world?  Are we testing deeply enough?  Have we tested enough program paths to really have that level of confidence?

In a manual test scenario, there are a whole host of ways the observer and observed can interact, and I am sure you can think of ten or twenty yourself.

What about automated testing?

Automated testing is probably the best example of observer and observed interacting to their detriment that can be found in so-called "black box" testing.  And it's not just the automated test software interacting that's the problem.

Of course, when you introduce an automated test tool into the program's logic flow, you have altered that flow - even if only infinitesimally.  When you add up enough "infinitesimally's", you have a serious impact.

What about the speed of the test, or of the test's input?  Automated tests can insert themselves into the program's messaging queue, and supply user input via trapping that queue and inserting messages into it.  The result is that input is provided virtually instantly, something a normal user cannot do.  In the real world, you have a user supplying a phone number for example.  Instead of xxx-xxx-xxxx appearing instantly, maybe the user types in the area-code, (xxx), and then stops.  Oh!  I forgot!  Let me go look it up. . .  There may be a five or ten minute delay - or longer if he gets distracted by his wife wanting something done.  What happens then?  Is the test trapping output the same way? Natch'.  Video?  Video always works, right?  Via automated testing we have no way to tell if the program's output visuals are corrupted, off-center, or unreadable.

In this case the interaction between the observer and the observed is woefully incomplete, yet the fact that "Automated Testing" passed with a clear bill of health may also lend itself to a false sense of confidence.

The canonical example of the Uncertainty Principle is White Box testing - or even "Grey Box" testing, where the "observer" has to deliberately insert instrumentation code into the product, or a similar kind of invasive testing.  Oh, but valid QA requires a good "black-box" test after the white box testing is complete, right?  And if I had a nickle for every software product that was released based on the results of the White Box test. . .  Um, we probably shouldn't go there.

The bottom line is this:  Any QA test plan should account for the interaction between the observer and the object being observed.

What say ye?

Jim (J.R.)