Roundup 06/07/08

Sunset over Lake Windermere Ooo what a cool date (note my dates are in the UK version of Day/Month/Year, in case that wasn't already obvious!). So we're into the first week of the second half of the year. Where does the time go?! This week hasn't been so great. On Tuesday evening I started to suffer with a pain in the lower right of my back. I've had this before, sometimes a minor twinge, but 2.5 years ago I had a kidney infection which caused just as much, if not more pain. Obviously my main concern is always something like this happening again. On Wednesday I woke up in even more pain and by lunchtime I had to go back to bed as I just couldn't sit in my desk chair. Luckily the tennis was pretty good on TV! Thursday morning the pain didn't seem so bad so I assumed that it was possibly just a strained muscle (yes I guess there's a muscle there somewhere!) and managed to work until early afternoon, but then again I'd pushed it and the pain was worse again. However the pain has lessened each day so I can only assume it is a strain.

Fireworks, Bowness Besides that, I've managed to get through a few more photos and get my photos from our weekend to the Lake District up on Flickr. Whilst we were there they had this WoW Factor event on (WoW - Windermere on Water) which involved some french street artists hoisted up on a crane above the crowds and a fireworks show.

This week I also got my contract renewed with my mobile phone supplier, and got a new phone in the form of the Nokia E65. It's not a new phone (It was out about 15-18 months ago) but the difference between this and my old Nokia N73 is that it has WiFi so I can use it to check email and connect to the web for free when at home or near a free WiFi hotspot. I had wanted to get the N95 but the 'contribution' was going to be £170 which I wasn't prepared to pay. I probably should have argued over it, seeing as new customers get it and a better deal on their minutes etc for free, trouble is I don't need any extra minutes as I don't use the ones I have! Still, the phone does what I need it to do, make calls and check my email. When I was stuck in bed I was also using it to read through a website on jQuery, making my own notes. Obviously I can also go to Google Reader on it, along with other mobile enabled sites.

So not a very eventful week really. I've barely moved much!

Playing with jQuery

I've mentioned recently that I've had to start dabbling in AJAX (do we still write this in capitals?) and whilst my work has mixed both the Prototype and jQuery frameworks, I'm trying to learn jQuery and do everything in that so that I can drop Prototype. The main reason being that the jQuery framework is about half the size of Prototype, plus there seems to be more on the subject from what I've seen so far (also the calendar I'm using uses jQuery so it makes sense!).

I'm still on the learning curve, a very steep one at that, and have started at the beginning on Learning jQuery, which has been a good read so far, with clear explanations. I've also implemented a couple of scripts which may be of interest.

The Calendar

I've been working on a form that asks for a date input (amongst a million and one other options!). Initially I gave a drop down but the client came back asking for a popup calendar. As I'd started using Prototype on the site I was working on, I purposely went out and found a calendar that also worked on this. That was fine until the client complained that you could selected a date in the past. As this is for making bookings he wanted it to only accept present and future dates. Of course the PHP checked this, but he didn't want to have to submit the form to be told the date was invalid. That wasn't so hard, except then I was told that some options would also require the earliest date to be 2 days into the future. So I needed not only a calendar that would restrict the date on load, but also dynamically change depending on which options had been selected.

After a chat with a friend he pointed me in the direction of the UI Datepicker, which seemed to do everything I needed and more. It's taken a fair bit of playing and testing to combine the various demos together, but I've finally got it working exactly how I need it. On load it displays the available dates from 'today' onwards. Then on selecting certain options, this changes to perhaps from 'tomorrow' onwards or in two days time onwards. Certainly not standard requirements but definitely handy to have a good calendar that can deal with that.

Tabs

On another site I needed to get a tab system in place to allow more content on a page without overwhelming the visitor with it all on display. I looked at Dom Tabs and at first they seemed to do exactly what I needed, until I had to add in headers around each list item. That stopped everything from working, so a quick search for a new tab system found UI Tabs where you can see some great demos.

I've had a fair few fun and games with these. I originally found version 2 of the tabs, got them all working and then realised that they had come with an old version of jQuery (1.1.3 when 1.2.6 is available) and the next day I discovered the latest version! So I set about trying to get the latest version working but getting a download of the latest version just wasn't as easy or obvious. So today I went through the demo site, visited every page linked to, copied the source and got it working locally and then slowly transferred the content over to the site. Eventually I got it all running off the latest version of jQuery!

Lightbox

Finally, once I finally got the latest version of jQuery running, I could upgrade the lightbox script to prettyPhoto. This was relatively simple to add in, except that the gallery method creates a slot for every image linked, regardless of whether it's already been linked to. In the old lightbox it could detect this. For example, you have 3 images, and they also have a title/name below them. So you can click on the image or the name and get a larger view of the image. With the old lightbox it could detect this and just show you 3 large images in the gallery, but in this new script it shows 6 images, duplicating each one twice. Even if I set the 3 thumbnails to use gallery1 and the 3 titles to gallery2, it seems to note that there's only 3 images in the gallery but still goes by the order on the page in which the links are listed, and not by the gallery name.

Anyhow, small issues which are now irrelevant, as the site owner has changed his mind and picked a whole other lightbox script!

Prototype to jQuery

The main site I've been working on, which currently has both frameworks loading, requires just one other job moving over, which I've yet to learn. This is how to run a PHP file and subsequently write the result from that into a div or paragraph. I think the rest of my JavaScript is standard stuff and doesn't require either framework to run, and simply uses the DOM. So once I can work out this, probably simple, job then I can ditch prototype altogether.

Any other resources of learning for jQuery are welcomed. I may look at books at some point, but considering my ever growing library of unread books, an online resource may be looked at more initially!

Personal Stuff 29/06/08

Welcome to post number 500! Wow 500 posts on Stuff By Sarah alone (doesn't include my AIS posts), am quite impressed with that figure! I probably would have had far more if I didn't delete my earlier posts in 2004/05. Some were quite depressing and when I shifted over to WordPress I figured I no longer needed them around. Fresh start and all that.

Still, 500 posts of me rambling on, quite an achievement :)

So this week. It's not been so stressful as work has relaxed a little, giving me more time to get other projects finished off or continued. This week Wimbledon started which meant I'd either have Wimbledon running in a second window via the BBC site or I'd relocate downstairs to watch it on TV whilst working.

On Thursday we had a lunch appointment with a friend and so decided to take the afternoon off and go to the cinema. At the time we wanted to see the new film Wanted, which had been advertised as being released on Wednesday 25th. However on checking the cinema listings and the official film site, it wasn't released until Friday, so we found a different film to go and see. Yet arriving at the cinema we saw Wanted on the listings as being on to watch! Quite bizarre really, not sure what happened there, but still, 2 tickets later (courtesy of Nectar points) and we got to watch a pretty good film.

This weekend we hadn't had anything planned but a last minute call on Friday from Dave's sister has us going to a BBQ at theirs for the afternoon/evening. Despite the rain we've suffered this week, the weather luckily started to clear up and the rain held off for an evening of good food and plenty of drink.

However now I'm shattered, worn out and can't believe it's Monday and back to work at 8am! Roll on the weekend ;)

Sunday Roundup 22/06/08

Yay, the first Sunday in a while that I've actually posted on! This has been the first weekend we've had at home and not had to go anywhere in about 4-5 weeks. It's been bliss!

This week I've been working solidly on the site I've been working on for the past 3-4 weeks. I took the week off work to allow me to work fully on this project as it was due to go live tomorrow, however, by Friday and having still not received half the information I needed I was then informed that it had been delayed by 10 days! So that's £400 I've lost by cancelling my other work which I'm not overly pleased about. I've also been working evenings on other projects for other clients to try and allow me to get everything done. So it's all been a bit busy! The good news is that I've had to remind myself about a lot of JavaScript and learn a bit of AJAX too which is actually pretty cool (and yes, there's a non JS version for anyone who wants to point it out! ;) ). So now I'm hoping to try and take some time to learn a bit of JQuery as it seems the most lightweight of AJAX possibilities out there and the calendar I need to use is JQuery driven but the other AJAX I've got uses Prototype which is a lot bigger and bandwidth hungry.

Anyhow, off business and on to the week. Monday we started the day in a little village called Twice Brewed at Vallum Lodge run by someone we 'knew' via a forum both Dave and I frequent at times. We'd decided to take a trip over from the Lake District to meet the owners and had a thoroughly nice stay, the best of the 3 nights to be honest! Although after 3 nights of good food (and too much food!) and wine I started to feel it a bit! We spent the morning wandering around a Roman Excavation called Vindolanda, before driving home.

On Tuesday I had a meeting with the end client for the work I've been doing. I'm never a fan of having to pretend I work for another company and I wasn't overly comfortable in a room with 4 businessmen and me! After 3 hours and even more changes to the work I got to shoot home, work out another new quote (the 4th I think) and try and relax for the evening as the rest of the week and weekend was earmarked for work.

So the rest of the week has been work, work, work until Friday afternoon when I discovered I had a further 10 days to do the work in. Yes it's great to have more time but frustrating all the same.

Yesterday I got my first batch of Asterix the Gaul books through. Why? Well I saw them at Vindolanda and I had intended to grab a couple whilst I was there, but it slipped my mind by the time we'd gone around the museum. So once I was back home I checked on Amazon and found virtually all of them available in paperback, so I've added them all to my wishlist and also bought the first 4 books. I can always remember when I was younger I'd go to the library with my Dad. I'd spend about 5-10 minutes finding 3 books to check out and then I'd go and sit by the Asterix and Tintin books and sit and read them. I loved them! I much preferred Asterix over Tintin though. So when I saw them again it reminded me of those times and also I wanted to read them all again. At about £4-5 each they're not too badly priced and I can buy 3 every so often to get the free delivery from Amazon!

We've also had the first strawberries out of the garden this weekend. I've got around 20 plants in total and picked about 2lb of strawberries so far. They're massive, juicy and sweet! Of course they're also good for you and don't raise your blood sugar much like other fruits do. There's still plenty more to come!

Personal Update

It's been a bit quiet around here lately due to business being exceptionally busy. A quick job has turned into a major job plus I'm also trying to continue to co-ordinate other work going on between the various people concerned. So work is a bit stressful right now, I've been working around 8-10 hours each day and then all my spare time has been taken up with various events going on each weekend.

At the start of June we headed up to Preston to visit our ex-housemate and his girlfriend, as they were having a BBQ. We stayed up in a motel for the night up there but unfortunately by the Sunday evening Dave was suffering from mild food poisoning and was then wiped out for the next 2 days, leaving me to do his job as well as mine! Thankfully he got better towards the end of the week, certainly not something I'd recommend having!

Last weekend it was my great Aunt's 80th birthday so my parents came up here and we all headed over to Manchester where her daughter lives and was throwing the party. A lot of my Dad's family were there, a mix of Irish and Manchester accents everywhere. Most of these people I'd either never met before or I was too young when I did meet them last, so it was nice to put faces to names I've heard in the past.

Then this past weekend was our long weekend away that I booked last month, being paid for by my bingo win. We had 2 nights at a guest house in Bowness on Windermere, in the Lake District. It was a nice place in a very peaceful setting. We headed up on the Friday, checked in and then my first port of call was the flagship store of Lakelands, a shop that sells a lot of handy kitchen equipment as well as other home stuff and garden bits too. We bought a few things we'd been needing or meaning to get for a while. On Saturday we went to Milom for the morning, an RSPB area. It was a nice enough place but there wasn't much to see there. Then in the evening there was a big show going on in Bowness so we saw a human mobile consisting of drummers suspended from a crane, plus a fireworks show. Photos to follow!

Then yesterday we drove up to a little place called 'Twice Brewed', a village by Hadrian's Wall in Northumberland. We were going up to visit someone we know off one of the forums we frequent who runs a guest house up there. We also went to look at Hadrian's Wall (well part of it, it's quite long!). Then today we headed back after a morning looking around a Roman Excavation place near by where we stayed. However now I'm feeling a little rough (too much good food and drink methinks!) and need a holiday to recover! Unfortunately I've got a very busy week ahead, so much so I've taken the rest of the week off from my contract job to allow me to concentrate on everything else! Hopefully after this week things will calm down a little and I can get back to my normal routine.

Photos to follow, just have to process them :)