This graph has leaked out of somewhere and purports to show the effect of the Paywall on the time online website. Allegedly. If its real, and it may well be, then the paywall isn’t working. Personally, I’d pay if it wasn’t so relatively expensive – there’s nothing in the Times for me I can’t get for free elsewhere…

No news is Good news..

May 17th, 2010

I now have an office in central Oxford, just by the station, which is very handy for London clients wanting to meet up in Paddington. That aside, the complete lack of blog updates demonstrate how busy I have been, with some very interesting new Ecommerce clients, plus I’ve been doing some Internet video streaming, SEO and Google Analytics consultancy. As well as the obligatory social media work. As ever though, any question, thoughts or comments do get in touch.

Google heal thyself

March 24th, 2010

So, Google appears to be failing to close its HTML tag (</HTML>) tag on its homepage, Google.co.uk. nOOb error.

I mean, this is the Google Homepage…Get it vaguely right guys, even if it doesn’t validate.

Check it out yourself, but here’s the source as of 23:44, 24th March 2010, http://www.google.co.uk.

<!doctype html><html onmousemove="google&&google.fade&&google.fade(event)"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>Google</title><script>window.google={kEI:"o6GqS8-BBoiO4gauptG2Ag",kEXPI:"17259",kCSI:{e:"17259",ei:"o6GqS8-BBoiO4gauptG2Ag",expi:"17259"},ml:function(){},kHL:"en",time:function(){return(new Date).getTime()},log:function(b,d,c){var a=new Image,e=google,g=e.lc,f=e.li;a.onerror=(a.onload=(a.onabort=function(){delete g[f]}));g[f]=a;c=c||"/gen_204?atyp=i&ct="+b+"&cad="+d+"&zx="+google.time();a.src=c;e.li=f+1},lc:[],li:0,Toolbelt:{}};
window.google.sn="webhp";window.google.timers={load:{t:{start:(new Date).getTime()}}};try{}catch(u){}window.google.jsrt_kill=1;
var _gjwl=location;function _gjuc(){var b=_gjwl.href.indexOf("#");if(b>=0){var a=_gjwl.href.substring(b+1);if(/(^|&)q=/.test(a)&&a.indexOf("#")==-1&&!/(^|&)cad=h($|&)/.test(a)){_gjwl.replace("/search?"+a.replace(/(^|&)fp=[^&]*/g,"")+"&cad=h");return 1}}return 0}function _gjp(){!(window._gjwl.hash&&window._gjuc())&&setTimeout(_gjp,500)};
window._gjp && _gjp()</script><style>td{line-height:.8em;}.gac_m td{line-height:17px;}form{margin-bottom:20px;}body,td,a,p,.h{font-family:arial,sans-serif}.h{color:#36c;font-size:20px}.q{color:#00c}.ts td{padding:0}.ts{border-collapse:collapse}em{font-weight:bold;font-style:normal}.lst{font:17px arial,sans-serif;margin-bottom:.2em;vertical-align:bottom;}input{font-family:inherit}.lsb,.gac_sb{-webkit-appearance:button;padding:0 8px;border:1px solid #999;-webkit-border-radius:2px;background:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#ddd));font-size:15px;height:1.85em!important;margin:.2em;}.lsb:active,.gac_sb:active{background:-webkit-gradient(linear,left top,left bottom,from(#ccc),to(#ddd))}#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:0;}#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{background:#fff;}#gbar,#guser{font-size:13px;padding-top:1px !important}#gbar{float:left;height:22px}#guser{padding-bottom:7px !important;text-align:right}.gbh,.gbd{border-top:1px solid #c9d7f1;font-size:1px}.gbh{height:0;position:absolute;top:24px;width:100%}#gbs,.gbm{background:#fff;left:0;position:absolute;text-align:left;visibility:hidden;z-index:1000}.gbm{border:1px solid;border-color:#c9d7f1 #36c #36c #a2bae7;z-index:1001}.gb1{margin-right:.5em}.gb1,.gb3{zoom:1}.gb2{display:block;padding:.2em .5em;}.gb2,.gb3{text-decoration:none;border-bottom:none}a.gb1,a.gb2,a.gb3,a.gb4{color:#00c !important}a.gb2:hover{background:#36c;color:#fff !important}</style><noscript><style>#fctr,#ghead,#pmocntr,#sbl,#tba,#tbe,.fade{opacity:1;}</style></noscript><script>google.y={};google.x=function(e,g){google.y[e.id]=[e,g];return false};if(!window.google)window.google={};window.google.crm={};window.google.cri=0;window.clk=function(d,e,f,j,k,l,m){if(document.images){var a=encodeURIComponent||escape,b=new Image,g=window.google.cri++;window.google.crm[g]=b;b.onerror=(b.onload=(b.onabort=function(){delete window.google.crm[g]}));b.src=["/url?sa=T","",e?"&oi="+a(e):"",f?"&cad="+a(f):"","&ct=",a(j||"res"),"&cd=",a(k),"&ved=",a(m),d?"&url="+a(d.replace(/#.*/,"")).replace(/\+/g,"%2B"):"","&ei=","o6GqS8-BBoiO4gauptG2Ag",l].join("")}
return true};
window.gbar={qs:function(){},tg:function(e){var o={id:'gbar'};for(i in e)o[i]=e[i];google.x(o,function(){gbar.tg(o)})}};</script></head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="document.f.q.focus();if(document.images)new Image().src='/images/nav_logo8.png'" topmargin=3 marginheight=3><textarea id=csi style=display:none></textarea><div id=ghead><div id=gbar><nobr><b>Web</b> <a href="http://images.google.co.uk/imghp?hl=en&tab=wi" onclick=gbar.qs(this)>Images</a> <a href="http://video.google.co.uk/?hl=en&tab=wv" onclick=gbar.qs(this)>Videos</a> <a href="http://maps.google.co.uk/maps?hl=en&tab=wl" onclick=gbar.qs(this)>Maps</a> <a href="http://news.google.co.uk/nwshp?hl=en&tab=wn" onclick=gbar.qs(this)>News</a> <a href="http://www.google.co.uk/prdhp?hl=en&tab=wf" onclick=gbar.qs(this)>Shopping</a> <a href="http://mail.google.com/mail/?hl=en&tab=wm">Mail</a> <a href="http://www.google.co.uk/intl/en/options/" onclick="this.blur();gbar.tg(event);return !1" aria-haspopup=true><u>more</u> <small>&#9660;</small></a><div id=gbi><a href="http://books.google.co.uk/bkshp?hl=en&tab=wp" onclick=gbar.qs(this)>Books</a> <a href="http://www.google.co.uk/finance?hl=en&tab=we" onclick=gbar.qs(this)>Finance</a> <a href="http://translate.google.co.uk/?hl=en&tab=wT" onclick=gbar.qs(this)>Translate</a> <a href="http://scholar.google.co.uk/schhp?hl=en&tab=ws" onclick=gbar.qs(this)>Scholar</a> <a href="http://blogsearch.google.co.uk/?hl=en&tab=wb" onclick=gbar.qs(this)>Blogs</a> <div><div></div></div><a href="http://www.youtube.com/?hl=en&tab=w1&gl=GB" onclick=gbar.qs(this)>YouTube</a> <a href="http://www.google.com/calendar/render?hl=en&tab=wc">Calendar</a> <a href="http://picasaweb.google.co.uk/home?hl=en&tab=wq" onclick=gbar.qs(this)>Photos</a> <a href="http://docs.google.com/?hl=en&tab=wo">Documents</a> <a href="http://www.google.co.uk/reader/view/?hl=en&tab=wy">Reader</a> <a href="http://sites.google.com/?hl=en&tab=w3">Sites</a> <a href="http://groups.google.co.uk/grphp?hl=en&tab=wg" onclick=gbar.qs(this)>Groups</a> <div><div></div></div><a href="http://www.google.co.uk/intl/en/options/">even more &raquo;</a> </div></nobr></div><div id=guser width=100%><nobr><span id=gbn></span><span id=gbf></span><span id=gbe><a href="/url?sa=p&pref=ig&pval=3&q=http://www.google.co.uk/ig%3Fhl%3Den%26source%3Diglk&usg=AFQjCNH9dUJQAsNWnO3XKq2EIPgFbczqlA">iGoogle</a> | </span><a href="/preferences?hl=en">Search settings</a> | <a href="https://www.google.com/accounts/Login?hl=en&continue=http://www.google.co.uk/">Sign in</a></nobr></div><div style=left:0></div><div style=right:0></div></div> <center><br clear=all id=lgpd><img alt="Google" height=110 src="/intl/en_uk/images/logo.gif" width=276 id=logo onload="window.lol&&lol()"><br><br><form action="/search" name=f><table cellpadding=0 cellspacing=0><tr valign=top><td width=25%>&nbsp;</td><td align=center nowrap><input name=hl type=hidden value=en><input name=source type=hidden value=hp><input autocomplete="off" onblur="google&&google.fade&&google.fade()" maxlength=2048 name=q size=55 title="Google Search" value=""><br><input name=btnG type=submit value="Google Search"><input name=btnI type=submit value="I&#39;m Feeling Lucky"></td><td nowrap width=25% align=left id=sbl><font size=-2>&nbsp;&nbsp;<a href="/advanced_search?hl=en">Advanced Search</a><br>&nbsp;&nbsp;<a href="/language_tools?hl=en">Language Tools</a></font></td></tr><tr><td align=center colspan=3><font size=-1><span style="text-align:left">Search: <input id=all type=radio name=meta value="" checked><label for=all> the web </label> <input id=cty type=radio name=meta value="cr=countryUK|countryGB"><label for=cty> pages from the UK </label> </span></font></td></tr></table></form><br><span id=footer><center id=fctr><br><font size=-1><a href="/intl/en/ads/">Advertising&nbsp;Programmes</a> - <a href="/services/">Business Solutions</a> - <a href="/intl/en/about.html">About Google</a> - <a href="http://www.google.com/ncr">Go to Google.com</a></font><p><font size=-2>&copy;2010 - <a href="/intl/en/privacy.html">Privacy</a></font></p></center></span> <div id=xjsd></div><div id=xjsi><script>if(google.y)google.y.first=[];if(google.y)google.y.first=[];google.dstr=[];google.rein=[];window.setTimeout(function(){var a=document.createElement("script");a.src="/extern_js/f/CgJlbhICdWsrMAo4XkAdLCswDjgMLCswFjgXLCswFzgGLCswGDgFLCswGTgZLCswJTjKiAEsKzAmOAksKzAnOAQsKzA8OAIsKzBAOA0sKzBEOAIsKzBFOAEsKzBOOAEs/I94o1lzRNcA.js";(document.getElementById("xjsd")||document.body).appendChild(a);if(google.timers&&google.timers.load.t)google.timers.load.t.xjsls=(new Date).getTime();},0);
;google.neegg=1;google.y.first.push(function(){google.ac.b=true;google.ac.i(document.f,document.f.q,'','','',{a:0,o:0});(function(){
var g,h,i=1,k=google.time();function l(c,e){var a=[];for(var b=0,d;d=c[b++];){var f=document.getElementById(d);f&&a.push(f)}for(var b=0,j;j=e[b++];)a=a.concat(m(j[0],j[1]));for(var b=0;a[b];b++)a[b]=[a[b],"opacity",0,1,0,""];return a}function m(c,e){var a=[],b=0,d,f=document.getElementsByTagName(c);for(;d=f[b++];)d.className==
e&&a.push(d);return a}google.fade=function(c){if(google.fx&&i){c=c||window.event;var e=1,a=google.time()-k;if(c&&c.type=="mousemove"){var b=c.clientX,d=c.clientY;e=(g||h)&&(g!=b||h!=d)&&a>600;g=b;h=d}if(e){i=0;google.fx.animate(600,l(["fctr","ghead","pmocntr","sbl","tba","tbe"],[["span","fade"],["div","fade"],["div","gbh"]]))}}};
})();
;google.History&&google.History.initialize('/')});if(google.j&&google.j.en&&google.j.xi){window.setTimeout(google.j.xi,0);google.fade=null;}</script></div><script>(function(){
var b,d,e,f;function g(a,c){if(a.removeEventListener){a.removeEventListener("load",c,false);a.removeEventListener("error",c,false)}else{a.detachEvent("onload",c);a.detachEvent("onerror",c)}}function h(a){f=(new Date).getTime();++d;a=a||window.event;var c=a.target||a.srcElement;g(c,h)}var i=document.getElementsByTagName("img");b=i.length;d=0;for(var j=0,k;j<b;++j){k=i[j];g(k,h);if(k.complete||typeof k.src!="string"||!k.src)++d;else if(k.addEventListener){k.addEventListener("load",h,false);k.addEventListener("error",
h,false)}else{k.attachEvent("onload",h);k.attachEvent("onerror",h)}}e=b-d;function l(){google.timers.load.t.ol=(new Date).getTime();google.timers.load.t.iml=f;google.kCSI.imc=d;google.kCSI.imn=b;google.kCSI.imp=e;google.report&&google.report(google.timers.load,google.kCSI)}if(window.addEventListener)window.addEventListener("load",l,false);else if(window.attachEvent)window.attachEvent("onload",l);google.timers.load.t.prt=(f=(new Date).getTime());
})();
</script>

