Alan on March 17th, 2010

As any website developer will know, as well as actually building new websites and developing new features we are constantly having to fix things that go wrong. It isn’t just me, we are all the same. We write scripts and build applications just the way we think they should be, only to find bugs and then spend twice as long tweaking them to actually get them working. As a freelance website designer I can spend quite a bit of time getting to the bottom of problems that occur from time to time. Sometimes this is frustrating, but fixing them and getting everything running smoothly again is a satisfying experience.

Today I discovered that the attaching of image files on one of my sites had stopped working. Now, I know it was working a couple of weeks ago as a PHP upgrade had rendered it broken for a while and I’d fixed it and tested it thoroughly. All was working fine. Until today that was.

First stop therefore was the code I’d fixed a couple of weeks ago, all seemed OK there and after some investigation all seemed to be working fine. In fact, the images were being uploaded and added to the database as they should be, it seemed therefore as though the problem was further down the line when it came to displaying these images within a post.

I looked at some older posts and the images were being displayed as they should, the images for newer posts were being uploaded but were not being displayed… This puzzled me for a while as they use the same files and database, but then I noticed a problem with the database structure.

The post_id column in the image attachment table had been assigned a type ‘SMALLINT’. For those of you who don’t know, this means that the maximum value this column can have is 32767. The post_id column in the posts table was however correctly assigned as an INT, allowing it to contain much higher values

The site had recently exceeded 32,767 posts so when a new post was added with an image attached to it, the scripts were correctly trying to insert a post_id in the image attachment table with a value that exceeded 32767. The MySQL database didn’t like this and simply entered the maximum value it could which was 32767. This meant that the image was being added, but when someone viewed a post with an id of higher than 32767, and image associated with it had the wrong post_id so never got shown.

Simply changing the column type from SMALLINT to INT fixed the problem. Easy when you know how, but it had me puzzled for a little while.

It was satisfying to get to the bottom of it though, which means I can now have some lunch!

Alan on November 5th, 2009

Yesterday was my last day working at the university. I’ve been working as a website editor for a project there. The project is now ‘in limbo’ so my contract hasn’t been extended which means I’m back to being a full-time freelance website designer.

I shall continue working for the project on a freelance basis for a while, and I guess there is a slight possibility that this may continue long-term. In some ways this is good as I can continue working on the project but it gives me more flexibility time-wise and I don’t need to drive into Aberystwyth twice a week.

There are also things that I’ll miss. The security of a guaranteed pay-packet each month is one of them, along with things like sick pay and holiday pay. Working alongside like-minded colleagues will be missed too, as of course will my lunch-times with Anna or my lunch time swims and coffee breaks with colleagues.

Onwards and upwards.

Alan on November 4th, 2009

I’m about to start work on building a new website for a new client. It’s a fairly simple brochure style website and it won’t use any of the new ‘features’ of HTML 5, but I wonder if I should use the new HTML specification or not?

It might be a good excuse to build a new framework document using the semantic elements that I’ll be able to re-use on future projects and I’m going to have to start using it soon, so this could be an ideal time to start.

As far as I can see I won’t need to change much from my normal mark-up so there shouldn’t be too many issues that I need to think about. Although as usual, if I want to use the new semantic elements such as <header> then it looks as though I shall have to use a little bit of javascript trickery to keep Internet Explorer happy.

What do you reckon, should I use it, Yes or No?

Alan on October 29th, 2009

As a freelance website designer, I run various sites of my own, most of which have some form of advertising on them to help cover the running costs. One or two of them do provide some income, all of which helps us with our ‘Simple Life of Luxury’ and making the most of modest means in Wales.

Even this site that you are now reading, which has a relatively small audience, has a few Google and Amazon ads that help cover the costs of hosting and running the site. If people click on a Google ad I earn a few pence and if they buy something via an Amazon link I earn some commission. With such a small site, with low traffic it won’t make me rich but it all helps. The website was never intended as a money-making exercise, if it was then it failed and I would have stopped blogging ages ago. I simply write this site because I enjoy doing it, but if I can make a little money here and there whilst doing something I enjoy, then all the better.

Stats Spike

Stats Spike

Every now and then a particular post will of course attract more attention than others and boost traffic to the site. On such occasions the income from the site can increase slightly too, so it is always good to see the traffic stats spike. Normally I know exactly why the traffic stats have increased and it is usually down to the fact that I have covered a particular event and promoted it elsewhere in order to generate some interest.

