Category: Life

Random thoughts on life

  • Work and the art of PC maintenance

    If you didn’t know already, I work in IT support. I started off, briefly, in my career performing mainframe development. However, being a creative sort, I soon got tired of programming dull batch applications, all of which were similar to the last. The one highlight was learning about DB2 and being sent on various advanced SQL efficiency courses – nerdy, technical but brought out the analytical side of me.

    But I moved into Support. More specifically, EPOS support. One of my managers was, shall we say, not a “man” manager. His inter-personal skills lacked but he was very technical and so, whilst still getting on with the “day job”, allowed you to perform side-projects that could tax your artistic side. One of those projects won me an award for IT Excellence.

    As the IT department changed, the EPOS support and development teams were merged. But as emphasis on making money took over the support team was whittled down to… me. And my manager, now a different person, had no time for me or my work. I was desperately unhappy.

    So I hatched a plan – I bypassed various levels of management and sold it directly to the director of support at my company. He liked it and I moved out the team (now known only as a development team) and back into a support team “proper”.

    New people, new desk, new things. And for a few months it was exciting again. But now, I’ve realised the work is still dull, easy even, and nothing I haven’t done a million times before. When in my previous team I tried the escape route – but 18 years at the same company didn’t make me saleable. It just made me stagnant and the few job interviews I had went badly. I want out of support now. Ideally, I’d like to get into web development – something that’s still new, exciting, cerebral and interesting to me. Unfortunately, it doesn’t matter how many websites I’ve worked on, I have no commercial experience. And I don’t own multi-hundred-pound development tools – I write everything in code, by hand. Personally, I think the latter is the better, but what do I know?

    Actually, no, what I’d really like to do is go into teaching. It’s something I’ve always wanted to do. Sadly, I don’t have a degree so the doors are firmly shut (no matter what my experience is). One option, in time, is to take an Open University degree. That’s certainly something I’ll consider. In the meantime, I’m back to the job hunting – but I’ve learnt my past lessons of going to recruitment agencies, so will be avoiding them this time.

    So, if anybody would like to offer me a job (and with a family and mortgage, I need something permanent), you know how to contact me. Google, are you listening? 😀

    Meantime, I feel like I’m doomed to wander the planet alone forever. Like the Incredible Hulk1.

    1. The Wedding Singer ↩︎
  • Jingle Bells, Jingle Bells…

    Ah, barely into October and I’m discussing Christmas already. Well, if Tesco can set up an entire aisle of Christmas snacks then, yes, I can.

    We went shopping tonight and because of the aforementioned aisle we’ve started our Christmas shop. Organised, yes, and damn useful. Every week we buy a couple of items we’d normally buy for Christmas – snacks, food items to go towards the Christmas meal, drinks, Christmas tree decorations, advent calendar, etc. And by trickle buying it we hardly notice it in the budget. Oh, and you avoid the last minute rush later on with a sense of self-satisfaction (and smugness).

    Having said all that, I can’t see the point of the Mince Pies which go out of date in November. Or the Cheese Footballs (a Christmas essential) that only last until the end of December. Some things have to be bought later.

    But we did come back with some After Eights and an individual Christmas Pudding (my wife doesn’t like them).

  • PHP image thumbnails

    I mentioned in a post yesterday that I also use PHP to generate image thumbnails. The idea is that any new photos I simply upload to the BMTG site, with a Picasa caption attached, and the site should do the rest.

    Thumbnails are generated on-the-fly but only once as, once created, they are saved and re-used.

    if (!file_exists($thumb_filename)) {
    
       $src_img=imagecreatefromjpeg($full_filename);
       $old_x=imageSX($src_img);
       $old_y=imageSY($src_img);
    
       $new_w=round(($old_x/$old_y)*100);
       $new_h=100;
    
       $dst_img=ImageCreateTrueColor($new_w,$new_h);
       imagecopyresampled($dst_img,$src_img,0,0,0,0,$new_w,$new_h,$old_x,$old_y);
       imagejpeg($dst_img,$thumb_filename);
       imagedestroy($dst_img);
       imagedestroy($src_img);
    }

    $thumb_filename should contain the filename of the thumbnail and $full_filename is the filename of the original image (that the thumbnail is taken from). In the case of this example I’m creating thumbnails that have a height of 100 pixels and maintain their ratio, hence the width is variable.

    The above can be made a lot more compact, but I’ve expanded it out to make it easier to follow.

    By the time the code has finished, if the thumbnail didn’t already exist, it now does. Make sure the folder that the thumbnails are stored in has the appropriate permissions though!

  • Router fixed!

    My earlier issues with my router have been fixed! But I’m not quite sure what it was.

    Last night, after having done some research on the ‘net, I decided to try and sort the problem out. First of all I removed the WEP security (yes, WEP) and tried the Wii… still not connecting. So I turned WEP back on, but at the same time turned the wireless off and on again. I then changed the channel to 11 (there are other people nearby on this channel but I know the Wii is supposed to connect quicker on this particular channel).

    I then tried the Wii again… success. And the SoundBridge came on too.

    Ok, so it sounds like there was interference on the channel I was on. Except, according to NetStumbler, nobody was and I was getting a clear frequency before. I think when I got my new router I set it to channel 3, but having looked at my past post on changing channels I think I was on 4. Now that might explain why the problems have only started since I got the new router, but I don’t understand what the channel issue was.

    Oh well, NetStumbler shows channel 11 to be coming in loud and incredibly clear and all now appears well. But still, all a bit strange.

  • Reading Picasa captions in PHP

    Ok, it’s going to get technical.

    Although I’ve recently bought Photoshop Elements, Picasa used to be my photo browser of choice (in fact it still is as I get used to Photoshop). Therefore when I wanted an easier way to add photos to the BMTG website, I developed it with Picasa in mind.

    Apart from the site generating its own thumbnails, it also gets its description from the embedded Picasa data. I found out the data after reading on the PHP site about looking at EXIF and other image data and writing a program to display it all – this revealed the Picasa caption field.

    However, it did seem to have an anomaly in that it ended with a null character. I therefore coded around this. Unfortunately (depending how you look at it) with Picasa 3, this appears to have been fixed and so recently described photos are being truncated on my site. It’s not too much of a hassle, though, to detect for this. The code I use is as follows…

    list($width, $height) = getimagesize($full_filename, $info);
    $iptc = iptcparse($info["APP13"]);
    $description = $iptc["2#120"][0];
    if (ord(substr($description,-1))==0) {
       $description=substr($description,0,-1);
    }

    Simply populate $full_filename with, well, the filename of the image. At the end of it all the Picasa caption will be in $description and the image width and height in $width and $height.

    The last line of the code is where I’m working around the null character at the end of the caption (or not).