Rspec and Generators
A fantastic tip posted by Catherine Powell on Rspec and Generators a couple days ago:
When working in Rails, I use the generators as easy ways to create models with migrations, and whatnot. I got used to running my generators with "--rspec" since that's the test framework I'm using currently.

I can save myself some time by adding this to my application.rb:

[sourcecode language="rails"]
config.generators do |g|
g.test_framework :rspec
end
[/sourcecode]
Be aware of Bounded Awareness
As it often happens, one idea leads to another...

I was reading about prioritization and decision-making heuristics on Lee Merkhofer Consulting web-site, and this article triggered my interest to find more detailed source about Bounded Awareness. So I found article by Dolly Chugh and Max Bazerman in Rotman magazine (here is the link to PDF, see at page 23).

Here's how it begins.
"Economists and psychologists rely on widely-divergent assumptions about human behaviour in constructing their theories. Economists tend to assume that people are fully rational, while psychologists – particularly behavioural decision researchers – identify the systematic ways in which people depart from rationality. [...] In this article, we propose that awareness can also be bounded, and that this occurs when people fail to see, seek, use or share highly relevant, easily-accessible and readily perceivable information during the decision making process."

Perfectly applies in software development and testing, don't you think?

The authors cover with examples 3 common types of Bounded Awareness.

Inattentional Blindness


"..Information sits visible and available in the visual field, yet escapes awareness when competing with a task requiring
other attentional resources.
This phenomenon, known as ‘inattentional blindness,’ has become an important area of study for cognitive and perceptual psychologists. Its consequences extend to real, life-and-death activities. For example, an airplane pilot who is attending to his controls could overlook the presence of another plane on his runway. Similarly, cell phones can divert drivers’ attention, making inattentional blindness a likely contributor to car accidents." 

Change Blindness


"Change-detection researcher Daniel Simons of Carnegie-Mellon University has demonstrated that people fail to notice changes in the information that is visually available to them. Interestingly, they often cannot describe the change that has taken place, but do demonstrate traces of memory of what they saw before the change.

[...]

The possible influence of change blindness in decision making is evident in a study by Petter Johansson and his colleagues, in which participants were asked to choose the more attractive of two faces displayed on a computer screen. As participants moved thecursor to indicate their choice, a flash on the screen distracted them, and the two pictures were reversed. Nonetheless, most subjects continued to move their cursor in the same direction, selecting the picture they originally viewed as the more attractive.
Importantly, they failed to notice the switch and provided reasons to support their unintended decision."

Focalism and the Focusing Illusion


"'Focalism’ is the common tendency to focus too much on a particular event (the ‘focal event’) and too little on other events that are likely to occur concurrently. Timothy Wilson and Daniel Gilbert of the University of Virginia found that individuals overestimate the degree to which their future thoughts will be occupied by the focal event, as well as the duration of their emotional response to the event.

[..]

Using similar logic, David Schkade of UC San Diego and Nobel Laureate Daniel Kahneman of Princeton defined the
‘focusing illusion’ as the human tendency to make judgments based on attention to only a subset of available information, to overweight that information, and to underweight unattended information.

[..]

The implications of focalism are not limited to laboratory studies. The Challenger space shuttle tragedy, for example, can be better understood through this lens. On January 28, 1986, the Challenger was launched at the lowest temperature in its history, leading to a failure of the ‘O-rings’ and an explosion that killed all seven astronauts aboard. Before the launch, the decision makers at NASA examined seven prior launches in which some sort of O-ring failure occurred. No clear pattern between O-rings and temperature emerged from this data, and the launch continued as
scheduled. Critically, the decision makers failed to consider 17 previous launches in which no O-ring failure occurred. A logistic regression of all 24 launches would have led to an unambiguous conclusion: the Challenger had more than a 99 per cent chance of malfunction."

 

The examples in the article are taken from economics, management, and psychological tests.

I prompt you to share examples from your job in software testing. You can provide them here, in comments, or link to your blog post.
Total Validator
TotalValidator
Total Validator provides the following main features:

  • A parser that validates the basic construction of your pages

  • True HTML validation against the W3C Markup Specifications or ISO/IEC definition using the published DTDs and standards: (2.0, 3.2, 4.0, 4.01, 5, ISO/IEC, XHTML 1.0, 1.1 and 5, XHTML Basic 1.0, 1.1, (X)HTML+RDFa, XHTML-Print)

  • An accessibility validator that validates against the W3C Web Accessibility Guidelines (1.0 and 2.0) and US Section 508 Standard

  • A broken links validator that checks each page for broken links

  • A spelling validator that spell checks the content of your pages (English, French, Italian, Spanish, German)

  • Snapshots (screenshots) of your pages in different browsers, on different platforms, at different resolutions

  • A desktop tool so you can validate pages before you publish, and pages behind firewalls



Here are results generated after our home page validation.

