Honda Headlights

I took my car (a ‘98 Honda Civic 1.4i illusion - I bet you’re so jealous) to the garage today. I’ve had a recurring issue with the headlights.

Last week I got into the car on my way home and drove about a mile before I realised that the only lights that were working were my sidelights. Shit. In my defence, I was on very well-lit roads until I realised.

The weird thing was that both headlights had gone at the same time. And the main beam worked. I’ve found out since that the main beam and dipped headlights are different filaments of the same bulb.

I pulled over at the first appropriate place, lifted the bonnet and had a fiddle about. Nothing worked. I slammed the bonnet down wondering what the hell I was going to do - it wasn’t safe to drive home, and it certainly wasn’t safe to pick ‘the bairn’ up from the childminders, so I was about to phone my wife and ask to be rescued. However, when I slammed the bonnet down I suddenly saw the light - my headlights worked!

The same thing happened the following night - no lights –> slam down bonnet –> lights come on. Then the next day, the passenger side suddenly stopped working. But I had one headlight so I continued until the weekend.

On Sunday, I looked under the bonnet in broad daylight and played about with the bulbs.  Both suddenly worked.  Fantastic.

Last night was a bit different.  The only light that worked was the driver-side one.  I tried slamming the bonnet down.  I tried fiddling with the bulb.  But nothing worked.  Then when I pulled away from the childminder’s house I had no lights at all.  And neither of my two techniques worked.  Shit.

Anyway, to cut a long story a bit shorter, I took it to the garage today and they changed the bulbs and the headlights worked.  What?  Now answer me this - if the bulbs had gone, how come slamming the bonnet down made them last another couple of days?  And how did they both go at the same time?

I have a feeling that my less-than-gentle approach to car maintenance might have shot the two bulbs, but the fact that I managed to fix them momentarily suggests that there is a more fundamental issue.   Undoubtedly I’ll be on my way home sometime next week and the lights will pack in again.  I’m 99% certain that new bulbs aren’t the answer to my problem, but hey, I’m not a mechanic (or I might have tried something a bit more sophisticated than sticking my finger in the light fittings).

By the way, the car shown isn’t mine. It’s just an image I got from the internet of a very similar car to mine. I hope this one is in better condition than mine because they are selling it for silly money.

Continue reading

,

Joomla Template

I’ve been tasked with developing a website for my sister-in-law. It’s not an easy task - I assure you.

She’s opening up a nursery in her house (it’s a flippin’ huge house), and she wants me to do a website.  The brief I’ve got is pretty broad, which actually makes it more difficult to do a design.  She wants it to be predominantly black and white, but with accents of green, blue, yellow and red.  I said I’d wait for the graphic designers to get back to her with a logo design and the literature so that I can make the website design complement their corporate image.  Which is a nice way of saying that I’m really struggling to think of a design that meets those criteria, says ‘nursery’, and looks freakin’ awesome.

What I’m thinking of doing is something that resembles a blackboard (chalkboard - is that more PC?).  I can use a black background, with some ‘chalky’ writing, some pictures of chalks on the header (in the four colours), and take it from there.  It might actually work better with paper and crayolas or paint or felt-tips, which would make the colours more vivid, and a black background for a nursery site might be too dark.  I’ll keep you posted…

In the meantime, I’ve installed Joomla on my server and pointed her domain name to that.  I’ve put the text in that she wants and I’ve spent an hour or so designing a nice, plain, elegant template that will do for a couple of weeks until I get the real design done.

So here is that basic template.  It works with Joomla 1.5.  It’s black and white, with a kind of penguinny theme.  I think it looks nice, BUT, it doesn’t scream ‘nursery’ or ‘child-friendly’.  It screams ‘blog’.

But if you want to use it, feel free.  It’s my first attempt at a Joomla template in a long time and it’s really basic.  It might be good to use as the basis of a project.

download template

Continue reading

,

My Dissertation

I originally bought the scitor.co.uk for use in an experiment that formed the basis on my masters dissertation on Search Engine Optimisation.  I studied Web Information Management on a distance learning course for two years and at that time this was something that really interested me.

I decided to work out what Google looked for when indexing a page.  I read a load of books on Search Engine Optimisation (which was really interesting…), and I took the main theories that these people said Google looked for and applied them to hundreds of pages at scitor.co.uk. 

