Still Life

A Series of Mental Snapshots

Archive for September, 2008

IE Automation with Ruby: Catching pop-up Windows

Posted by Steve on September 29, 2008

Firstly I need to define what I mean my pop-up Windows. The pop-up windows that cause trouble are not internet explorer based windows, they are actually ‘Windows’ windows, (sorry if thats confusing). The ones that I am referring to are the ones that come up when, for example, you click on a download link. These are inherently a pain because of the fact that they are not IE windows. Luckily there is a pretty simple work around that i have come up with.

Ruby has access to the WIN32OLE library , which is basically like an API for windows applications. What you can do is use this library  to catch these pop up windows. Below is the code that you’ll need to run in a Ruby script:

require ‘win32ole’                                #Loads the win32ole library
wsh = WIN32OLE.new(Wscript.Shell) #For more info click here
wsh.AppActivate(‘Connect’)                #Focuses on a given application based on its Title

At this point you can manipulate the window, for example, with a SendKeys command:

wsh.SendKeys(“%{F4}”) #This would close the program with Alt-F4

This clearly has it’s limitations because during this time you cannot be doing things on your computer, because the AppActivate would fail. I am still looking for a lower level at which I can address this problem.

Now everyone likes to see code at work, so I have written a quick script that goes to the Notepad++ downloads page, clicks the download link, and then closes the pop-up download window. As a quick side note, if you do not already use notepad++ I highly recommend it!

require ‘win32ole’
require ‘watir’

wsh = WIN32OLE.new(‘Wscript.Shell’)

