Jamie Balfour

Welcome to my personal website.

Find out more about me, my personal projects, reviews, courses and much more here.

Jamie Balfour'sPersonal blog

Just yesterday I got myself an Xbox One (There may be a review on this coming soon). I tried out Internet Explorer on it, which I found out was Internet Explorer 10.

I also discovered that my PHP script to detect Internet Explorer 8 accepted Internet Explorer 10 as being an older version than Internet Explorer 8. This is a simple mistake to make but it's also incredibly easy to fix.

Here was what I had:

PHP
preg_match("/.* MSIE [1-8] .*/i", $userAgent)

And here is a working solution, to detect all browsers less than IE8:

PHP
preg_match("/.* MSIE [1-8].[0-9]?; .*/i", $userAgent)

And the reason for this happening is down to the fact this only checks the first number of the version, not the second, so IE10 would be recognised as IE1. I also put in, just for the sake of it, a check for a dot (.) and a check for a minor version number ([0-9]) and a semi-colon at the end. At the beginning and end of the regular expression match are any symbols.

Posted in Programming
internet
explorer
ie
8
version
1
2
3
4
5
6
7
detect
php
user
agent
string
find
get
check

Finally, I have managed to get Windows 10. And the good news is it was so easy to install on my Mac (not like my PCs). 

