It Happened on June 72nd

File this one in the “who the hell would’ve ever thought this was the correct behavior?” category…

Our dev team is moving into the bootstrap world, which means that we’re again learning how to manage date fields and date pickers.

Being the good tester that I am, I tried entering February 29, 2014 as test data. And the date field automatically changed to March 1st, 2014. Hm.

February 30th led to the date field changing to March 2nd. Well this is peculiar. It seems less-than-ideal that it would change the date without informing the user.

Let’s give it a really wacky date. What happens when I input 06/72/2014?

It changes it to 8/11/2014. Because, you know, August 11th is the proper way of representing June 72nd. We can count any number of arbitrary days from the beginning of a month.

WTF?

Advertisements

Installing Ruby + Watir on Windows 7: Quick Start

I recently had the experience of installing Ruby and Watir on a Windows 7 machine and found it a bit, um, less than straightforward. Here’s a recap of the steps such that in the future I can figure out how to do it again.

First: Ruby and DevKit Installers

  1. Let’s get Ruby. The best way to do this on Windows is to use the aptly-named RubyInstaller. Go to the RubyInstaller download page and grab the latest version of Ruby from the RubyInstallers section. Be sure to grab the x64 version if you’re running on a 64 bit system.
  2. Run the installer, which is pretty straightforward and will want to install Ruby to the root of your C: drive, in my case C:\Ruby200-x64
  3. In addition to Ruby, we’re going to need a set of development tools called the DevKit. You can install this from the RubyInstaller download page – it’s in the Development Kit section. Be sure to grab the appropriate version for your version of Ruby and platform. I can neither confirm nor deny that I initially installed the wrong version and burned several hours before I realized the underlying root cause (PEBKAC[1]).
  4. The DevKit installer is a bit less refined than most. You’ll want to save it to the folder where you want the tools installed, which is usually C:\DevKit. Run the installer which really just expands everything into the current folder.

Next: DevKit Configuration

  1. Drop to a command prompt, change to your DevKit directory, and run:

    C:\DevKit>ruby dk.rb init
    [INFO] found RubyInstaller v2.0.0 at C:/Ruby200-x64

    Initialization complete! Please review and modify the auto-generated ‘config.yml’ file to ensure it contains the root directories to all of the installed Rubies you want enhanced by the DevKit

  2. Finish the DevKit setup:

    C:\DevKit>ruby dk.rb install
    [INFO] Installing C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/defaults/operating_system.rb
    [INFO] Installing C:/Ruby200/lib/ruby/site_ruby/devkit.rb

And Then Watir

There’s some lightweight Watir documentation available, and substantial Watir documentation is, for better or worse, in a PDF ebook which can be downloaded here. It’s offered on a “pay what you want” basis, with $0.00 being a valid option.

The basic Watir install is pretty simple:

  1. Drop to your command prompt and run:

    C:\DevKit>gem install watir

  2. There is no Step 2

You should now have a Ruby/Watir setup on Windows 7.


  1. Problem exists between keyboard and chair  ↩

Have the Data: Log Your Work

Sometimes I have fantasies about working in an environment where I’m testing a single product and can really go heads-down into something, uninterrupted, for hours or days on end.

But that’s just my fantasy world and doesn’t reflect anywhere I’ve worked. A couple months ago I realized that I had a gut feeling about two things:

  • I was working on a lot of projects / tasks
  • Task-switching was killing my productivity

Being of the mindset that it’s wise to make decisions and changes based on data rather than gut feelings, I started logging my work.

Format Doesn’t Matter: Just Do It

Don’t get hung up about the “right” way to keep a log of your work. Pick something that’s going to work for you. Maybe that’s a notepad where you jot down your tasks/projects as the day progresses. Maybe it’s a text file in your favorite text editor. In my case, I setup a quick WordPress.com blog using the P2 theme which is pretty minimal and allows me to enter one-liners with each task that I’m working on. Those notes are timestamped and I can easily add tags for later sorting.

The Data is Fascinating

Turns out the problem wasn’t all in my head. On one particularly egregious Tuesday, I was interrupted and asked to task-switch to a different project 6 times before 9:15am.

Update: a couple hours after I published this, Crowd Favorite released Capsule which is worth a look.