Thursday, November 1, 2012

Does it work vs Can it break? QA definitions.

I sense more than a bit of disrespect for the common saying that QA is dead or dying.  In all honestly, quality is a continuum, and no marketable software product I know of is completely absent of some level of testing or quality effort, nor completely absent of defects.  Still, it's worth bearing in mind that quality is hard, and most people don't produce software with relatively high degrees of quality.  I think most people don't understand quality, because the word itself encompasses many things to many people, at different times and different ways.  Grasping the landscape of "qualities" and "value" is not a task for the feeble-minded (though I don't claim that good testers aren't sometimes feeble, nor that feeble testers are never good).

So, I like this quote:
"'Beware of the above code. I have only tested that it works. I haven't actually tried it.'" (Unit Tests Don't Find Bugs: the Death of QA)

Thursday, July 26, 2012

Better combo box dropdowns

I thought this was a rather cool addon for web pages.  It improves combo boxes without any server-side changes needed.
http://harvesthq.github.com/chosen/


Wednesday, May 30, 2012

Comprehensive Unit Tests

Someone at work sent this article to me.  It makes a lot of sense, so I'm recommending it here.
http://www.infoq.com/articles/Comprehensive-Unit-Test

And of course, I can't resist the urge to add my own two cents.
  • A good mock object library can make your life a ton easier.  Make sure to take time to look around at what options are out there.
  • Always make it clear what question the unit test is asking.  If I can't tell when a test is no longer applicable from its name or some introductory text, then it's got a problem.

Wednesday, May 2, 2012

Test Heurstic: Action Avoidance

In a previous blog post, I wrote about a test heuristic I dubbed the "taboo heuristic".  I've come up with a more generalized, or parallel, heuristic.  I call this "action avoidance/alternatives".   Really, it could be fit into the taboo paradigm.

Experience trigger: I was using my new LG Tone Bluetooth headset with my HTC Incredible 2 (android phone).  I got a phone call, and decided not to answer (I was deep in thought at the time).  I didn't press any buttons on the headset or phone--I was just going to let it go to voice mail.  A couple minutes later, I decided to place a call.   My phone had frozen.  The "incoming call" screen was still showing, asking me to slide up or down to pass/accept the call.  I could still see a photo of the caller, and their number.  I couldn't get my phone to respond. I finally tried to power off my phone.  A few moments later the Android OS told me the dialer wasn't responding, and asked to force kill it.  My phone rebooted (and took its merry time to do so).

Analysis: I suspect that other events helped expose the bug.  I haven't tried to reproduce it yet.

Generalization:  This fits with the taboo heuristic I came up with a while back, but may also involve state pollution as described in James Bach's rapid software testing course slides.

Lesson Learned: often times, we can focus so much on making good actions and wrong actions that we forget about the possibilities of inaction: what will the application do if we don't respond?  Or if we try to back out, or even kill the application or connection?  Or if we take a completely different action?  Or try to accomplish the same action in an unusual or unconventional way?

The whole point of the taboo heuristic was to find another way to accomplish a given task or expose a feature, or to think about a problem or test in a different way by precluding the normal set of actions so we must look for an alternative.  The action avoidance heuristic is aimed at avoiding, cancelling, or side-stepping the actions presented to us--or taking no action at all.  We let things time out.  Or, we try to work around a supposedly "required" action.

I am not sure if this is actually different than the taboo heuristic, or just another way of looking at it.

Friday, March 16, 2012

Writing exception messages.

I recently changed an exception message from this:
throw new IllegalStateException("It appears the init() function has not been called.");
To this:
throw new IllegalStateException("private member object 'thingamagjig' is null. Has the init(T thingamajig) function been called?");

This is because I realized that there's a variety of reasons that the 'thingamajig' might be null, aside from the init() function not having been called to initialize thingamajig.  It was more important to communicate the actual diagnosed problem and to clearly communicate the possible cause of it, than to jump right to the conclusion that init() hasn't been called.   The question is a good rhetorical cue that "maybe you should look here first" without saying "this is the cause, dummy" and perhaps being the dummy instead.

Monday, March 12, 2012

Migraine themes

I occasionally get migraines - mild enough to be livable, but harsh enough to make looking at my screen difficult.  Here are a couple things I did to improve looking at my screen.

Because this was so difficult, I think it might be worthwhile to set up an alternate login/account, or even just work from home with such an account if it's hard to get it set up at work.

Edit/Update: I've since learned you can significantly reduce the effort to invert colors by using the magnifier in Windows 7+, or inverting colors in Linux using a compiz fusion plugin that allows it.
  1. Windows 7 Theme: Adapted the High Contrast Black theme to a "Muted gray and black Migraine" theme.  Here's a link to it.
  2. Google Chrome: installed an addon called Change Colors, and activated it on all sites; 
    1. I set the colors to 
      • Background: 2E2E2E
      • Text Color: D4D4D4
      • Links color: 3283ED
      • Visited Links: 9B51DB
    • For some sites, I had to click on the addon's icon and disable it for the page or domain.
    • I also installed a theme for chrome.  Things like this one.
  3. Internet Explorer: Tools > Internet Options > General (tab) / Appearance (bottom panel) :
    1. / Accessibility (button) > Ignore colors specified on web pages
    2. / Colors (button) > adjust colors in the same ways as I did with Google Chrome.
      1. OR just check the box to use windows colors.
    3. Note, this also seems to have affected Firefox
    4. Note, these settings affected a LOT of other programs, that apparently key off of Internet Explorer.  The most notable one was Grindstone.   So don't discard these settings--they help even if you don't use IE much.
  4. Firefox
    1. Installed a plugin called "Blank Your Monitor: Easy Reading".  It worked moderately well.  I think made some mistakes with this plugin: mostly that I also configured firefox's default colors.
    2. Also, I updated the default web page colors for firefox:
      1. Tools > Options (or "firefox" menu > options)
        1. Go to the content tab (tabs listed along the top)
        2. Look at the fonts&colors panel (a heading halfway down)
        3. Click on the "Colors" button
        4. Customize the colors similarly to Internet Explorer OR click "use system colors" to use the Windows 7 theme.
    3. Install a dark-themed persona, like "dark fox"
  5. IntelliJ IDEA:
    1. I spent a bunch of time working on a color theme.
      1. It was saved in C:\Users\{my username}\.IntelliJIdea10\config\colors
      2. You can download my color scheme here.
    2. Note that IntelliJ also uses the Windows theme for many colors, and IntelliJ itself has some bugs and issues with its color scheming.  It'll never be perfect, but it can be better.   It was because of IntelliJ that I couldn't go with a straight black Windows 7 theme background.
  6. Microsoft Office Ribbon
    1. In Outlook, I went to File > Options > General > User Interface Options > Color Scheme: Black.
  7. Pidgin (my chat client)
    1. Followed the Windows color scheme.  Some buddies have clients that always set their font color to black.  I asked them to use a gray text, but I think I could have set an option to ignore formatting from buddies.
    2. If buddies use annoying formatting, you could just do Tools > Preferences > Conversations > Uncheck the box labeled "show formatting for incoming messages"
  8. Google's apps
    1. It appears gmail has a dark colored theme, but despite every effort I could take, when I compose or read messages I can't view them on a dark background.  I would suggest setting up an alternate email client to connect to gmail's POP or IMAP interface.
    2. It sometimes helps to use a "Darken" bookmarklet I found, but it often isn't very discriminating--so I don't even provide the link.

Now that I'm feeling better, I want a mid-gray color scheme.  I still don't want white backgrounds, but I'd like something that isn't glaring white backgrounds either.   As a solution, I tried these two themes:


I also wore a hat and sunglasses, inside, so I could stand to look at my computer screen.  I do NOT recommend polarized (wal-mart) sunglasses for computer screens--simple shades should work.  The hat helps fend off overhead florescent lighting and the shades just darken everything up a bit.

Some other tips I picked up in various places online, that I'd like to try next time:
  • Get a monitor with a higher refresh rate (not 60 Hz)
  • Don't work under florescent lights, especially at 60 Hz.
  • Make sure your screen and things around it are about the same brightness.

Wednesday, February 15, 2012

Unicode handling and security

http://www.haypocalc.com/tmp/unicode-2011-03-25/html/issues.html

Lessons Learned in Software Refactoring

A couple quick lessons I learned while refactoring: (these are also useful ideas for how testers might model bug appearances or doubt representativeness of one or several results, overcoming representativeness bias).

  • Ask "where else?"
    • Search for the affected function names
    • Loop back to the top of the file
    • Take a moment to slow down and ask if there are other changes
    • Is this statement or construct unique or does it occur elsewhere?
  • When adding something in a lot of places, wrap around until you come back to a starting point.
    • Don't just go to the end of file.
  • Ask how this refactor, even if small, might affect the quality criteria (see CRUSSPIC STMPL)