Arduino Twitter LCD

March 20th, 2010

Not that I’m busy or anything, but I saw this,  this, then this, then this and decided I HAD to build a twitter enabled door sign /office messaging system.

With a little help, as I’m a python noob, I have this up  and running.

I’d been wanting to play with Arduno for a while, and do have some minimal electronic skills, so off to ebay I went.

I bought an Arduino Duemilanove and a Sparkfun Serial 16×2 LCD, and some wire.

I soldered the wires on to the Serial LCD (it has a slot for a 3 pin JST connector – couldn’t find one in Maplin).

You then connect the VVD pin to the 5v pin(I had the 5v version of the LCD), GND to GND and RX to RX.

Upload the ardino code using the arduino interface from http://www.arduino.cc/

Code below - it isn’t auto updating yet, but it will be – EDIT now it is, improvements welcomed. LCDDoorsign.zip

This does occasionally stop working with a peer reset connection error –  presumably an issue on the twitter api side – I need to way to stop this halting everything / automatically restart the script…

Here’s a video showing the sign in action…


Nice modifications would be to do this on a massive screen and let it include @ so people can tweet to your sign.

Or include an PIR  / Proximity detector and auto tweet when triggered. Endless possibilities – but this is what I wanted.

Mine will be going on the wall outside Oxford Digital Media’s offices in Oxford.

