Saturday, 15 September 2007

Potluck 'Round the Hearth

While discussing the issues of public space for resources in Peopleware, the authors quote from Christopher Alexander's A Pattern Language:

"Without communal eating, no human group can hold together. Give each [working group] a place where people can eat together. Make the common meal a regular event."

The authors go on to highlight the relationship between shared space in broader societal terms (the home, in particular) and the office workspace.

As so many of us spend a great deal of time and a large portion of our lives at work, I believe strongly in extending my definition of "family" to include the people I work with. This fits naturally with the hierarchical structure found so often in work places: my immediate circle of co-workers becomes my brothers and sisters; my managers becomes parents, grandparents, uncles, and aunts; other colleagues in the organisation become cousins and second cousins.

From this mindset (and, admittedly from a mindset that includes fun and enjoyment!), I introduced my team to the potluck lunch about a year and a half ago. The potluck concept was not my idea: I attended a party held outside work by a colleague from my previous employer and the party was themed around the potluck; the people and layout of the workspace of my new employer simply allowed me to suggest we bring the team together on a regular basis and everyone bring a single dish of food.

Although we don't measure many things at Tourism--let alone productivity increases, the potluck lunch concept has proven successful in general. At the very least, it's a great opportunity to sit back with my work family, indulge in new and interesting food, and have a chat... a scheduled group downtime. It's also been an interesting way to introduce new team members to others in the office and give them a sense of how we work and what it feels like to be a part of our team.


We aim for a monthly potluck lunch and usually go in for some kind of theme. When our first potluck was held, we had a very diverse team and everyone brought food representative of their home culture. We'll also hold a goodbye potluck when someone leaves the team.

The rules of potluck are few and simple:
  1. Each person only brings enough food to feed one to two people (or a single dish);
  2. Each person tries their utmost to make something at home the night before--food purchased the day of the potluck is usually a rush job and tends to be deep-fried;
  3. Alcohol is a suitable food substitute (but this works at Tourism).

We don't usually plan who's bringing what--it usually just works out. As we do have a few vegetarians about we try to cater for them and generally try to arrive at a balance of savoury vs sweet (dessert is always nice!).

Thursday, 13 September 2007

Web 2.0 Graphic Design

Ever wonder what makes the latest breed of web site so attractive? http://www.webdesignfromscratch.com/ certainly has and the author has kindly produced a number of well-written articles on how to design a good looking, functional site.

There's a lot of material to go through on this site but it's all very well organised and worthwhile reading.

Burp. Excuse me.

I had a look at Burp proxy recently. If you haven't heard of Burp before, it's a debug proxy that has one unique advantage over the likes of Fiddler: you can manually intercept, modify, and forward individual requests and responses.


Burp is a little Java app and you don't need to install it in order to get up and running. Although the program worked as advertised, my biggest gripe is that you have to manually configure your browser proxy settings to use localhost:8080--Fiddler just works by comparison).



As I'm on a corporate network, I also had to figure out where to configure my domain account/password. The server returned security errors without this. Once set, it's done but I'm naturally wary of supplying my password to a potentially "black" app like this (I run as Admin on my dev box...); our security policy also requires I change my password every thirty days so this is just one more location I need to update my password every month.

The proxy works as advertised, stopping at every request/response passing through and allowing you to modify it, drop it, or forward it on. You can exclude requests for certain media types and automatically modify other aspects of the headers or content. I'm primarily using the proxy to inject an X-Forwarded-For header.

Wednesday, 12 September 2007

German site ist wunderbar!

The German version of the www.westernaustralia.com site will launch officially tomorrow via Minister Sheila McHale but it's live now: http://www.westernaustralia.com/de
This site is just a little bit of my handiwork here at Tourism Western Australia...

Tuesday, 11 September 2007

Reach for the Light


So close... yet so far.

International Resource Identifier Support in .NET 3.5

The September 2007 issue MSDN Magazine contains an interesting article about changes to the System.Net namespace. Among the discussion about sockets and other low-level changes, the authors discuss support for International Resource Identifiers (IRIs) and their benefits over URIs.

http://msdn.microsoft.com/msdnmag/issues/07/09/Networking/default.aspx

I didn't realise it was possible to use non-ASCII characters in a domain name and while many DNS servers don't support non-ASCII domain names, Punicode provides a mechanism to work around this limitation.