TV-report
Bookmark Current Tab Set
I've been using the Bookmark Current Tab Set Firefox add-on the last few days to help me organize different projects/clients.  For each project, I have:

  • a Google doc for my personal time tracking

  • a web tool for client-facing time tracking

  • a tab for JIRA, Redmine, or some other project/defect management tool

  • a tab for whatever product(s) I'm working on (if applicable)


I've also created one for all my blogs, Google Reader, and my Twitter account. That's handy as well for when I feel the need to do some socializing.

When I need to switch gears, all I need to do is close the current browser, open a new one and click on the bookmark set. Then I'm ready to go!
Don't blame VBScript
VBScript is a very popular automation language. Microsoft VBScript Engine, which is available for free, is one of the reasons, another - on the surface VBScript is extremely simple. But I admit that switching to VBScript from C was hard at times. It required unlearning approach.

And yet VBScript is powerful enough so that a seasoned programmer used to Object-Oriented paradigm can use the same approach with a little bit of creativity.

Class Constructor


Each VBScript class has a constructor which is automatically called when a new object instance is created.

[sourcecode language="vb"]

Private Sub Class_Initialize()
' put your custom initialization code

  End Sub

[/sourcecode]

Class Destructor


Each VBScript class has also a destructor which is automatically called when life span of the object comes to an end.

[sourcecode language="vb"]

Private Sub Class_Terminate()
' put your custom initialization code

  End Sub

[/sourcecode]

Virtual Properties


Special methods Property Get, Property Let, and Property Set allow using object properties that do not actually exist.

[sourcecode language="vb" highlight="39, 43"]

Class Point2D
  '' Properties
 
  Private p_X
  Private p_Y
  '----------------------
 
  '' Methods
  'Constructor - called automatically
  Private Sub Class_Initialize()
    X = 0
    Y = 0
  End Sub
  '----------------------
  'Destructor - called automatically
  Private Sub Class_Terminate()
  End Sub
  '----------------------
  'A pair of methods to access private property X
  Property Get X
    X = p_X
  End Property

  Property Let X(ByVal in_X)
    p_X = in_X
  End Property
  '----------------------
  'A pair of methods to access private property Y
  Property Get Y
    Y = p_Y
  End Property

  Property Let Y(ByVal in_Y)
    p_Y = in_Y
  End Property
  '----------------------
  'A pair of methods to access virtual properties:
  'Point's Polar coordinates
  Property Get Polar_R
    Polar_R = Sqr(p_X*p_X + p_Y*p_Y)
  End Property

  Property Get Polar_Phi
    Polar_Phi = Atn(p_Y/p_X)
  End Property
  '----------------------
End Class

[/sourcecode]

Inheritance through Delegation


VBScript does not allow declaring a class through derivation. However, a programmer can declare a property (or multiple properties) and initialize it (them) with reference(s) of ancestor object(s). That will give the desired access to the properties and methods of ancestor objects.

[sourcecode language="vb" highlight="22, 26, 31, 35"]

Class ScreenPoint
  '' Properties
 
  'Ancestor Point2D
  Private P2D
  'Point color
  Private Color
  '----------------------
 
  '' Methods
  'Constructor - called automatically
  Private Sub Class_Initialize()
    Set P2D = new Point2D
  End Sub
  '----------------------
  'Destructor - called automatically
  Private Sub Class_Terminate()
    Set P2D = Nothing
  End Sub
  '----------------------
  'A pair of methods to access private property X
  Property Get X
    X = P2D.X
  End Property

  Property Let X(ByVal in_X)
    P2D.X = in_X
  End Property
  '----------------------
  'A pair of methods to access private property Y
  Property Get Y
    Y = P2D.Y
  End Property

  Property Let Y(ByVal in_Y)
    P2D.Y = in_Y
  End Property
  '----------------------
End Class

[/sourcecode]

Dynamic Code and Callbacks


To demonstrate this feature, I first prompt you to read about Eval function and ExecuteGlobal statement in VBScript.

[sourcecode language="vb" highlight="17"]

Public Function CTZ()
  sGlobalValue = "ExecuteGlobal successful"
End Function

Public sGlobalValue

Public Function TestExecuteGlobal()
  Dim sCallName, sLocalValue
Dim intRC, boolRC   

  sGlobalValue = "Testing ExecuteGlobal"
 
  sCallName = "CTZ()"
 
 boolRC = True
 On Error Resume Next
  ExecuteGlobal sCallName
  intRC = Err.Number
 On Error GoTo 0
 If intRC <> 0 Then boolRC = False
 
  If Not boolRC Then
    sGlobalValue = "ExecuteGlobal failed"
  End If
 
  MessageBox(sGlobalValue)

End Function

[/sourcecode]

Thus, you can add functions and any definitions (including class definitions) dynamically, during run-time - which allows referring undefined methods and objects!

There are also other magic tricks, as overloading and access to external class libraries. Hopefully this post has been a useful introduction to ignite your interest to automation tricks with VBScript.