Enjoy, and huge thanks to everyone who came before.

You’ll need py-serial and py-twitter installed on your computer to run this.

Arduino Code – stolen from http://dawes.wordpress.com/2009/12/23/twitter-to-lcd/

#include <SoftwareSerial.h>
#define txPin 2
int incomingByte = 0;&nbsp;&nbsp; &nbsp;// for incoming serial data
SoftwareSerial LCD = SoftwareSerial(0, txPin);
// since the LCD does not send data back to the Arduino, we should only define the txPin
void setup()
{
Serial.begin(9600);
pinMode(txPin, OUTPUT);
LCD.begin(9600);
}
void loop()
{
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
LCD.print(incomingByte,BYTE);
}
}

#include <SoftwareSerial.h>
#define txPin 2
int incomingByte = 0;&nbsp;&nbsp; &nbsp;// for incoming serial data
SoftwareSerial LCD = SoftwareSerial(0, txPin);// since the LCD does not send data back to the Arduino, we should only define the txPin
void setup(){ Serial.begin(9600); pinMode(txPin, OUTPUT); LCD.begin(9600);}
void loop(){ if (Serial.available() > 0) { // read the incoming byte: incomingByte = Serial.read(); LCD.print(incomingByte,BYTE); }}


Adapted code from http://dawes.wordpress.com/2009/12/23/twitter-to-lcd/ – to make it actually run :)

#!/usr/bin/env python

# encoding: utf-8

“”"

TweetLCD.py

This twitter-to-LCD script implements two functions for displaying

text on a Sparkfun Serial LCD.

scrollText – allows long lines of text to be scrolled along the top of the

LCD pageText – allows long text to be paged up. First the top line is

written, then the bottom line, then the lines shift up, and more text is

written on the bottom line.

Created by Andrew M.C. Dawes on 2009-12-18.

Copyright (c) 2009, 2010 Andrew M.C. Dawes.

Some rights reserved. License: Creative Commons GNU GPL:

http://creativecommons.org/licenses/GPL/2.0/

“”"

import serial

import time

import threading

import twitter

SERIALPORT = “/dev/tty.usbserial-A800ep5H” # this is my USB serial port YMMV

def pageText(textString, sPort):

botLine = “”

cursor = 0

for letter in textString:

# print letter, cursor     # this is for debugging

sPort.write(letter)

if cursor > 15:

# I’m printing in second line so keep track of what I write

botLine = botLine + letter

# print botLine

# page the bottom line up to top, clear bottom, and write

if cursor == 31:

# print “cursor wrap”

sPort.write(‘\xFE\x80′) # wrap to start of first line

sPort.write(botLine) # what was on the bottom (now on top)

sPort.write(”                ”)

sPort.write(‘\xFE\xC0′) # skip to beginning of second line

botLine = “”

cursor = 15 # reset to beginning of second line

cursor = cursor + 1

time.sleep(0.05) # set this delay to a comfortable value

# The quick brown fox jumped over t|he lazy yellow dog.

#letter:  t

#sPort      The quick brown f

#botLine    ox jumped over t

#cursor 31

def scrollText(textString, sPort):

cursor = 0

firstPass = True # test whether this is the first 16 characters

for letter in textString:

if firstPass == False:

sPort.write(‘\xFE\x18′) # scroll left one spot at each letter

# print letter, cursor    # this is for debugging

sPort.write(letter)

if cursor == 15:

# I’m printing the last visible character

sPort.write(‘\xFE\x90′) # jump cursor to 2nd column of 16

# once the first row is filled, we need to scroll

firstPass = False

if cursor == 31:

sPort.write(‘\xFE\xA0′) # jump cursor to 3rd column

if cursor == 39:

# start over, there are only 40 characters in memory

cursor = -1

sPort.write(‘\xFE\x80′) # original character address

cursor = cursor + 1

time.sleep(0.5) # adjust this to a comfortable value

def main():

sPort = serial.Serial(SERIALPORT, 9600)

time.sleep(0.1)

sPort.write(‘\xFE\x01′) # clear the LCD screen

while(True):

time.sleep(0.1)

sPort.write(‘\xFE\x80′) # goto 0 position

api = twitter.Api()

status = api.GetUserTimeline(user=’doorsign’, count=1)[0]

# textstring = “11111111111111112222222222222222\

#                33333333333333334444444444444444″

textstring = “” + status.text

#scrollText(textstring, sPort) # choose one of these

pageText(textstring,sPort) # two options

time.sleep(2)

sPort.write(‘\xFE\x01′) # clear the screen (in preparation to repeat)

sPort.close()

threading.Timer(3, main).start()

if __name__ == ‘__main__’:

main()

time.sleep(20)

Google Buns

February 13th, 2010

“Come on,” said Moon-Face. “Come and eat a Google Bun and see what you think of it.”
Soon they were all sitting on the broad branches outside Moon-Face’s house, eating Pop Biscuits and Google Buns. The buns were most peculiar. They each had a very large currant in the middle, and this was filled with sherbet. So when you got to the currant and bit it the sherbet frothed out and filled your mouth with fine bubbles that tasted delicious. The children got a real surprise when they bit their currants, and Moon-Face almost fell off the branch with laughing.



I’m reading The Magic Faraway Tree to my 6 year old – and was surprised to find this mention of Google Buns. Enid Blyton was ahead of her time. If you missed out on these as a kids – they are really good books!