Category: Life

Random thoughts on life

  • VAT rate change. Should we expect anything different?

    Many people thought that retailers WOULDN’T drop their prices to accomodate the drop in VAT rate from Monday. Today, I received an email from a company that I’m affiliated with. I’ve changed the text to hide the guilty parties identity:

    Further to the announcement that UK VAT will be temporarily reduced from 17.5% to 15%, [we] will not be making any changes to the recommended retail pricing of [our products].

    The cost to [our company] of updating its internal systems to reflect the change in UK VAT is such that the company would have been forced to increase the prices.

    What a load of cock. It doesn’t cost anything to drop the prices of your products – just change a figure in database somewhere. It’s just that the VAT rate changes isn’t a huge amount, so companies simply can’t be arsed.

    Strange then that the retailer I work for is currently busting a gut to get the changes out. This is a brick-and-mortar business which will have huge problems getting an entire estate of stores changing the physical labels in time, let alone anything else. But it’s being done because they don’t want to be seen fiddling the customer. In comparison the business above sells software – online or in shops. It doesn’t run any shops and the amount they’d have to do would be minimal.

    It really is pathetic.

  • Steps removed and sequence shortened

    If you’d caught the recent iPhone adverts on TV, you’d have seen them demonstrated just how quick it is to go online and downloads new apps. It really is rapid.

    However, it all ends with a small disclaimer stating “Steps removed and sequence shortened. Network speeds may vary.”

    In other words “look how quick it is, except it isn’t really.”

    My prediction that something as blatantly false as this would get pulled. And the ASA have. Good (Okay, I’ll admit that I’m not a big fan of Apple. Their products are more style over substance and I don’t like the way they lock in their products and manage to get away with the kind of anti-competitive practices that get Microsoft in so much trouble).

    Apple say that the speeds being demonstrated were “relative rather than absolute in nature”. Basically, that the new iPhone is faster than the old version. But that isn’t what came over. In fact I can’t remember any text or voice over stating that it was a comparison of “old vs new”. Odd that.

  • It's a barcode Jim

    Ahh, the new Star Trek movie. I’m really looking forward to what JJ Abrams makes of it. And the new trailer looks pretty damn good too…

    [wp_youtube]lmJO3ppLBsk[/wp_youtube]

    Anyway, after thumbing through some still images from the film, I came across this one showing, I assume, the bridge of the Enterprise (that’s Chekov at the helm)…

    But, hold on, look at the middle of the navigation console. Isn’t that a role of duct-tape surrounded by a couple of Symbol Cyclone scanners? Sad and geeky I know, but I work in Point of Sale, so I recognise these things.

    So, here’s my take on converting your work desk to look like the bridge of the Enterprise (I didn’t have a thick role of duct-tape so I used an almost empty role of parcel tape)…

    Pretty realistic I think you’ll find.

  • Reading RSS with PHP

    After using the JavaScript only and generally pretty poor facility within Feedburner to embed RSS feeds onto a website, I set about an alternative solutions.

    Thankfully, there are a number available. However, many offer little embedding options and I wanted something that gave me full control. This narrowed it down to 2 free downloadable scripts. However, as much as I tried I couldn’t get them to work properly.

    Everything went well until it came to a link in my item description – then the less than/greater than signs would mysteriously disappear. Bizarrely, if I used the option to run it from the authors script from their site, it worked. So I can only assume it’s a configuration on my server. However, I’ve not been able to work out what it is.

    Now, PHP has built in XML parsing options and this is what these scripts were using – and I’m guessing the configuration option in question was to do with that. So I gave up and decided to write my own alternative. It doesn’t use XML parsing but simply reads the whole file in and extracts the details I need – in this case title, description and date. The code is below – pass the RSS feed into it by assigning it to the variable $rss_feed.

    $array=file_get_contents($rss_feed);
    $i=0;
    while ($i!=1) {
      $item_start=strpos($array,"<item>");
      if ($item_start===false) {
          $i=1;
       } else {
          $item_end=strpos($array,"</item>");
          $item_length=$item_end+7-$item_start;
        $item_strip=substr($array,$item_start,$item_length);
    
          $title_start=strpos($item_strip,"<title>");
        $title_end=strpos($item_strip,"</title>");
         $title_length=$title_end+8-$title_start;
        $title=substr($item_strip, $title_start+7, $title_length-15);
    
          $pubdate_start=strpos($item_strip,"<pubDate>");
          $pubdate_end=strpos($item_strip,"</pubDate>");
        $pubdate_length=$pubdate_end+10-$pubdate_start;
          $pubdate=date("jS F Y",strtotime(substr($item_strip,
    $pubdate_start+9, $pubdate_length-19)));
    
          $description_start=strpos($item_strip,"<description>");
        $description_end=strpos($item_strip,"</description>");
         $description_length=$description_end+14-$description_start;
          $description=substr($item_strip, $description_start+13,
    $description_length-27);
    
        $array=substr($array,$item_end+7);
     }
    }

    I’ve left some of the code expanded – for example there is no need for each field to be calculating and storing the end position as this could simply be placed within the length calculation. However, so you can see what I’m doing I’ve left it as it is.

    So, during each iteration you will have 3 fields available for you to use, and probably display. They are $title, $pubdate and $description. $pubdate is converted into a more readable format using the date command, but the parameters can be easily changed to format it in another way.

  • Clampdown on excessive speeders

    The government are to introduce new laws which would see “anti-social” speeders being given even more points on their licence.

    Now, I wouldn’t have an issue with any of this if we saw similar measures being put in place for other types of dangerous driving. But we don’t. Around where I live, I NEVER see a traffic “cop”. You could pretty much drive how you want and the only way you’d get caught is by one of the many, many speed cameras. And the fact that local roads keep changing from 30 to 40mph speed limits and back again means that it’s very easy for this to happen.

    I could chug a bottle of gin, drive without my glasses on and veer all over the road and go unchallenged (unless by another drive).

    Shadow transport secretary Theresa Villiers said ministers needed to realise that if they wanted to get tough on the most anti-social drivers, they would not catch them with speed cameras.

    Quite right. Once again, it’s a lot of bluster, making the speeding motorist appear to be the only dangerous drive there is.