Tangerineworks blog

What I'm doing day to day etc...

current status: Working on own projects and available for freelance or contract work. More here : tangerineworks.com

The Age of Distraction

Today I’m trying out Cory Doctorow’s @doctorow ‘s Writing in the Age of Distraction.

It works quite well I think - though rapidly changing (in 20 minute blocks) from one subject to the next makes me feel like I’ve just been hypnotised… you kindof go into a coding trance, and breaking out of it suddenly is quite disorientating.

Well it is for me anyway.

Anyway - the main thing I’m working on today is a database thing for showing consecutive “records”… eg: which First Division team has had the longest run of consecutive wins.

It’s not a complicated program - I’m scaling it up now so it can handle any query.

In addition to that, I’m working on a twitter application that displays your entire twitter history like a diary. It’s not as easy as it might look because twitter place obstacles in the path of getting all your data out in one hit. You need to do it in “pages”, and the put a choke on the API.

Still, there it is… in addition to all that, I’m visiting all the side-projects etc in 20 minute blocks a la “writing in the age of distraction”. You’re reading one of them now… although I still have another 10 minutes on this one.

Something that I’ve noticed myself doing recently… is feeling slightly stressed out and overwhelmed when I visit a site - by the blitz of information that descends all at once…

… and a sense of immediate, tangible relief when I hit the rss button and use Opera’s interpretation of RSS instead.

Initially I thought they must have some sort of XSLT interpreter to do this, and asked around to see if anyone knew where I could get hold of it… to no avail. It turns out that they’re not using XSLT at all (and they can hardly be blamed for that, XSLT basically being a form of satire on programming languages) - and instead they’re using fairly simple javascript.

You can find it by opening Developer Tools… then DOM->DOM(quirky top and bottom menus in dragonfly)… and there it is.

I’ve taken the blessed liberty of saving the css/js> - in case they are so dastardly as to change them… 

… but I think these are pretty good. I’m not sure if it’s just me etc… I’m quite tempted to write a website-interpreter that turns every website into this format by default, so I don’t have to wade through gales of extraneous chaff, all screaming for attention at the same time.

Something that I’ve noticed myself doing recently… is feeling slightly stressed out and overwhelmed when I visit a site - by the blitz of information that descends all at once…

… and a sense of immediate, tangible relief when I hit the rss button and use Opera’s interpretation of RSS instead.

Initially I thought they must have some sort of XSLT interpreter to do this, and asked around to see if anyone knew where I could get hold of it… to no avail. It turns out that they’re not using XSLT at all (and they can hardly be blamed for that, XSLT basically being a form of satire on programming languages) - and instead they’re using fairly simple javascript.

You can find it by opening Developer Tools… then DOM->DOM(quirky top and bottom menus in dragonfly)… and there it is.

I’ve taken the blessed liberty of saving the css/js> - in case they are so dastardly as to change them…

… but I think these are pretty good. I’m not sure if it’s just me etc… I’m quite tempted to write a website-interpreter that turns every website into this format by default, so I don’t have to wade through gales of extraneous chaff, all screaming for attention at the same time.

Time Passes...

And now it’s April… is it? No. It’s May.

Have I been busy. Yes. No.

Absolutely - I’ve discovered a new Grand Passion - which is The Crowd Sourcing of Intelligent Design - which I go on about over here http://www.genomicon.com. I can see massive waves of successive revolutions breaking upon these fair shores - Web 3.0 is going to be in hardware. It’s going to be Arduinos and Gardening. I find this stuff amazingly interesting.

In the meantime (as well) I’ve become a bit of a Wordpress Adept, and have put together a series of backends for smaller sites, which look unutterably gorgeous, eg:

www.westdevoncottages.co.uk
- a mini cms/framework

www.avistarestaurant.com
- a mini cms/framework

www.100plantsciencequestions.org.uk
- a mini cms/framework

www.lobbygroup.org/
- a wordpress site which isn’t quite live yet.


www.thehype.fm/
- a bespoke wordpress theme

So that’s more or less what I’ve been up to. There have been a number of other projects - involving twitter and google plugins - but the main drift of the last 5 months or so has been into Wordpress gurudom.

Twitterbotting

The twitterbot that I wrote for http://www.free-the-web.com went live a couple of days ago… and today I sifted through the feedback and replies.

Out of about 230 sent, I’ve had about 4 that have had snarky replies… and more re-tweets than I can count and an offer to translate it into Romanian - which is incredibly cool. So I think that’s positive… but I’ve found the whole thing to be quite stressful nonetheless.

Something that has been apparent though is that you can’t “just” have a bot. You need a human as well for the people that want to follow, reply etc… but you can’t sit there manually contacting people because then your tweet-stream would be incredibly boring. It would be quite useful to be able to tweet with the left hand and reply with the right. As it were.

The nature of the medium I guess… and it is very new so the landscape that it creates is still forming. It is no good for spam, it is no good for advertising, it’s all about 6 (or 2) degrees of separation. What I’m trying to do is kindof like having one foot on the platform and one foot on the train… but for a while I think, it will be ok. At best the twitterbot will act as an introductory service for the human contact.

Another thing that’s kindof crap about it is that if you do a search for IE6, 50% of the posts are all from the twitterbot. It kindof wrecks the search results. Mind you, it only tweets each person once, so maybe this will tail off.

I don’t know. I have mixed feelings about the whole thing.

Free The Web

Boycott IE6

