Friday, 21 November 2008

Agent Cody Banks at Halifax

Got up about 8am this morning. After breakfast started checking my emails, then had to get Granny breakfast and do a bit of washing up. Finished checking my emails and also did some reading about developing websites that work on mobile browsers. Dreamweaver has a thing called 'device central' where you can test how your site works on a phone, but it doesn't seem to give you any error messages so it's hard to tell what the problem is when your site doesn't work properly.

There is a good article on sitepoint about Designing for the Mobile Web, and that has a link to a mobile browser emulator, although I'm not sure how useful that emulator would be since it seems to be based on a mobile browser that isn't used in any handsets. At the moment only offline browsers are of any use to me since I'm developing my site on my own PC.

I checked hotukdeals, and then deviantart and dpreview canon lens forum while I was waiting for the Adobe Design CS4 to install. Unfortunately it wouldn't install as I don't have Vista x64 SP1 installed. I don't really want to install SP1 as it will break peerguardian, so I think I'll stick with CS3 for the moment.

I did a bit more work on my website, and was wondering if you can use labels for non form elements like divs. I googled and found this useful article: Inaccessible Label-Wrapped Form Inputs, while not directly answering my question is helpful. It says that you shouldn't wrap inputs inside a label (I always thought that was weird), as whilst it is standards compliant, some screenreaders and Safari for Mac sometimes don't interpret it properly. Another good article about accessible forms is: Creating Accessible Forms.

After lunch I did more work on my website. I had a problem with an sql query, and it took me quite a while and a quite a bit of testing to find out what the problem was. The problem was that I had a field that was set to not null with a default value of '0'. So I thought this meant if you try to insert a null value, it will default to 0. But actually, you can't have default values on non null fields, so it didn't work. After finding this out I just changed the field so it doesn't have a default value, and changed my php code so the value to be inserted is checked and given a value of 0 or 1 before it is inserted.

Another problem I had was inserting a date into the mysql database, after some testing and googling I found you have to use STR_TO_DATE() (which is the same format as DATE_FORMAT()) to do it.

I was trying to do some checks to make sure that the date entered was valid and in the correct format, then I found there was a php function checkdate() that can do this, much easier and less code than checking the date manually.

After dinner I watched The Office (US) with Mac. Then I did a little bit more work on my website, then watched part of an episode of Lost until Ben had to go to bed partway through, then watched HIACGMOOH with Maccy. All the people on it were annoyed with Timmy Mallet because he thought it was funny (it was) when Robert Kilroy-Silk got covered in gunge. The show is sponsored by Iceland, and they have these short ads at the start and end of every ad break (About 1/3 or 1/4 of the show is ad breaks). For some cheesun they decided to set their ads up so that Kerry Katona and some old fat bloke who apparently won it last year are drunk at some rubbish party. The old fat bloke also has magic powers and can make plastic spoons with prawns on them appear! I think it's what you'd call de-advertising, although as Maccy said quite a lot of ads seem to be anti-ads, trying to persuade you not to buy a product.

Food
Breakfast: Strawberry jam toast sandwich; cup o' tea.
Lunch: Mature cheddar cheese with iceberg lettuce sandwich; clementine; slice of cherry genoa cake; Fox's triple; cup o' tea.
Dinner: Quiche Lorraine (thankfully not Kelly); potatoes; baked beans; peas. Pudding was a big choc chip chocolate cookie. A monetary payment for the sudden noisy expulsion of air from the lungs that clears the air passages.

No comments: