24 February 2007

Windows Network Places Rubbish

I was thinking of using SyncBack to synchronize files from an FTP site to my local drive. Problem is that you can't specify an FTP location as the source, only Network Addresses (or UNC paths, the ones that start with a double backslash). What if I create a Network Place? No go, because Explorer treats Network Places differently from Network Addresses. I think FTP Network Places is only a bookmark for MSIE, no different from having a "ftp://blah.com" URI. You can't map a drive to a Network Place without using a program such as NetDrive or WebDrive. However, NetDrive requires a Novell licence. Stone the crows!

SyncBack Website Synchronization

It's getting hard to manually keep files on my computer and web server for my little hobby web site in sync. For instance, I wanted to show someone a new page but forgot to upload the latest version of the index page so he couldn't find it; that's at least one reason to use a content management system.

After the usual trawl through download sites, I found SyncBack which provides the synchronization feature that I want. Like backup tools, you configure a profile, test the profile by doing a simulated run all the right files are copied, then execute or schedule a date to execute that profile. SyncBack's profile dialog has Easy and Expert modes. To synchronize my local files and FTP server, I had to use the Expert mode so that I can enter my FTP server's details. The profile dialog in this mode becomes too busy with a lot of tabs and options. It's also confusing to have two tabs called Simple and Advanced. These are just quibbles because I got a synchronization profile working fairly quickly.

23 February 2007

WinMerge 2.6 and 7-Zip 4.42

Noticed that WinMerge 2.6 was released in Jan 07. The toolbar icons are prettier than version 2.4 and the directory comparison no longer has the annoying popup dialog each time you change directories.

While looking at WinMerge, I found a free archive library and GUI called 7-Zip which seems to work as well as Winzip. I'm not too fussed with having better compression but the two-pane feature seems interesting.

21 February 2007

Bathroom Renovation Day 12

The shower screen has been installed and the builders have finished. It's finished!

20 February 2007

Bathroom Renovation Day 11

The toilet, sink, taps, rails and vanity doors have been installed. Nearly at the end!

19 February 2007

Excel Nested Conditional Find String

I wanted an Excel nested conditional worksheet statement to produce different output in a cell depending on whether another cell in the row had particular sub-string. For instance, if the source cell had "Problem in XYZ" or "Issue found in product ABC", then the dependent cell would show "XYZ" or "ABC". Then I can filter the rows in the worksheet based on the name of the product. Below is how I thought I could write the statement (formatted for readability):

=IF(FIND("XYZ",C1)>=0, "XYZ",
    IF(FIND("ABC",C1)>=0, "ABC", "Unknown")
    )

This statement worked for a source cell containing "XYZ" but would generate a "!Value" error otherwise. The find() function returns the position where it found a sub-string but would return an error if the sub-string could not be found. So I have to test the return value of the function instead of the position, resulting in a more cluttered statement:

=IF(ISNUMBER(FIND("XYZ",C1)), "XYZ",
    IF(ISNUMBER(FIND("ABC",C1)), "ABC", "Unknown")
    )

It's a rather annoying gotcha because returning an error is different from the VBA's InStr() function, which returns 0 when the sub-string can't be found.

18 February 2007

Basic Web Application Testing

I was looking for a free application test program to regression test software. Our tester suggested Watir for testing Web application using MSIE. Watir is based on Ruby, which would be a fun language to learn in the future. For the present, there's a Java version called Watij.

