Musings of an aging computer nerd hitting 0x32
Github
Finally got round to uploading some of my stuff to the GitHub site.
If you want a laugh have a look at my code alastairhm@github ;)
Doodle’s Geek Monkey by Alastair Montgomery
US Army Jeep Detail
Note: 5 of this post’s 6 links are now broken — mostly deleted or made-private Flickr photos, dead Flickr
farmNsubdomains, and defunct feed-syndication infrastructure. Left as originally published.
Via Flickr:
US Army Jeep detail, taken at the Wath Street Fair 2011
Available as a post card.
Studley Royal, Near Ripon
Note: 12 of this post’s 22 links are now broken — mostly deleted or made-private Flickr photos, dead Flickr
farmNsubdomains, and defunct feed-syndication infrastructure. Left as originally published.
A few photographs from a recent dog walk round Studley Royal near Ripon.








Google Plus
Need to figure out if you can get a RSS feed of the items you've +'ed?

Doodle's Geek Monkey by Alastair Montgomery
WATIR makes a tester's life easier.
For example finding all the links in a table based on their text starting with a string.
stub = "0 Text"
browser.table(:id,"myTable").links(:text,/#{stub}/).each { |link| puts link.text }
This will return all the links in the table "myTable" with text starting with "0 Text"
Doodle's Geek Monkey by Alastair Montgomery
Getting in close
Note: 6 of this post’s 12 links are now broken — mostly deleted or made-private Flickr photos, dead Flickr
farmNsubdomains, and defunct feed-syndication infrastructure. Left as originally published.
Some result of playing with my +4 macro filter.
Jelly Babies

Fruit and Nuts

Orange Lily Macro

Setting browser size and position with watir-webdriver
From asking the question at StackOverFlow.com you can do this with the following commands;
browser = Watir::Browser.new(:firefox)
browser.execute_script('window.resizeTo(800,600)')
browser.execute_script('window.moveTo(0,0)')
Android Argus
Note: 1 of this post’s 3 links are now broken — mostly dead 2008–2013 feed-syndication infrastructure (FeedBurner, Gawker, AOL’s old blog network, Pheedo, Yahoo Pipes). Left as originally published.
Log 2
Note: 1 of this post’s 3 links is now broken — mostly deleted or made-private Flickr photos, dead Flickr
farmNsubdomains, and defunct feed-syndication infrastructure. Left as originally published.

Log 2
Originally uploaded by Alastair Montgomery
Via Flickr:
Close up of a log seen during walking the dog in Ripon.
Converting scripts from Watir to Webdriver, Table size
myTable.row_count
myTable.column_countmyTable.rows.lengthmyCols = myTable.strings[0].lengthmyCols = myTable.row.cells.lengthclass Watir::Tabledef row_countreturn self.rows.lengthenddef column_countreturn self.row.cells.lengthendend
The unit tests now run unaltered.
If your table has a uniform number of columns for each row then you could check the whole table by doing something like.
myTable.rows.each { |myRow|myCols = myRow.cells.lengthassert_equal(validColumnCount,myCols,"Column count mismatch")}
Doodle's Geek Monkey by Alastair Montgomery

