Controlling JavaScript with LazyLoad – a ShareThis example

Forgive me for the break in communication. Let’s get right back into it.

In the last few months I’ve been looking into website load times and implementing a few on my own. My hoster doesn’t run the most efficient servers and so my webpages really weren’t appearing as first as they might. One interesting area I looked into was javascript – in particular how the position and method of including can impact the rendering of a webpage and the speed it appears.

Some of the worst things you can do is include javascript files near the top of your HTML page. Unless you are careful, any javascript you include in the <head> or <body> sections will stop a browser from reading and rendering your page. This is because the browser does not know whether or not that javascript will output code and therefore require some rendering of its own.

Continue reading “Controlling JavaScript with LazyLoad – a ShareThis example”

Keep Calm and Carry on Coding

I’ve had a change of name, well the blog has. It is based on the poster which displays the text “Keep calm and Carry On”, this was originally created back in 1939 by the British Government and was intended to raise the morale of the British public in the event of invasion (see wikipedia) in the World War II. The new title is “Keep Calm and Carry On Coding”, it grew from a conversation about these posters one geek filled lunch time. Here’s a little hacked version of the poster based on one from wikimedia (here):

Keep Calm and Carry On Coding Poster
Continue reading “Keep Calm and Carry on Coding”

PhpGedView, SourceForge and the US Government

I originally installed PhpGedView back in 2007. It’s an open source and free web program for managing family trees and based on the universal Gedcom file format commonly used in many genealogical websites and applications. I’ve been using it on and off for several years very successfully – all credit to the open source programmers – with very few problems. However its been on my TODO list to upgrade since maybe 2008. I finally got around to updating it.

Screenshot of the webtrees homepage.

Continue reading “PhpGedView, SourceForge and the US Government”

TwentyTen wordpress child hacks

Having planned to do the work to combine my two previous blogs together, I thought I’d take the opportunity to upgrade to the very latest WordPress 3.0 version, which includes the all new default theme TwentyTen.

This is already a very nice theme – a much improvement over the last default. It’s also very easy to customise to your own preference, for instance you can change the background colour and add a picture to the background and change the header image all with a few clicks of the mouse. It also makes a very nice base theme.

Continue reading “TwentyTen wordpress child hacks”

Auto Redirect from Blogger to WordPress

Here’s a useful bit of Javascript that will redirect your old Blogger blog account to your new, self hosted WordPress blog account once you’ve imported all your old blogs.

It uses the search function in your new account to list the possible matches (usually just the correct one!). It works this way because the blog names on blogger are rarely the same as in wordpress, but it encourages people to update their links by showing them it’s different. It also displays a helpful message.

Continue reading “Auto Redirect from Blogger to WordPress”

CanvasZoom – HTML5 Canvas and code

You may have seen the program Zoomify, or similar programs like, OpenZoom and DeepZoom, which quickly display large resolution images on websites without large amounts of data being downloaded – only the part which is needed is downloaded. Most of these applications use some kind of plugin to work (e.g. Flash or Silverlight), so I wanted to see if we could create one without any plugin, using only the HTML5 standards.
Continue reading “CanvasZoom – HTML5 Canvas and code”

3D Printing thingi’s

520px-Mendel
Just back from a very interesting seminar at the University of Oxford entitled: “Copying the Means of Production to the Proletariat” – yes, that meant little to me too – basically it’s about RepRap – the Replicating Rapid-prototyper (more commonly known as a 3D printer!)

The talk was by Dr Adrian Bowyer from Bath University, who’s been instrumental in building this type of 3D printer. His specific work has been in creating a 3D printer that can effectively print another copy of itself – so one printer can build the next printer. It’s not designed to be 100% printable however as that would mean much of it would have to be glued together rather than bolted as in the photo, which would effectively rule out experiments, improvements and tweaks of the printer. The current design, the “RepRap II: Mendel”, has about 50% printed parts. (I’m not sure I agree with this though, I think many people would be very happy to have a fully, 100% printable (well 99%), 3D printer, they’d be so handy to have. You could print spare parts once it’s running, and if a better one comes along, print the new one and recycle the old one back through)

Continue reading “3D Printing thingi’s”

CSS IE Media Query Hacks

I’m not a fan of CSS hacks, they are totally unstable and unpredictable pieces of code, usually built on top of another bug… but… unfortunately the way of the web has made it almost impossible to avoid them – I find myself facing a problem I can’t get around without one.

The problem here is CSS media queries and our old fiend Internet Explorer. Internet Explorer only understands the very basic media types such as: media=”screen” but fails to understand media queries like media=”screen and (min-device-width: 450px)”. When it doesn’t recognise this it simply ignores it – that means whole sections of styles are just ignored, and your pages will look completely different to how they are supposed to.

Continue reading “CSS IE Media Query Hacks”