I found the following things to be true -

  1. The more regularly a page is updated, the higher Google will rank it
  2. The more links in a page gets, the higher Google will rank it
  3. The more relevant a domain name is to a keyword, the higher Google will rank it
  4. The keyword being searched for needs to appear a few times (but not loads)
  5. Proper title and H1 tags are very, very, very important.
  6. The content on the page has to be relevant to the search.  If you’re searching for ‘football’ and the page contains ‘Manchester United’, ‘Real Madrid’, ‘Celtic’, ‘Everton’ etc it will rank higher than a page that mentions ‘football’ in passing.
  7. Google doesn’t really like ‘get’ variables in a domain name (ie ?var1=1&var2=2&var3=3 etc).
  8. Google isn’t that concerned about white text on a white background (although that probably isn’t the case over time).
  9. Use 100% as the text size and you should be alright.
  10. If you use an image as a link, with a relevant ‘alt’ tag, it will be deemed more important than a plain text link
  11. Randomly generating text from the scripts of Star Wars, the Jungle Book and Ghostbusters makes for some really, really, really weird passages of text.

So anyway, here’s a copy of the dissertation to download.  Use it as you see fit.  Personally, I’d stick to the following and ignore what everyone else says -

  • Keep the site up-to-date
  • Make the design appealing to humans
  • Don’t bother with meta tags unless you can really be bothered
  • Have relevant and interesting content
  • If you have something really good/really useful add it to stumbleupon/digg but don’t add everything.

If you do that, people will start to link to you, and as such Google will like you.  Simple really.  You could be aggressive about it and force links from elsewhere (add your website to comment on blog entries, forums, directories etc), but in honesty it’s the natural, word of mouth marketing that gets you the best results.

Download it here

Continue reading


Python and SOAP

I’ve been trying to do some SOAP work with Python and it’s proved to be more difficult than I originally anticipated.

SOAPpy has always seemed really straightforward on the client side.  Just import the library, tell it the server URL and start sending it your functions.

For example -

import SOAPpy
url = ‘127.0.0.1:8000/soap/’
server = SOAPpy.SOAPProxy(url)
SOAPpy.Config.debug = 1
server.callFunction(var = ‘this is the variable’)

Dead easy.

But what if the SOAP server application is a bit more complex than that?  I’m trying to invoke a SOAP request where the SOAPAction is differently titled to the top level of the SOAP Body.  Here’s an example of the XML code they’re after -

<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAPENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsi=”http://www.w3.org/2001/XMLSchema -instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema “>
<SOAP-ENV:Body>
<nn:soapRequest xmlns:nn=”http://theschema.com/”>
<meSend>
<request>
<message>Message Goes Here</message>
</request>
</meSend>
</nn:soapRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Which all looks fine and dandy, until you realise that instead of wanting you to send then soapRequest as the SOAPAction, they want mySoapReq…  (I’m paraphrasing in case the server writers don’t want me talking about their server like that).

The documentation on SOAPpy isn’t good.  It’s actually very poor.  The best tutorial I’ve found is here - http://www.diveintopython.org/soap_web_services/index.html, and even that isn’t great.  It’s good for the basics but not stuff like this.

So what did I do?

After much deliberation and a lot of nasty errors from Python, I did this a different way.

I used httplib rather than SOAPpy.  And guess what?  It worked like a dream.  So here’s my code -
import httplib
conn = httplib.HTTPSConnection(”soap.theserver.com”)
conn.connect()

soapstr = “”"<SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:SOAPENC=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsi=”http://www.w3.org/2001/XMLSchema -instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema “>
<SOAP-ENV:Body>
<nn:soapRequest xmlns:nn=”http://theschema.com/”>
<meSend>
<request>
<message>Message Goes Here</message>
</request>
</meSend>
</nn:soapRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>”"” %(userid, pwd)

conn.putrequest(”POST”, “/soap”)
conn.putheader(”Content-Type”, “text/xml; charset=utf-8″)
conn.putheader(”Content-Length”, str(len(soapstr)))
conn.putheader(”Accept”, “text/*”)
conn.putheader (”SOAPAction”,”mySoapReq”)
conn.endheaders()
# send soap string
conn.send(soapstr)

# get the HTTP response
theResponse = conn.getresponse()
theXml = theResponse.read()
return theXml

I just needed to do some playing about with the returned XML (using SAX), and Bob’s your uncle - it worked!  It’s not the most elegant of solutions, but hey, it worked for me!

Now all I need to do is invoke a SOAP server using Python/Django AND use the same stupid formatting that the people who wrote this server used.  Which will be fun.

Continue reading

, ,