http://www.free-the-web.com is now more or less completely liveish, and looking as it should in all browsers, with the possible exception of (wait for it) IE6.

screengrab

It’s looking ok I think. I tested it with the mult-browser viewer thing here : http://browsershots.org which is pretty cool - it shows you about 60 different browser combinations which you can zoom in on :

screengrab2

Which allows you to whittle them down and concentrate on the ones that you’re going to support, and which don’t work. These will all be varieties of Internet Explorer… which comes up with gems like this while you’re testing

screengrab3

Features you never knew you needed eh?

Anyway. There it is. I feel slightly guilty about not including IE7 or IE8 in the recommended browser list - because theoretically, these should work - but this is down to a personal vendetta of my own. Microsoft have funded legal attacks against open-source upon which my livelihood depends, so as far as I am concerned, they are off the radar.

Anyway, www.free-the-web.com includes a couple of bits of eye-candy on the mashup front, noteably a twitter feed of what everyone’s saying about IE6 right now and a couple of graphs generated using Googles graph-drawing thing and the stats feed from marketshare.hitslink.com.

The next thing on the todo list is to cache both of the above, and to make a thing which sends a tweet to everyone (once) when they mention IE6.

MTV and Greasemonkey

Well it looks like MTV have released all of their videos a la Youtube (although you can’t post them yourself, which is like the difference between two dimensions and three dimensions)… but they are there, and they appear to work. Slightly frustrating in that you look up your fav song, and they’ve got the artist doing everything except the one you want to hear. Still. Kudos to MTV for not trying to fight the weather etc.

Anyway, the default size thing is a little stingy :

So I started hacking about with it and then thought… what the hell, I may as well use this as an excuse to try out greasemonkey… so I did.

Here’s a script that converts all MTV video links so they popup a full screen window. Highly rendundant because the videos already contain a button that allows them to run full screen…

… but there it is. It is at least proof-of-concept, and contains a jquery embed thing which might come in handy to someone else.

Click here to install (don’t worry, it’s just as easy to uninstall)

If you don’t have greasemonkey installed, you’ll need to go here : http://greasemonkey.mozdev.org

Go to MTV to try it

MVC and SQL-Level Benchmarking

Because the trouble with MVC is that it makes instantiation of an object seem so trivial, that you can put $thing=new something($id); in a 1000 iteration loop… and you forget (and this is really easy to do) that you’re actually making 1000 seperate requests to the database when you could be making one.

And a lot of this stuff (for me at least) doesn’t come to light unless I run benchmarking code… in fact it’s so useful, I build it directly into my db class… so I can measure the duration of every single it on the DB.

I’ve written my own quick and nasty benchmarker - code below. Worth its weight in gold etc.

Benchmark class

Chrome and the pre-launch javascript jitters

Tomorrow I think… I’ll set up some benchmarking, then officially launch the 11v11 api, and England Microsite.

as in :

http://www.11v11.com/api
http://england.11v11.com

They seem to work - but I’m slightly worried about the javascript - it’s loading on some very big pages… and client-side stuff is iffy. Loads of combinations / permutations of browsers, and browseryness was never an exact science. I think I’ll refuse to support IE6 as a matter of principle - I’ve noticed a couple of other movers and shakers doing this, and it makes sense… as a matter of principle.

Still. Javascript: It’s iffy.

But not in Chrome. It’s rock-solid in Chrome… which is part of the reason I think that Google invented it… there will come a point as the complexity of web-apps gets to the point where some killer-app turns up… and it only works reliably with Chrome

The era of google englobulation creepeth inexorably onward.

Clearspring plugins... the cop-out/workaround

Ok - I’ve gotten round the Clearspring plugin saga by popping the embed code up in a window of it’s own because any kind of on-click javascript thing appears to kill it, and although this is sub-optimal (it would be better to be able to load the things using ajax) it does at least work… and will do while I converse with the Clearspring support people, via their forum… which their support people appear to visit once or twice a week. Which aint fast.

Still, here it is: http://www.11v11.com/api/

click a match, any match, then click the ‘show this match into your site’ link at the bottom of the page.

et voila: (screen grab)
embed

Which is pretty cool, if I may say so myself etc. There are a handful of teething problems, ie:

  • the plugins don’t work in opera (this is fairly serious)
  • the plugins are trapped in fixed height/width ratio mode, which isn’t what’s needed
  • there’s an option to put the embed code out front (which I’d prefer to use)… but which flat out doesn’t work.
  • I want these things to be loadable from Ajax rather than poping up another window.
But I think I’ll go live with it in the next couple of days anyway… because I’m also going to throw it open to our membership… and ask them “what do you want”? which will doubtless throw up bigger issues than the ones listed above. Got to be done though.

The never ending wordpress login loop

This one was a bit of a bastard to sort out, so I thought I’d pass it on.

How to tell if you’ve got it

1) Load your wordpress site in Firefox, with Firebug installed.
2) Go to the “net” bit which shows you which files are loading.
3) try to go to wp-admin (or any admin page)

The Firebug display will show

login.php
wp-admin
login.php
wp-admin
login.php
wp-admin

Over and over again until it dies

How I fixed it

1) back up the whole site

( faff about for hours, searching for fixed on the internet)

2) delete all plugins using ftp…..

… and it works for the first time in hours


3) copy back akismet with ftp
4) upgrade akismet (there’s an auto upgrade link in the admin bit
5) copy back the other plugins with ftp

So there you go. Hope that helps some other poor soul.

Free the web