So in essence, you can now take a domain name containing Unicode characters (like this: http://微軟香.com) and work with it directly using the URI class. This is certainly a great thing for international visitors to our web sites but as I only read English and French, I was really clinging to the English URLs as the last remaining way to identify our pages in SharePoint! Ah well, modern times, 'tis a global world...

Wednesday, 29 August 2007

IE Renders Spurious '#text' Node as a Gap

I today had the misfortune of discovering IE6/7 doesn't like to display relatively "normal" HTML.

Take a look at this code and the bolded DIV in particular:

<html><body>
<style>
* { padding: 0px; margin: 0px; }
img { border-width: 0px; }
</style>
<div>
<img src="pic.gif" />
</div>
<div style="width: 285px; height: 100px; background-color: Green;">
<p>Other stuff</p>
</div>
</body></html>

This renders a lovely gap between the image in the top DIV and the bottom DIV:

Inspecting the DOM using the IE Developer Toolbar reveals IE is interpreting and rendering a spurious text node from the markup:

As you might expect, Firefox has no issues with this and renders the two DIVs one on top of the other with no gap between.

Despite average CSS skills, I was unable to style this into submission without completely mangling the existing code and CSS (simply adjusting the DIV's height had no effect); instead I managed to get around this by simply removing all whitespace between the opening and closing DIV tags:

<div><img src="pic.gif" /></div>

Since the image in this example is essentially functioning as background image for the DIV, I could have alternatively set its background-image to the URL of the image.

Tuesday, 28 August 2007

Generating Public, Strongly-Typed Resource Classes with Visual Studio

Visual Studio 2005 does a great job of managing your .resx files and automatically generates strongly-typed classes exposing the contents of those files. If you create a new resource file and add it to your project you'll notice the Custom Tool property has a value of ResXFileCodeGenerator to suppor this behaviour.

This is generally all well and good but there is a catch: ResXFileCodeGenerator generates classes with members marked internal; in other words, you won't be able to access your resources using the generated class if you're working in another project (i.e. another assembly).

The resgen.exe tool does all the hard work behind the scenes and does have a flag called PublicClass that will override this behaviour--set this flag and your classes will be generated with public visibility. Unfortunately you can't run this tool automatically until compile-time, which means your resources won't be as conveniently accessible as they are by default; you'll also have to write a post-build script or use another method to do all the hard work moving your generated files around.

Luckily Visual Studio 2008 solves this problem by allowing you to set the Custom Tool property to PublicResXFileCodeGenerator. As the name suggests, the generated methods come out the other end marked as public and this all happens from within Visual Studio.

If you really can't wait for Visual Studio 2008 (and it's not far away), you may want to look into a handy little extension called ResXFileCodeGeneratorEx. In addition to allowing you to create publically-accessible, strongly-typed classes for your resources, it also helps out if you're dealing with format strings in your resource files. The only downsides I can think of are the fact that Visual Studio 2008 will make this tool less necessary (apart from the format bit) and that every developer will need to install it on their machine. No biggie but the sort of thing that can cause headaches for new developers joining your team.

Wednesday, 15 August 2007

IE Dev Toolbar Stops Working (IE7)

The IEDevToolbar is a great help for web-based development with Internet Explorer. I've been using it since it was in beta and while it generally does the job, the bugs have been ever-present in different forms.

One of the latest things I've noticed is how the toolbar seems to stop working (generally after refreshing a page that's changed at the server). The menu options are greyed out and clicking with the pointer refuses to select any page elements. Closing the toolbar and re-opening it again fixes the problem but there is a better way.

For some reason, the toolbar doesn't always automatically refresh itself. As a result the DOM tree represented in the toolbar doesn't match the DOM tree in the browser. Closing and re-opening the toolbar synchronises the toolbar with the page but this can also be accomplished but hitting the IEDevToolbar's Refresh button (one of several icons that don't make a lot of sense at first glance). The menus function once again and page elements are clickable. Why this doesn't always happen automatically is beyond me.

ebay Retailers That Suck

My wife bought an MP3 player a few weeks ago and after deciding she wanted an arband for it we hunted around and finally found a workable version on ebay from Accstation (www.accstation.com). We won the auction at $0.99 and after adding a few dollars shipping and handling, it looked like yet another successfull online transaction. Then came the payment part.

Accstation uses a third-party company to process credit card payments (they also offer payment via PayPal). I opted to use the credit card payment method, completed the online forms, and clicked the submit button: transaction failed. Okay... I thought, probably just a temporary problem with their servers or a network issue, let's try again. Same error. Well, I thought, since I'm seeing this error, the transaction surely can't be reaching the payment gateway; let's start again from the beginning and double-check all my details. Transaction failed. Okay, I'm fed up now... one last time for the fun of it and I'll call my credit card company. Transaction failed.

At this point I give MasterCard a buzz to ensure my card hasn't been blocked and I have sufficient funds to pay the lousy $0.99 + S/H. The representative tells me everything is fine with the card and my account BUT four transactions just went through for the same amount. They haven't been approved yet but there are my four failed transactions. Blow gasket now.

I email the seller directly, I send the seller a note via ebay, I email the credit card processing company. Accstation's autoresponder autoresponds with a useless email message and the credit card processing company refuses to take any responsibility for this fiasco, despite their involvement in processing my payment four times over. A day passes while I wait for a response from Accstation and then another day and another day. I browse their web site and email their accounts department, their sales department, their customer service department, and their auctions department. MasterCard tells me they can't do anything until the transactions are approved.

Someone finally replies and asks me to email them back with my credit card number, expiry date, amount, etc and they'll get back to me within three to five days. There's no way I'm going to send a mysterious bot my credit card details via email and they shouldn't require that information anyway. I never hear back from "Tammy."

In the end, ebay notifies me I won the auction and must pay up before the week is out or I'll be stricken down by the Internet gods. The four payments finally disappear from my MasterCard account and I log in to Accstation's payment system to pay my $0.99 bill, this time via PayPal. The planets align and this time everything works... a week later and my wife has her arm band.

$0.99 plus shipping and handling works out to very little profit for Accstation but I did not hesitate to leave a negative feedback rating on ebay and there's no way I'll ever buy anything from this company again. For the minimal effort it takes to reply to an email from an upset customer, the end result could have been a win-win situation.