Windows 10 scaling features work well, unlike Windows 7, 8 and 8.1 so I can finally use the high DPI of my Mac's display with Windows. I've been waiting for some time (since August 2014) to use Windows on my Mac (I had Windows until April of that year on my older MacBook and I've always had it on my Mac mini as well) and it's nice to finally have it again!

My tablet has just finished upgrading to Windows 10 as well due to the fact that unlike the installer Microsoft has been giving out, 'burning' a plain old ISO to a USB drive on my Mac works.

I will finally get round to doing my review. In general, I'm positive about the experience I'm going to have with this OS, considering Microsoft's tick-tock cycle of good OS (ME, XP, 7, 10) then bad OS (2000, Vista, 8).

Posted in Tech talk
windows
10
ten
last
ultimate
mac
os
x

When I first started to use Duck Duck Go (DDG) it was due to being a bit of an Apple fan boy. Apple were moving their default search engine to Duck Duck Go and I wanted to give it a try.

My original thoughts were that because of it's privacy policy - it would not share your information with third parties. Of course this is a great feature, but it's not the reason I use Duck Duck Go (nor is the fact that Mr Duckface is absolutely adorable).

Duckface

I will admit that Duck Duck Go is not the perfect search engine for it is still young and needs more time to improve. I very occasionally still use Google to search for things, but the majority of my searches are through Duck Duck Go.

No the main reason I use Duck Duck Go is because of the features they have started to add. I play a lot of Minecraft and I spend a lot of time reading stuff on the Minecraft Wiki. I also read a lot of Wikipedia articles. Duck Duck Go is the perfect search engine for anyone who does this kind of stuff. Why? Because Duck Duck Go takes a standard search over to the search page of a certain website.

Say I want to look up how to make a sticky piston in Minecraft, I would simply type into my search bar in Safari:

!minecraft sticky piston

And because Duck Duck Go is my default search engine I will be directed to the Minecraft Wiki searching for the term "sticky piston". This saves me a whole page or two of searching.

I have also changed my personal website to do this too. Now instead of typing "blog: google" to search for "google" in my blog only, you type "!blog google".

So go on, Duck It!

Posted in Tech talk
duck
go
duck duck
duck duck go
google
search
engine

Yesterday, Google announced a new logo. I noticed it when on the off chance I needed to use Google (I'm a Duck Duck Go user now). 

The new logo is the biggest change the company has made to it's logo in the 16 years of existence. It's quite an amazing change too, the font is no longer a serif font but a new sans-serif font.

What do you think of the new logo?

New logo
Posted in Tech news
google
logo
new
test
run
sans
sans-serif
serif
fresh
search

I announced a few weeks ago I would begin to work on a new configuration script for ZPE that would make installing it much easier. 

Well I'm glad to say that it will now be downloadable from my website in the next few days. It will bundle the configuration script, the MAN entry page (yes, finally!) and a copy of ZPE in it (I would still recommend downloading the latest version and copying it to the configuration folder before running the configuration file). 

To do this, all you do is run the configuration file using:

./configure.sh

Posted in Software updates
zpe
zenith
zenlang
zl
config
configuration
bash

Let's be clear here; for the majority of Mac users, Thunderbolt is only ever used as a display connector, only utilising the DisplayPort properties of this interconnect. 

Apple and Intel's joint venture surprised many and was one of the key reasons I bought myself a MacBook Pro when I did. Since the MacBook Pro I originally owned (late 2011 13" Thunderbolt version), Thunderbolt has progressed a long way. Not only has speed been increased, but in terms of the devices using it. Nowadays, it is not surprising to see a docking station adding more video ports, more USB 3.0 ports and gigabit Ethernet to a laptop which has but a few physical connections. Thunderbolt 2 was released in 2013 with a maximum theoretical speed of 20Gb/s compared to the original Thunderbolt specification which could achieve 10Gbps. This was due to the fact that instead of using PCI-Express version 2 in a single channel, Thunderbolt 2 used PCI-Express version 2 over a duplex channel (allowing communication both ways, or combining them into a single channel). PCI-E version 2 achieves 500MB/s per lane, equivalent to 4Gb/s over a single lane. Thunderbolt uses 4 PCI-E lanes and can achieve 10Gbps with this. Thunderbolt 2 making it bi-direction achieves double the speed. 

As many of you will know (if you read my website), my biggest interest in computing is physical computer connectivity, which I have had since about the age of 7 or 8 (where I became obsessed with PS/2 and parallel ports).

To me, physical connectivity is the way forward, wireless is a step backwards (in terms of data, not networking, although I still use almost all of my devices through our rather dated [1997/1998] network in the house which only receives moderate upgrades from time to time). This is why I have backed FireWire and Thunderbolt over many wireless standards.

At the same time, Intel has been busy (again working with Apple) developing USB-C, a full-speed USB 3.0 port which has the physical footprint of a Kensington Lock, allowing computers to get thinner and thinner as well as the ability to send video signals (including DisplayPort) and power (back to the device) over the one cable.

Combine USB-C and Thunderbolt together and you get Thunderbolt 3. Thunderbolt 3 supports PCI-Express 3.0 which achieves 78.8Gb/s or 985MB/s per lane. Thunderbolt 3 itself is given a maximum speed of 40Gb/s, which is a crazy amount of speed. What this now means is that a PCI-Express version 2 graphics card could be used external through the Thunderbolt 3 interface with no real problems. Intel even demonstrated this with the release of Thunderbolt 3.

What I am really hoping for now is Apple to release a USB-C-Thunderbolt 3 combination display that also features more than one damn input (this is the reason that I still do not have one of these displays and probably never will). This way they could ditch the MagSafe power lead and replace it with the single connector and it really would be the most fantastic way to dock your Mac.

Other than that, the bonus speed Thunderbolt 3 offers would be nice too, but perhaps not worth the extra money for a new computer at the moment.

To me personally, the release of USB-C was one of the most important releases of the last decade due to the fact that it really could become the connector that appears everywhere. 

Posted in Tech talk
thunderbolt
3
version
pci
pci-e
usb
usb-c
express
fast
displayport
intel
apple
mac

JBlogs is now available to download from my website. As it is still in alpha/beta stages you will need to login/register to download it.

Posted in BalfBlog
jblogs
download
blog

As I have not worked on JBlogs for about 4 or 5 months (getting lazy or just working on other projects), I decided it was time to get back into the swing of it again.

Today I am happy to say that JBlogs requires much less to setup and is better designed. As a result, I have got rid of the custom footer and custom headers. What you do now instead is define a PHP file which contains your own header such as this one below:

PHP
<?php
    $no_title = true;
    $expires = true;
    $math = true;
    $title = $title;
    $desc = $description;
    $head = $stylesheets;
    include $_SERVER['DOCUMENT_ROOT'].'/assets/php/head.php';
?>

This example is using my DragonScript to power the blog: it points the JBlogs variables ($title, $description and $stylesheets) to my own DragonScript. For the sake of going in to too much detail here (more will be on DevNet), this is how it could be used in a standard HTML page:

PHP
<html>
    <head>
        <title>
            <?php echo $title;?>
        </title>
        <?php echo $stylesheets;?>
        <meta name="description" content="<?php echo $description;?>">
    </head>
</html>

The foot can also be defined on it's own now as well. So the foot just points to the footer defined on the website. This allows JBlogs to integrate with your website from a very quick to create script.

I will put the latest version up as soon as I have tested it works absolutely as expected! 

Posted in BalfBlog
jblogs
updates
new
improvements
huge

I have begun work on my new MySQL tutorial. This is the fifth tutorial on my website.

On top of this, I have created a collection of really colourful icons for each tutorial based on the colours associated with the languages.

I hope you have enjoyed my tutorials so far and that the MySQL tutorial is as enjoyable! 

Posted in Website news
mysql
sql
tutorial
jamie
balfour
php

Well, despite the new changes coming in on Monday last week, I have had several messages saying they liked the grey design on my website and did not like the dark sidebar I was testing. 

I am happy that I received this feedback as I also agree with those people since going back. Thankfully, I left the CSS in the file but gave the sidebar a new class that changed it to the dark mode. 

I came up with a slightly new design for the sidebar just this afternoon that I feel makes a much flatter, better design. I hope you like this as this should be the final modification to the website for a long time.

Most of my focus is on improving my blog at the moment.

Anyway, I'm off to enjoy the remaining three days of my holidays now!

Posted in Website news
site
changes
reverted
Powered by DASH 2.0