Tuesday, October 23, 2007

Watir Tip

I ran into a problem using Watir - it could not find a frame that is really on the page. I got this error:

c:/opt/ruby/lib/ruby/gems/1.8/gems/watir-1.5.2/./watir.rb:2664:in `locate':
Unable to locate a frame with name frmeLHS (Watir::Exception::UnknownFrame Exception)

Oddly enough the problem was with my Internet Explorer security settings. Adding the domain to my "trusted sites" ("Tools/Internet Options.../Security/Trusted sites/Sites.../Add") did the trick.

Tuesday, October 16, 2007

Cheap Memories of Goodwill

staffTo upgrade my daughter's ancient Dell to Ubuntu I wanted add to its 128 Meg memory with some SDRAM PC100 256Meg chips. I bought some at a local geek store for $40, but I've since learned our local Austin Goodwill Computer center at 1015 Norwood Park Blvd (637-7501) sells the same thing for $13.99 and it's for a good cause. Zac and Bridgette can help you find cheap gently used hard disks, memory, cables and other computer paraphernalia instead of sending these parts to the landfill.

Remember what Wally says, "reuse is better than recycling".

Monday, October 15, 2007

Microsoft Immunotherapy

I prefer solaris and linux, but like many working stiffs I do Microsoft to pay the bills. Sometimes I get frustrated by the pitiful quality of their tools, glacier-time scale for new releases, and overweening arrogance. This gives me a bad attitude about the convicted monopolist that crushes innovation at every turn. So I've got a new strategy to improve my feelings toward the company - Microsoft Immunotherapy.
Just like with allergy shots that give you a little bit of the things you are allergic to in a shot, I try to give myself just a wee bit of Microsoft branding in small doses everyday. Here you see my Microsoft-branded mug and notepad. I'll let you know if it improves my disposition to the bloated, standards-averse company.

Friday, October 12, 2007

Batch Scripting ftp in windows xp

I'm a luddite. For the past decade to move files to my hosted computer I've used manual ftp command lines or mounting a directory in network places and dragging the files over to the website. Tonight I broke down, took 10 minutes to research on the web, and now can batch ftp the files with a button. No more dragging directories of files from one pane to another. And its quite easy. My script file, ftp.scr:

open mydomain.com

user myuserid
cd www
cd news
cd 2007
lcd c:\home\mfincher\images\new
mput *.JPG
lcd originals
cd originals
mput *.JPG

The directions at microsoft's site don't quite work with dreamhost. The secret is to let the ftp session error out on the username/password and then reenter them in the script.
To run the script: ftp -s:ftp.scr

Monday, October 08, 2007

Watir Is Insanely Great

I just started using Watir to do GUI testing of web apps and am blown-away. Watir is so easy to use. I wrote my first script from the examples. It opens google image search and shows pictures of kittens.

require "watir"
ie = Watir::IE.new #create an object to drive the browser
ie.goto "http://www.google.com/"
ie.url == "http://www.google.com/"
ie.link(:text, "Images").flash #flash the item text "Images"
ie.link(:text, "Images").click #click on the link to the images search page
ie.text.include? "The most comprehensive image search on the web" #test to make sure it worked
searchTerm = "kittens" #set a variable to hold our search term
ie.text_field(:name, "q").set(searchTerm) # q is the name of the search field
ie.button(:name, "btnG").click # "btnG" is the name of the google button
if ie.contains_text(searchTerm)
puts "Test Passed. Found the test string: #{searchTerm}. Actual Results match Expected Results."
puts "Test Failed! Could not find: #{searchTerm}"

Arctic Ice Nonsense


Argghhh. Are journalists just getting stupid?
From the Oct 1, 2007 issue in Time magazine on page 30:
"This summer, however, saw something new: for the first time in recorded history, the Northwest Passage was ice-free all the way from the Pacific to the Atlantic."

OK, we are all to believe that global warming is real based on this fact.
Later in the magazine they clinch the environmental danger from the opening of the passage with this:

"The idea of Liberian-registered tankers chugging through the Northwest Passage or oil spills that can't be cleaned up--that's what terrifies me," says Mike Beedell, an Arctic adventurer who sailed a small sailboat through the passage 20 years ago.

Wait a minute. This summer is the first time the passage is open, and they are quoting a guy in the same article who sailed the passage 20 years ago?

I can understand the reporter not researching their own Time magazine archives and missing an article from 1944 describing Henry Asbjorn Larsen's trip through the Northwest passage. (which by the way mentions a previous trip through the passage by Roald Amundsen). But to miss something later on in the current article?

So we are to believe this is the first time in history the passage is open when the magazine itself mentions three previous maritime voyages through the Northwest passage?
Do the editors of Time think the excessive heat from global warming is addling our brains and we won't notice? What do you think?

Saturday, October 06, 2007

Saturday Project: Add dual-boot Ubuntu to Ancient Dell

Since Windows 98 is no longer a safe OS, this Saturday I guided my 11 year old daughter through the Ubuntu dual-boot install using this guide.
The process was amazingly easy. Then I used EasyUbuntu to download all the goodies not in ubuntu - although Flash did not work and I installed that manually.
Youtube has a handy video tutorial on installing a dual-boot system.

Snagit + YouTube = Educational Videos

I downloaded Snagit to record mini-movies of using a computer. Snagit is very easy to use and only cost $30.
I've been thinking of doing our team's next installation guide with a video. Instead of tediously cutting and pasting screenshots into a word doc, why not just take a movie of a sample installation? It would be faster to create and better for the installer who could pause and rewind at their leisure. What do you think?
Anyway, you can see the results here:

Friday, October 05, 2007

Why can't my computer be as smart as my smoke dectector?

In my house the smoke detectors go off by themselves without a hint of smoke. They just start blaring like crazy. Here's the interesting part - they always go off between 2am and 4am in the wee hours of the morning. Somehow my smoke detectors know what time it is without ever having been synch'd with time.gov since they have never gone postal at say, 2 in the afternoon when it wouldn't bother anyone.

They always sound off just before a very important early morning event at work so I can't sleep late after having my heart go from 40 beats/minute to 270 in 2 seconds flat.
They must also have a wireless link to my outlook calendar to know when important meetings with stakeholders are scheduled first thing in the morning.
Why can't my computer be as smart as my smoke detectors?

Wednesday, October 03, 2007

Importance of Functional Programming

I like this quote from Joel (you know, the Joel) from his blog on Functional Programming:
Without understanding functional programming, you can't invent MapReduce, the algorithm that makes Google so massively scalable. The terms Map and Reduce come from Lisp and functional programming. MapReduce is, in retrospect, obvious to anyone who remembers from their 6.001-equivalent programming class that purely functional programs have no side effects and are thus trivially parallelizable. The very fact that Google invented MapReduce, and Microsoft didn't, says something about why Microsoft is still playing catch up trying to get basic search features to work, while Google has moved on to the next problem: building Skynet^H^H^H^H^H^H the world's largest massively parallel supercomputer. I don't think Microsoft completely understands just how far behind they are on that wave.

Tuesday, October 02, 2007

US Debt Approaches 10 Trillion Dollars

Our national debt is approaching 10 Trillion dollars. That's 30,000 dollars for every man woman and child in the united states. A nice chart showing the growth of the debt is here.
Half a trillion for the wars in Iraq and Afghanistan certainly have not helped.
Here's a list of our foreign friends who finance 2.2 Trillion of our habit:
Data from http://www.treas.gov/tic/mfh.txt.

Joost is Open to Everyone

Joost has finally come out of invite-only status.
Joost is peer-to-peer video sharing software with commercials injected in real time brought to us by the guys who started KaZaa and Skype, Friis and Zennström.
I've been watching the betas occasionally for the last few months. The video quality has been slowly getting better, but finding content is still a little awkward.
The biggest hurtle is getting the content from the computer to your TV. If only Joost and TiVo would make a deal. I'd love to be able to stream content from Joost to my TiVos.