However, this week I’ve seen a sudden increase to a certain post and views of that post have increased hugely. It was an insignificant post about some toy dinousaurs and the lack of scientific integrity that I posted a month ago, but it has become the most viewed article over the past couple of days, increasing total views to the site by about 4 times!

I’m not entirely sure why, and hits are still quite low in the grand scheme of things, but it seems as though the article has been featured somewhere on ‘Stumbleupon’ so lots of people have seen it and have followed the link through to this site.

Typically the post in question wasn’t monetised in any way, so always on the lookout for a way to earn a little extra I quickly added an Amazon Affiliate Widget to the post. It probably won’t amount to anything, but you never know, someone visiting the page might buy something and I might earn a few pence in commission.

Yep, that’s right, for my sins I’m a freelance website designer. Actually its a great job for funding my ‘Simple Life of Luxury’ as it allows me to be pretty flexible, it is also a fairly interesting job in its own way and no two days are ever the same. That said, most days do tend to follow a similar pattern, and I do end up working fairly regular hours. Many people wonder what I do all day (myself included some days!), so here is a step by step account of today, which may or may not turn out to be a typical day.

June 16th 2009 – A sunny day in West Wales

4.00 am Awake to the sounds of birds in the garden.
4 am – 6 am Snooze in bed
6 – 6.30 am – Get up and start the day.

Time to start with the daily chores. While Anna gets Morgan and his lunch ready for school I make a start on tidying the house, cleaning the kitchen, cleaning the bathroom, washing up, sorting out the laundry, and vaccuuming the house. Id on’t have OCD or anything but I can’t start work until the house is clean and tidy.

8 am – Anna leaves for work, I continue with the chores, clean Morgan’s teeth and see him off to school.
8.30 am - Start up computer, make coffee and eat a croissant, then sit down to check e-mails.

Thankfully I checked them last thing yesterday so there aren’t too many, 75 in the Junk e-mail box, so I just delete those without even looking at them! 35 in my inbox which I read through. 1 or 2 I can deal with immediately and do so, 3 or 4 go into my ‘Action’ folder and the rest get a cursory glance or a read and then filed / deleted.
Next I check a few websites that I run to make sure all is OK. Forces-of-Nature and catch up with the posts there. Same with the Ystwyth-MTB Club website. I also check a few servers and check a few accounts to see if I made any money from affiliate earnings, Google Adsense etc. yesterday. Nothing unusual there, some income but I’m not rich yet! Oh well, looks as though I will have to work today.

Twitter is next. I don’t try to keep up with everything here, but a quick check and then leave TweetDeck open to see what transpires throughout the day. Same on Facebook. Next I check my RSS feeds to keep up with various developments from the world of web design and development and other things that interest me. Too much information in most cases and nothing really catches my eye this morning, so its down to some proper work.

Today I start with the task of updating several installations of WordPress. First I make backups of the various databases and all of the files related to each installation. Then I overwrite the old installation with a new version, upgrade and test. For some reason my usual text editor and website management software (Coda) is playing up with several sites this morning. Everytime I connect to these sites the application crashes so I end up having to revert to some older ftp applications and do these upgrades in a slightly less efficient way than I would have preferred. It seems fine with most sites, but crashes when contacting a certain server. I’ll have to sort this out soon otherwise it will drive me mad.

By the time I’ve done this it is 11 am and time for another coffee. Not the most exciting of mornings, but I did get quite a bit of work done and for a change some of it was work that I was actually billing for, so I’ve made some money!

Whilst drinking my coffee I check my bank accounts and update my billing and financial software so that my accounts are up to date. I also write a blog post about a new compact camera I want to buy. This may not seem like work, but keeping my personal sites up to date is an important part of my weekly routine and it all helps with my online profile.

Next its time to look into the unexpected behaviour of Coda, but can’t get to the bottom of it so send a support request to the software developers. As soon as I do I try something else (removing the preview image) and that seems to fix the problem. Another e-mail to the developers and back to work. I’m not sure why this became an issue today when it has been fine for years, but at least I’ve found a fix and can get back to some proper work.

Time to start working through my ‘Action’ mailbox. First tasks are a few minor updates to a couple of websites. and the replying to a couple of e-mails. Followed by some more website maintenance.

