Category: Life

Random thoughts on life

  • Bandwidth Problems

    So, I’m into day 11 of this month but my hosting bandwidth (which was only recently doubled) is now at 75% used. What’s going on?

    Thankfully, Memset provide cPanel and a host of data analysis tools. As you can see from this graph it’s rocketed since mid-October.

    I’d love to say it’s because visitors have gone up as much, but that’s not the case. Looking at the biggest bandwidth hogging files, it’s exactly as normal – in fact nothing in particular is causing it.

    What did happen mid-October though is that I started looking and changing the site’s caching. I’d been using PHP Speedy with all options switched on (except for GZIP, which I had in my .htaccess file along with a few other tweaks) but was finding that was breaking Debug Bar and jQuery Lightbox For Native Galleries. You can exclude certain scripts from PHP Speedy but that didn’t seem to fix the problem.

    I therefore decided to try an alternative method. After some testing I settled on WP Super Cache (to cache the pages – this improved speed but not bandwidth as the same size results are delivered) and WP Minify (this combines and minifies the scripts – something that PHP Speedy did, but I could get WP Minify to work with the aforementioned Debug Bar and Lightbox scripts). I also retained my .htaccess changes.

    And that’s how it’s been since. The site’s very quick BUT it looks like the size of the pages being delivered are horrendous.

    The cause? Right now, I have no idea and I’m still tinkering – expect to see some site problems over the next few days as I try and resolve it.

    What I’ve immediately done is switch off WP Minify and put PHP Speedy back on. Oddly, it’s working with GZIP switched on – if the .htaccess changes are working, this shouldn’t work. I therefore need to check my .htaccess further. Maybe the changes made to this file by WP Super Cache have affected it.

    Certainly something has to be done with some urgency and if I have to I’ll abort all changes and had back to PHP Speedy solely (and break those other scripts). My hunch – GZIP isn’t working. Testing tools indicate otherwise.

    I’ll update this post, as it may be of use to other developers. And, of course, if you have any ideas please comment and let me know your thoughts.

    Update, 16th November.

    Sorted. Although online testing tools reported that GZIP was working, it wasn’t. Activating that has put my bandwidth back to normal…

    Through some further testing I’ve settled on using WP Minify rather than PHP Speedy. I’m also using WP Super Cache but note that this doesn’t affect bandwidth, only speed.

  • Managing your passwords – my recommendation

    Image courtesy of Joshua Davis

    When it comes to computer passwords there are 3 things I’d always recommend…

    1. Give each site, or piece of software, a different password – never re-use!
    2. Make your passwords complex
    3. Never record them in a spreadsheet!

    Basically, when I sign up to a site I find out how long and complex they’ll allow a password to be and create it to that limit! Up to 16 characters line with both upper and lower case and numbers accepted? Find, then it’s 16 characters of mixed case and numbers. The bigger and more complex the harder to crack. Short of getting one of the computer forensics degrees, here are some more tips for you.

    Many people use browser based solutions such as LastPass. Apart from the fact that these are restricted to your browser you are also leaving all your passwords with a single company in “the cloud”. A single security flaw and you could loose them all. Look at Sony’s issues this year as a perfect example!

    My solution is secure and isn’t tied to a browser. It’s downside is that it’s tied to only computers that I use (which many may also see as an upside!).

    I use the excellent open source KeyPass software. However, I use the portable version installed in my Dropbox folder, with an encrypted and secured password file saved also in Dropbox.

    The result of this is that wherever I have Dropbox on a PC I can access KeyPass and the resulting file. There’s even a version of the software for Android and I download the latest version of the password file using the Dropbox Android App to access it.

    Dropbox, by itself, is not secure. However by encrypting and securing the password file saved onto it even if someone gets hold of it they can’t access the passwords within it. As a result all my bank and other financial passwords, amongst many others, are long, complex and hard to crack – I can afford to make them impossible to remember because I don’t need to. And, although KeyPass won’t fill browser fields in automatically, it will generate highly secure passwords for you.

    Do you have an alternative, secure recommendation? Add a comment and let me know!

  • Are you sure you wish to unsubscribe?

    I have a bit of a zero tolerance when it comes to unsubscribing – if there’s no immediate option (i.e. either no option at all or only one that involves emailing them) then they get the SPAM button.

    B&Q, thankfully, do have an immediate option (I’m not sure why I started getting emails from them – I reserved some items recently, but didn’t make any request for them to start emailing me as a result). However, I was met with the following message…

    Now, that’s a lot of asterisks’. That email could be anything (and as it’s my own domain I could have a number of similiar email addresses set up – none of which may be distinguishable). Besides, why does it need to be covered up – other sites don’t do this?

    Bizarre.

  • How to use the Android 4 Roboto font on your website

    This site previously used the font named Droid, which is the open source font used by Android. With last week’s introduction of Android 4, however, they’ve created the Roboto font – this has been designed for HD screens, so is perfect for websites.

    You can learn more about the Roboto font from a Google+ post by Matias Duarte, the Director of the Android User Experience.

    If you wish to use a non-standard font for your website then there are a number of ways to do this. However, I prefer to use the font-face CSS option. It’s not without its disadvantages, so read up on it before proceeding.

    For each font that you wish to add simply add the following code to your CSS…

    @font-face {
        font-family: 'DroidSansRegular';
        src: url('DroidSans-webfont.eot');
        src: url('DroidSans-webfont.eot?#iefix') format('embedded-opentype'),
             url('DroidSans-webfont.woff') format('woff'),
             url('DroidSans-webfont.ttf') format('truetype'),
             url('DroidSans-webfont.svg#DroidSansRegular') format('svg');
        font-weight: normal;
        font-style: normal;
    }

    You’ll need to change the font-family to the name that you wish to give the font. Then there are 5 references to the font files – 4 different types to cover different browser requirements. Again, these will need changing appropriately.

    If you wish to use either Droid or Roboto I’ve bundled them up ready for font-face (i.e. with each of the 4 formats that are required).

    • Download Droid – There are 3 versions of the font – standard, bold and mono space.
    • Download Roboto – There are 2 versions of the font – standard and bold.
  • Why the next iPhone shouldn’t be the iPhone 5

    Why the next iPhone shouldn’t be the iPhone 5

    The recent  announcement of the iPhone 4S was met, pretty universally, by disappointment. People were expecting the iPhone 5.

    However, the release of the 4s is quite consistent with Apple iPhone releases.

    (more…)