ie= Watir::IE.new
ie.goto(“http://notepad-plus.sourceforge.net/uk/site.htm”)
ie.frame(:name, “index”).link(:text, “Download”).click #Good example of how to execute a link in a Frame
ie.frame(:name, “index”).link(:text, “Download Notepad++ executable files”).click

sleep 20 #need to wait for source forge to load it is slow
ie1 = Watir::IE.attach(:title, /Source/)
ie1.link(:id, “showfiles_download_file_pkg0_1rel0_2”).click

wsh.AppActivate(“File Download – Security Warning”) #Focuses on the pop up window
wsh.SendKeys(“%{F4}”) #Sends the alt-F4 command to the window to close it

Watir::IE.close_all #Closes all open IE windows

So if you are interested try the script out, I did try it out myself to make sure it worked, but let me know if you have any difficulties!

–Steve

Advertisements

Posted in IE Automation/Watir/Ruby, Testing | Tagged: , , , , , , , , , , , | 3 Comments »

Lessons Learned in Leadership – You shouldn’t treat everyone the same

Posted by Steve on September 16, 2008

So I am on a ‘write about my leadership experiences’ kick lately! I have had these thougths/ideas floating around in my head for a while and its definitely due time for them to get written down.

This edition is based on the observation that you cannot treat every person you manage the same. For some reason I feel this to be counter intuitive, I think to myself that you would want to treat everyone the same, it is fair that way… right? Not so much.

The ‘issue’ is that everyone: works differently, has different goals, is motivated in different ways essentially everyone needs something else from a manager. I found that when I was first in the leadership role, I tended to treat my team as I would want to be treated by a leader, basically I would give general instructions, lay out my expectations, and then leave them to my own devices (it should be clear that I am not a proponent of micromanaging!). Now this leadership approach would work well with me, that does not mean it would work well with everyone, and I learned this through experience. One of my team members needed (and not necessarily in a bad way) a little more guidance and a little bit more micromanaging, so I had to modify my leadership style to accomodate for that. It was a very interesting revelation for me.

The main point of this post is to illustrate that everyone is different (this is extremely important to not only realize but really understand), and if you look at it that way, its not surprising that everyone needs something different from a leader. So here’s the question… are you a uniform leader or do you modify your style to better suit your various team members?

–Steve

Posted in leadership, People Problems, Work: General | Tagged: , , , , , , , , , | 2 Comments »

Lessons Learned in Leadership – A leaders vocabulary and opinions matter!

Posted by Steve on September 16, 2008

In my last position I was the team lead for a release cycle of a product at PlateSpin, Forge (a web based disaster recovery application). The experience was very interesting, challenging and often entertaining, in short it was an incredible experience. I learned quite a bit form it, and from the conversations I had about the postion with my mananger Adam White. What follows are just a few of the things that I have learned

Be Careful of Your Vocabulary
This comes from a conversation I had with Adam. Many times in meetings with my team members (who I was managing) I would say that we ‘should’ do something, for example I said that we ‘should’ do 3 sessions per day (session based testing is a method of testing, one which I am definitely a supporter of, for more info, look at anything James Bach has written). The issue here is my choice of words, I said ‘should’. This comes from my past experiences of interacting mainly with peers. In the peer situation, I would use the word should because we were equals and everything was up for discussion. When you are in a leadership position you must be authoritative in situations where you want things to happen. Continuing with my above example, instead of using the word ‘should’ I began to use the words ‘we will be…’ ‘we have to’, ‘we must’ and so on. Previously I never realized how important the vocabularly I used was

Be Careful of Your Opinions
How many times have you heard the phrase “I know it sucks to have to this, but we have to ok.”? I am guessing its at least once, and even if it is only once, it is too many times! Your attitude towards the things that you HAVE to do (even if you do not like doing them) is incredibly important. If you are negative towards these tasks, your team will pick up on that and they will therefore (in general) also have a negative opinion on these tasks therefore if you want people to do the things that are, at times, annoying to do, you have to have a positive opinion on them, at least on the outside!
So those are just two of the lessons I learned in leadership, there were obviously many more, and some of them I’ll be sharing!

–Steve

Posted in leadership, People Problems, Work: General | Tagged: , , , , , | Leave a Comment »

Why do doors with handles push in!?

Posted by Steve on September 14, 2008

Or more elegantly put, what a door with two handle affords (An affordance is a quality of an object, or an environment, that allows an individual to perform an action – Wikipedia).

This has to do with an annoyance I have had for quite a while and that is, why are there doors with handles on both sides? Think to yourself, how many doors have push/pull signs? In my opinion much too many considering if a simple design change was implemented they could be done away with and there would never be any question which way a door goes

Currently those doors that have handles on either side afford for a user to either push or pull. If all doors were designed such that one side had a handle on one side did not, it would be very simple because it would be known that the handle is the pull side, and the other is the push side!

Because of this poor design I have actually created my own heuristics to avoid embarrassingly walking into a door (and yes I definitely have walked into one of these doors). If I am uncertain whether it is push or pull, I’ll put my hand on the handle and push in slightly (it is only noticeable if you know what I am doing) and if the door does not budge, I proceed to pull it. I personally think it is a little ridiculous that I have had to come up with a best practice to open a door!

This may be a rather trivial example, but these type of affordance problems can be seen anywhere, whether physical or in software/the web. A (contrived) web example could be a text box that you cannot type in that has a white background. A white background usually indicates that the text box can be typed in, and if the user attempts to type in it and they cannot they will be surprised. Despite the contrived nature of the above the example, it was meant to get you thinking about the software that you use and design affords. It is important in design to always be aware of what a given design affords, if there is any question about what it affords, I can guarantee you that someone is having trouble using it.

So go ahead look around at any physical or software design and think about what it affords, you may be surprised at what you discover.

–Steve

Posted in Uncategorized | Tagged: , , , , , | 4 Comments »

Anatomy of a Bug Report — Presented via a MSOffice ‘Bug in the Wild’

Posted by Steve on September 13, 2008

The importance of a bug report is definitely understated; it is the difference between something getting fixed, and something getting filed away. I am going to present my version of a ‘good’ bug report through reporting a bug I found while I was MS Office 2007. First though I am going to outline the sections:

Title
The title is actually the most important part of the bug report, it is essential that it is possible to know what the whole problem is simply based on the title. If you cannot express what the bug is completely in the title, you have to think more about before reporting it.

Preconditions
Pretty straight forward, put what needs to be setup before the bug occurs, it can also include what machine configuration you used (if its meaningful)

Steps To Reproduce
Another straight forward area of the bug report. what you want to aim for here is that someone who knows nothing about the bug and possibly very little about the product can reproduce it. There preferrably should be no questions about how to hit the problem again (I do realize this is problematic with the bugs that appear to happen ‘randomly’)

Bug Details
The important things to include here are what the problem is (as you see it) and what you think should be happening. If you do not but a suggestion or desired outcome, the bug is not nearly as useful.

Frequency
This is a field that does not always apply, it generally is important with bugs that have to do with scalability and ones that seem to happen intermittently.

The Bug Report:

Title: Having the ‘Create Source’ window open results in any other open window becoming unusable

Preconditions:

  • Two instances of MS Office Open

Steps to Reproduce

  • In the first MS office window click the references tab
  • In the toolbar click ‘Insert Citation’
  • In the drop down list click ‘New Source’, the create source window will open
  • Click the mouse onto the second Office window

Bug Details

  • At this point nothing can be done in the second open window, you cannot click, or manipulate the window in any way.
  • Desired Outcome: The second MS Office window should not be affected by the Create Source window in any fashion
  • Note: A further issue is that a new Office window does cannot be opened (for example from the start window)

Frequency

  • Anytime the Create Source window is open

So there you have the bug report, if I had access to the proper software I would also have made and attached a video of the problem, video is a great bug reporting tool, one that I suggest is BB TestAssistant .

Let me know what you thought of my bug report! Does it match how you file bugs?

–Steve

Posted in Bugs in the wild, Testing | Tagged: , , , , , , , | Leave a Comment »

Web Usabilities Achilles Heel – The Back Button

Posted by Steve on September 12, 2008

Since the introduction of a lot of new web technologies including, (but of course not limited to) PHP and Javascript etc… the back button has never been the same. It used to be that when one pressed the back button it was expected, neh, certain that you would see the previous page that you were on; unfortunately this is no longer true! There are hoardes of issues that revovle around the back button, to follow is one example that I find terribly annoying.

Bestbuy.ca and Futureshop.ca Search
Like all web stores, best buy has a search option (and like most stores its pretty bad!). You arrive at the sight, and say you are looking to pick up an xbox 360, go ahead an enter that to the search bar. You come up with 368 hits, and you see a tree view:

Bestbuy Tree View

Bestbuy Tree View

You can then navigate down to the tree to finally find hardware:

Narrowed down selection

Narrowed down selection

Lets say you select the Pro Console, it takes you to the items page, and you see that it is sold out! So you press the back button to look at another console. This should take you back to the narrowed down selection… right? Not so much. It takes you back to the original search view, so you have to navigate through the tree again… GAH!

Have you had any interesting adventures with your back button, anything ever happen that you didnt expect? I may be adding to this myself the next time something strange happens!

–Steve

Posted in Testing | Tagged: , , , , , , , | 2 Comments »

Demystifying What We Learn From Our Mistakes

Posted by Steve on September 11, 2008

I am sure everyone has heard the saying ‘You learn more from your mistakes than you do from your successess’ at some point in time in their lives and because it is so commonly said, I accepted it as a fact for the longest time, until quite recently. The phrase came up when I was at an info session for a company looking to hire full time new grads. The presenter was saying how the company did not mind if you made some mistakes, because of course you learn more from your mistakes than your successes, right? In my opinion this is not so, I think you just learn different things from your mistakes than successes and I will try to illustrate that with a few examples.

The Soccer Example
In this example, we will consider the success, scoring a goal, and the failure, not scoring a goal. When you score the goal, you have learned something very important, if I make a shot similar to this in the future, it is likely that it will go in. From the failure, not scoring, you learn what shots are not effective. In this situation I would argue the success is more meaningful, as I think that there are close to an infinite number of ways you can not score, and a finite number of ways that you can.

A Past Success
One of my past successes is that I was admitted into Systems Design Engineering at the University of Waterloo; it is considered to be one of the more difficult programs to get admitted to at UW. This success came from working hard in school, and always looking ahead to what I needed to do to get admitted into the program, it was my number one priority. From the success I learned that if I hold something as very high priority and work towards achieving it, I can.

A Past Failure
One of my past failures would be the grades I received in one of my past school terms; they were much lower than my expectations, and I was very disappointed with what had occurred. It was very clear what caused this failure, my priorities were out of sync, and I put a difficult relationship as my top priority. From this I learned that it is important to step back and reassess priorities if things are not going well, and that more reflection is a helpful thing.

From the failure and the success I feel as though I have learned about an equal amount, just in a different manner. In both cases I look back and say how did I get to the end result, and for the success, I want to repeat those steps, and the failure I want to modify them. One reason I might see people thinking they learn more from failures is because people focus on them more than successes. If as much time was spent thinking about how you were succesful, I feel that you would get even more out of them than the failures.

So give it try, reflect equally on a failure and success, and try to assess which one teaches you more.

–Steve

Posted in Personal | Tagged: , , , , , | Leave a Comment »

Book Review and Thoughts: The 360 Degree Leader

Posted by Steve on September 9, 2008

This last week I just finished reading a book on leadership: The 360 Degree Leader by John Maxwell. The book is aimed at people who feel stuck or trapped in middle managment. It discusses some of the common problems of being a middle manager as well as an interesting concept of the 360 degree leader, someone who not only leads their follows, but also their peers and superiors. It is roughly a 300 page book, with not too many things that I disagreed with, that’s a decent accomplishment on its own. There were also many things that really resonded with me, I will just discuss some of the ones that I felt were really important.

Leading Up: Be a Go To Player
The go to player is the one that the boss goes to in crunch time, whenever there is something very important or when there is a crisis, it is where you want to be. I have always felt this to be an important relationship to have with your boss as you get the most opportunities, the most freedom and are relied on the most therefore you are the one to achieve your goals if you are trying to move forward as you are able to show what you can do.

Leading Down: A Good leader seems like they are not even there
This something that I have definitely noticed before but never really been able to articulate properly, but this definitely hits the nail on the head. A good manager/leader should have his team in a position so that he can go away for a week or preferably more, and see no impact on the team. Furthermore I feel like a good leader/manager should also always be looking ahead, therefore they are seeing (and possibly solving) potential troublesome problems/road blocks even before their team members even hit them. Now this isnt to say that a good leader doesn’t do work, as you’ll see in the next point.

Leading Down: A good leader leads by example
This is something that I have come to learn some what recently based on personal experience. I have to go back a bit first though to illustrate why it took me so long to figure this one out! As a follower, I like to try to please the leader, in certain situations there are things that I find tedious and do not like doing them, but I’ll do them because I know that it will make my leader happy. On the same vein, the amount of time my leader spends in the office has very little impact on how much time I spend in the office.  But as I learned from when I was in a leader position, this is not always the case. Followers, are called followers for a reason, they often follow by example. If you have a negative opinion on a certain practice, for example sending out a daily update, they will likely have the same negative view. Despite what you may think, they will be watching you, and watching you more closely then you may think, therefore you MUST lead by example.

Those are just some of the tid bits that I picked up from the book, it was defintiely a worth while read, so if you have an empty reading schedule or an opening coming up soon, I would suggest picking up a copy.

–Steve

Posted in Books, leadership | Tagged: , , , , , , , | 4 Comments »