March 2005


How not to climb a tree, as demonstrated by Oscar Lindsay:

  1. Find a tree
  2. Shift table to under tree
  3. Stand on table
  4. Reach
  5. Get bumped by sister also climbing tree
  6. Fall off table
  7. Break arm

After about a year of using RSS bandit as my feed reader I’ve switched to Bloglines. If I only accessed feeds from one place I would stick with RSS Bandit, but I could not sync my feeds between home and work as read/unread etc. That was the only thing that made me switch. I prefer a nice rich interface with lots of features, but the pain got too much.

I tried Bloglines over a year ago. I didn’t like it. Can’t remeber why not. I don’t know what’s changed but it is now my reader of choice.

What do you use? Why? What’s wrong with it?

The super 12 has started again, and with it the usual online games. What’s amazing, and I’ll admit there is a lot of luck, is that I am 25th out of 123258 players in the virtual super 12.

After a terrible week 4, I’m now 118th out of 123883 players, 13 points behind 1st.

Slipping back into mediocity after round 9, I am now 12269 of 126844, on 236 points, 56 behind the leader.

Final Results are in: 353 points, 53 behind the winner, 3266 out of 127667

Now this is something I’ll probably be hated for pointing out, but isn’t it obvious? Why not build popups with absolutely positioned <div>s or another element.

At work we have to conduct a website user survey and the view (although it is agreed it is bad practice) is to have a popup on the homepage. It will take them to a survey form when clicked, or alternatively, remind them later, or never bug them again.

Now the code is far from perfect; it’s been thrown together as a proof of concept, but this is basically how it works:

  1. The user visits the page
  2. The popup’s block is hidden (display: none;) by the stylesheet
  3. Javascript checks for a cookie
  4. If the cookie is there, the block stays invisible
  5. If there is no cookie, Javascript sets the popup block to display: block;
  6. The “Remind me later’ link sets a 2 hour cookie if clicked
  7. The “Don’t bug me” link sets a 1 year cookie
  8. Doing the survey sets a 1 year cookie

I’ll clean it up as I bed it in, but here’s the code so far:

HTML

<ul id="popsurvey">
<li><a href="survey.html">Complete a survey - help us improve our website</a></li>
<li><a href="#" onclick="javascript:later('popsurvey');">remind me later</a></li>
<li><a href="#" onclick="javascript:nobug('popsurvey');">don't bug me</a></li>
</ul>

CSS

#popsurvey {
	position: absolute;
	left: 50%;
	width: 260px;
	margin-left: -150px;
	top: 35%;
	background: #00556B url(images/window300wide.jpg) no-repeat top; /*looks like windows */
	padding: 20px;
	padding-top: 35px;
	display: none;
}

Javascript

window.onload = function () {
	var survey = getCookie('nobug')
	if(!survey) {
		document.getElementById('popsurvey').style.display = 'block';
	} else {
		document.getElementById('popsurvey').style.display = 'none';
	}
}

function hide(elementID) {
	document.getElementById(elementID).style.display = 'none';
}

function nobug(elementID) {
	// date 1 year in future
	var ex = new Date();
	ex.setTime(ex.getTime() + (365*24*60*60*1000));
	ex = ex.toGMTString()
	//set nobug cookie
	setCookie('nobug', 'TRUE', ex)
	//close popup
	hide(elementID);
}

function later(elementID) {
	// date 2 hours in future
	var ex = new Date();
	ex.setTime(ex.getTime() + (2*60*60*1000));
	ex = ex.toGMTString()
	//set nobug cookie
	setCookie('nobug', 'TRUE', ex)
	//close popup
	hide(elementID);
}

function setCookie(name, value, expires, path, domain, secure) {
	var curCookie = name + "=" + escape(value) +
	((expires) ? "; expires=" + expires : "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
	document.cookie = curCookie;
}

function getCookie(name) {
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	} else
	begin += 2;
	var end = document.cookie.indexOf(";", begin);
	if (end == -1)
	end = dc.length;
	return unescape(dc.substring(begin + prefix.length, end));
}

Limitations/Caveats

This only works if cookies, Javascript and CSS are on.

Javascript turned off
Popup is not visible
Cookies turned off
Popup on every time
Styles turned off
Styles and Javascript turned off
Popup is rendered in document flow

A quick search of the Intellectual Property Office patent database shows quite a few from microsoft. An article by Adam Gifford in the New Zealand Herald recently brought this to my attention:

Patent 525484, accepted by the office and now open for objections until the end of May, says Microsoft invented and owns the process whereby a word-processing document stored in a single XML file may be manipulated by applications that understand XML.

Of course this is a defensive strategy designed to prevent other programs from openning/reading/writing MS documents and try to force users to use MS products.

This is bad two ways: bad for MS and bad for users.

How is it bad for Microsoft? The history is well documented: look at betamax and DAT compared to VHS and CDs. The open standards are mainstream while the proprietary standards (despite arguably being ‘better’) lost and were relegated to niche markets. It’s bad for users because it tries to shoehorn them into MS products.

As a bit of a though experiment: Suppose a pen manufacturer required that all document written with their pens could only be editited using their pens. Would they be granted a patent for the writing process? Microsoft are not using magic ink, nor magic paper: it’s been done before.

I don’t know enough about patent law to lodge an objection to it. But a document is a document whether it is electronic or not. Using microsoft’s pen because of how it is written is not something that should be forced upon me.

Oscar at the Dinner TableI got a new toy at the weekend. Vodafone are running a cool deal where you can trade in any connected Telecom mobile for $300 off any of their toys. So I took my 7 year old Nokia 5120 that I had only used as an alarm clock for the last 4 years, rang Telecom and got it reconnected (free) to their prepay service, then took it to Dick Smith’s and swapped it for a Nokia 3220.

It’s obviously a kids/teenage phone with all of its flashy lights etc, but I’m just a big kid anyway. 8)

I installed Google Desktop Search last night. I’m removing it now. It would be great for a computer that’s not as old as mine. The constant whine of the fan and rattle of the harddrive is too much.

I’ll put it on my new computer when I get it.

A while back I pointed to some cool wooden computer parts. It seems someone has gone one better and made a whole wooden laptop. [via hack a day]

Next Page »