Next on my list is the writing of a tender for a website design proposal, not something I enjoy too much and as its now 12:45 pm that gives me a good excuse to stop for some lunch. Whilst stopped for lunch I also take time to wander down to the end of the garden with the compost bin and shreddings, hang the washing on the line and spend 5 minutes in the sunshine admiring the garden.

1:00pm – Not the longest of lunch break, but it is back to work. Still avoiding writing the tender so set some server backups in motion first and then decide to treat myself to a slightly longer lunch break whilst they run and wander across to the beach to check the surf whilst listening to Digital Planet podcast. But as I’m about to leave I get a phonecall from a client saying their website is down. I check it and all seems OK. Then in comes a message from Anna with a task for me to do. Upload some images to our weblog.. I do this before heading off to the beach as well…. And then I get another phone call from someone thinking about buying a website template so don’t manage to go to the beach in the end!

It’s now 2 pm and the server back ups have finished and I feel as though I’ve done quite enough work for one day. I guess its time to write a proposal though. Not something I enjoy, especially as I’m sure half of the people I write them for already have a web developer in mind but need several quotes in order to get funding. Still, it has to be done so I settle down to that with a glass of orange juice.

2:45 pm – Tender finsished and submitted, it wasn’t that bad in the end! I could start some more work, but Morgan will be here in an hour so I think I’ll call it a day and go collect him myself. Just a few bits of admin to finish up and a phonecall to make then I head off to the school and into town to buy some bike bits.

4.30pm – Back from the school run and the sun is still shining so decide to take Morgan out for a play in the inflatable canoe on the seafront. Anna arrives home too so comes over to watch.

6.00 pm – Back from the beach, clean canoe, shower, check answer phone messages and think about checking e-mails but resist. Pasta for dinner.

7.30 pm – Sort out rear wheel on bike, convert it to ghetto tubeless. Morgan off to bed.

Time to settle down for the evening in front of the TV. Not something that I’m too good at, but do most evenings anyway. Quite fancied a bike ride really but watched TV and ate lots of unhealthy snacks instead before heading off to bed.

A fairly standard day really. I didn’t get stuck into any proper projects, but did do lots of little tasks, all of which needed doing, I got my inbox to empty and made all of the phonecalls I needed to make and I even earned some money! Same again tomorrow? Actually, no as I shall be working at the university, but no doubt Thursday will follow a similar patern.

Alan on May 22nd, 2009

I know, I know, now isn’t the time to buy and don’t worry I shall wait until WWDC in June just in case anything new is announced, but my Dual processor G5 Powermac is feeling a little long in the tooth now so I shall be upgrading soon.

The G5 actually does everything I want it to, but moving across to the Intel based chips and a newer operating system is overdue so that I don’t get left behind.

Question is, should I get a superfast shiny new PowerMac, a middle of the line iMac or would a super small and less expensive Mac Mini do the trick?

The PowerMac would of course be more than enough horsepower for me and has the advantage of being easily upgradable so I could stuff lots of RAM in it and just let it get on with whatever I throw at it. Having something that is a little more powerful than I really need also adds some longevity to the product meaning I won’t need to upgrade for a while again. I already have two monitors as well so I’ll be able to continue using those (although I may need adaptors for them). It is of course very expensive. Having a Quad-core processor and 6GB of Ram does sound tempting though, if only money were no object!

The iMac looks nice and is a little cheaper. I’d go for the 24″ model with 4GB of RAM, which should be enough. I’d like more but the upgrade to 8GB is just too expensive. The dual core chip would of course be quite an upgrade over my 2Ghz G5’s, especially if I went for the 3.06Mhz model. The downsides are that I’d be paying for a monitor that I don’t really need. But then, it is a nice 24″ Apple monitor!

Then there’s the Mac Mini.. A lot cheaper, but would it be sufficient? How would the 2.26Ghz Intel Core 2 Duo chip compare to my 2 x 2Ghz G5 chips? It might be a lot cheaper but would it be a worthwhile upgrade? Also 4GB of RAM is the most you can add. Probably plenty for now, but its always good to have the option to upgrade. Also, does it have a sufficient video card to power my dual monitor set-up.

Decisions decisions! I could of course just save my money and stick with what I have. I think I’ll at least wait until after WWDC and until Snow Leopard is out. At lest that way I’ll get the latest version of the OS with whatever I decide to buy.

Alan on March 25th, 2009

Hope you all like the new design of the site…

I wanted to have a change and also make links to the latest comments a bit more visible. These can now bee seen in the column on the right. It also allowed me to add a few extra things to the columns on the right such as the ‘Tag Cloud’.