To start Watij, just unpack the archive, start a Cmd console and enter launchWatijBeanShell.bat (simply clicking on launchWatijBeanShell.bat in Explore doesn't work). A Java BeanShell console opens where you can interactively enter Java statements to start MSIE and execute commands. Here's a sample session to open a Google search page and make a query:

IE ie = new IE();
ie.start("http://www.google.com");
ie.textField(name, "q").set("Hello World");
ie.button(name, "btnG").click();

How do we find the controls on a Web page (e.g. the name of the query field)? If you use Chris Pederick's Firefox WebDeveloper add-in, select Forms / Display Form Details feature to see the attributes of each form's element.

Having made a query, we should verify that we get the expected result. For a simple test, we want to know if Wikipedia can be found in the search results. Here, I combined a Java if-else statement with BeanShell's print():

if (ie.containsText("Wikipedia")) {
  print("Yes");
} else {
  print("No");
}
Yes

Watij doesn't have a way to record events like WinRunner. Scott Hanselman has written WatirMaker but it doesn't look like it's quite ready for general use.

Last minute: FireWatir for Firefox is also available.

17 February 2007

Google Mail Fetcher

Google mail can now retrieve mail from up to five different accounts and merge them into one mail box. Very handy feature, since I dislike using the Webmail interface provided by my ISP.

Bathroom Renovation Day 10

All the tiling, including grouting and sealing, is done. We're leaving the bathroom for a day, then we'll paint the ceiling around the light fittings before the fittings are pushed into their final position.

16 February 2007

Swimming Again

Started swimming again after an 11-month break. No surprise that making 500m on day one was hard. Got to 600m in day two. Aim to return to 1km sessions otherwise I won't lose any cm's. Nice that I didn't gain any kg's in the mean time.

Bathroom Renovation Days 8 and 9

Day 8. Tiling started on the floor, around the window and in the shower areas.

Day 9. More tiling and the frame for the bathroom vanity has been installed.

15 February 2007

Bathroom Renovation Day 7

The bathroom has a new frosted window to replace the old glass louvre one. The old one was an ugly thing; the frame was weatherworn, dust collected at the bottom of the frame and the louvres were hard to clean. The plumbing outside is reconnected to the sewer pipe and we have a diverter valve to water the garden from the bath. The builders have painted some sort of primer to help the tiles stick to the walls.

14 February 2007

Bathroom Renovation Day 6

The builders have sealed the joins in the walls and floor, and waterproofed them. The old inlet to the sewer has been replaced by a new plastic one. Tiling should start tomorrow.

13 February 2007

Oracle Insert Multiple Rows

We wanted a quick hack to initialize a table with a set of rows. The computer we were using had a free version DBVisualizer which only supported running one SQL statement at a time and we didn't want to install SQLPlus or SQL Loader yet. This Wikipedia Insert (SQL) entry shows how to do multi-row insert in various flavours of SQL. The Oracle solution uses a system table called DUAL which seems to act as a placeholder in the SQL statement and return the result of any query.

Bathroom Renovation Day 5

The builders have installed the new plasterboard walls (our old walls were hard to clean and had tiles stuck to them) and laid the new waterproof concrete fibre lining for the floor and the bathtub's enclosure. They spent some time discussing how to tile the walls and how to tile around the window; Terry showed me their pencil marks on the plasterboard where they did some measurements and test layouts.

12 February 2007

Blogger Layout FTP Unavailable

The new Google Blogger keeps advertising the new drag-and-drop Layout design feature and widgets in the start page, so I thought I'd try it. After staring at Blogger Layout help and not getting anywhere, I realised that something was missing. I found that Layout isn't available for blogs published using FTP. Bummer. Would've saved me half an hour if Blogger had written this limitation into their on-line help.

A bit later. Blogger provides a Custom Domain service. Basically, you use Google as the domain name server that will redirect all DNS queries to your Blogger-hosted blog. With this service, you can use the Layout feature.

11 February 2007

Firefox WebmailCompose Add-in

WebmailCompose add-in for Firefox lets you send e-mail via your web mail client instead of your PC's mail client. When you click on a mailto URL in a web page, WebmailCompose opens your web mail client's composition page and fills in the To: field with the e-mail address from the URL. Use this version if you have Firefox 2.x.

10 February 2007

Bathroom Renovation Days 0 to 4

Day 0: The skip arrived in our driveway. Terry moved the car the night before else we'd be trapped!

Day 1: The builders gutted the old bathroom and filled the skip with all the junk. Terry bought some extra insulation for the ceiling.

Day 2: The bathroom has a new ceiling and insulation.

Day 3: The builders dug a pit to expose the sewer inlet, installed a new underfloor and electric fittings.

Day 4: The bathtub was installed. The builder filled it with water and told us to leave the water in for the weekend until the cement dried.

Acquiring Network Connection Solved

One Windows XP computer at home took a 10 to 15 minutes to connect to our wireless network. Its Wireless Network Connection Status dialog would show a status of Acquiring Network Connection and that the computer was receiving packets from the wireless router but no packets were being sent from the computer. There was no problem connecting to the router using a wired connection.

Our other computer connected with no problems, the wireless router's configuration had been re-done to avoid clashing with the neighbours' networks and the computer's DHCP service and its dependencies were running. I started Windows Task Manager when the computer started and watched which processes were launched. When the wireless connection was finally established, I saw that ZCfgSvc.exe was also launched. Checking the list of services, the Wireless Zero Configuration services was disabled. I configured it to start automatically, re-started the computer and now the computer establishes a wireless connection within a couple of minutes. Microsoft has some information on solving this problem.

(Lest it sound like I knew what I was doing, I've been working on this problem off and on for a month. I had reconfigured the wireless router and computer's wireless adapter numerous times and searched high and low on the Web for an answer.)

11 Feb 2007. Ergh, wrote too soon. Another computer that was connecting successfully started having the same problem. This is too weird. Time to try a different tack.

This time, I reconfigured the router and network adaptors to use 802.11b/g instead of just 802.11g. The second computer started connecting again.

Back on the first computer, I used the Intel PROSet software to manage the network adaptor. That computer stopped connecting again. When I let Windows manage the network adaptor again, all was fine.

So it seems that different solutions are required at the moment for the two computers. One possibility is that the first computer was newer and had all Windows updates installed, while the second computer never had an update installed.

One hour later. I installed all 69 (!) Windows XP updates on the second computer and sure enough, it couldn't connect to the wireless router if I used the Intel PROSet software to manage the network adaptor. Switch to the Windows client and reboot. No problems. Turn on both computers and connect. No problem. Think I've finally solved it.

01 February 2007

Firefox Opaque ClearTabs Theme

Tried some Firefox themes and found Opaque + ClearTabs which is quite nice. It turns up the icons' opacity to 100% and certainly brightens up the Firefox toolbar.