I cheated of course by using the Amazing Grace template for WordPress. There’s little point starting such a project from scratch when there are so many great templates out there, and in this case I didn’t have to make too many changes either. I shall probably tweak it over the next few weeks as I settle into it and decide if I like it better than the old look.

Hope you can find your way around the new look OK.

Alan on November 14th, 2008

Those who know me or read this blog regularly will know that I fund my ‘Simple Life of Luxury’ as a freelance website designer which in many ways allows me to get my work-life balance just right. Although, as I’ve said elsewhere in this blog there are pros and cons to working from home and things don’t always work out how they should.

Being self-employed gives me the flexibility to work when I want to and get out an enjoy my surroundings at other times. Being my own boss also (to certain extent) allows me to choose what I do and when I do it. It does of course mean that I am almost always working and find it hard to switch off, that there is no one to work with on problems and such like. There is also the worry (especially in these uncertain economic times) that there is no guaranteed income, no holiday pay and no sick pay. If I’m not working then I’m not getting paid.

So, when a part-time job was advertised recently for a website editor working on a project based at Aberystwyth University I thought it looked like an ideal opportunity to add a little security to my cashflow and work alongside others. I applied for the job, got invited to interview and soon after was offered the job.

I started earlier this week and have yet to settle in fully but the team I’m working alongside seem good, the project itself is interesting and hopefully the promise of a guaranteed pay-cheque at the end of each month will take the pressure off a little. This should allow me to pick and choose projects for Pixelwave Web Design a little more allowing me to enjoy my ‘Simple life of Luxury’ without worrying too much about work. An added advantage is that I’ll be working a couple of days at the university so I’ll be able to meet Anna for lunch which will be nice.

The overall plan is to get the best of both worlds. Some security and the chance to work with others from the part-time job at the university and the flexibility and freedom of being your own boss by continuing to run Pixelwave Web Design.. Lets hope it works out like that!

Alan on May 16th, 2007

Sometime website development can be very frustrating, and as a freelance web developer with few people to turn to when I come across a problem I really get to experience the highs and lows.

Just the other day whilst working on a fairly complex project that I have on at the moment I came across a bug in my coding. The application I’m developing requires members to register and be logged in before they can access the data. This was all working well, the sign up process worked perfectly and the restrictions were in place, but then we noticed that when members tried to go to the 2nd page of a series of results they were logged out of the system and couldn’t access them. If they then logged in again they were free to go wherever they wished within the site as they should be.

It took me over four hours to track down the bug. I rewrote loads of things, checked that the sessions and cookies were getting written properly, tested, re-tested and tested again but all with no joy until I noticed a missing hyphen in a URL. All of that trouble due to a single missing hyphen, just a pesky little – !!!

For those in the know, what was happening was that my scripts were writing sessions and cookies associated with a domain with a hyphen, but the script that generated the links to the various pages were getting the base URL from a database. When entering the URL into the database I had omitted the hyphen.

Now, normally this would have been easy to diagnose as the incorrect URL would have thrown up a ‘domain not found’ or ‘page not found’ error. However, in this case, my client had also registered the hyphen-less domain name and had it pointing to the same server. This meant that the page was being found on the other domain but the user was logged out as the session / cookies had been written for the domain with the hyphen.

I have to admit though it was quite satisfying when I did eventually find the error, fixed it, tested it and all was working! I guess without little problems such as these there wouldn’t be any satisfaction to be gained from such activities.

Alan on March 25th, 2007

Sennheiser HeadphonesWorking as a freelance web designer here in deepest darkest Wales can be a fairly isolated job at times. Many of my clients keep in contact with me via email and I rarely even speak to some of them let alone meet them in person. They simply send me an email telling me what they would like me to do next, I do it and then send them an invoice. Because of this it is always good when I get feedback from my clients as it helps me improve and offer them the service they require.
I’ve recently been working for Headcandi, an online headphone and earphone shop and had an email on Friday saying that they were so pleased with my work they had sent me a present in the post… Well, it arrived yesterday, a pair of top of the range Sennheiser HD595 headphones. Now, I’m no audiophile but I can tell that this is a quality piece of equipment, excellent sound quality and very comfortable.
Of course, the fact that my clients are so pleased with my work that they took the time and thought to send these actually means more to me than the monetary value of the headphones themselves. It is always good to know that I’m doing a good job and better still to know that my clients appreciate it.