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

I wanted to take this moment to wish you all a Merry Christmas for 2017! 

I've put some stock images from Pixabay that I think are cute and Christmassy for you to enjoy below:

Posted in Life
christmas
2017

It will be early 2018 before I can update my personal website. This is because it's quite a big job. I've decided a lot of the content will be removed, and even though the most visited part of my website was the Developer Center, it will be removed in the 2018 update. 

Performance wise the new website is approximately six times faster, taking advantage of a new DragonScript X Engine which is the final iteration of it. DragonScript X is built into all of my websites because it's now a server feature as opposed to a website feature. 

I will be further building my website around the new Dash updates that focus on one install multiple blogs.

Posted in Website news
2018
website
update
jamie
balfour

It's been four whole years since my website received a major refurbishment and it's now time that it did. 

The major refurbishment will retain the exact same layout design but will focus on better performance. It will use my Girder framework and will integrate more deeply with Dash. 

Speaking of Dash, I have not worked on Dash for a while, but with the new refurbishment, I aim to focus on making it easier to work with. 

I have been contemplating this redesign since the launch of Girder and the new Jambour Digital website, so now it's actually coming to fruition. 

I've also been building a few other websites as of recent, and due to their success with clients, the change seems to be very obvious.

Posted in Website news
girder
new
website

It's happened again, I've moved up even further in the Alexa ranks in my latest check!

Since this time last year, my website has increased 5 million places in the global rank! 

Posted in Website news
alexa
website
ranking

For a fairly long time (since I moved into my halls of residence in 2013) I've been obsessed with something more than computers. Phones.

I'm not talking about smartphones, I'm talking about IP phones. VoIP or voice over IP is something I've been interested in since about 2003 when I got to use Skype for the first time. I found it incredible that we could do these things and Skype just kept getting better and better. But Skype had and still has one problem - you need a PC or some other device running the software to use it. 

As I mentioned, in 2013 I got my own IP phone in my halls of residence. I had longed to be able to test one like this so it was really awesome to get to test it for the first time. I had a Cisco one if I remember. About early 2014 I spoke with my father about getting an IP phone for the house and moving away from the standard PSTN (Public Switched Telephone Network) and with both of us being in some part of the computing industry (we both work with networking regularly), it seemed only right that we now trial this technology at home. In both of my previous offices, I got the wonderful experience of using IP phones, in particular, my last job, where we used Grandstream phones which had all the bells and whistles. I looked the phone we had at work up and to my surprise, it was only £70 odd to buy one on Amazon.  

Last Friday we officially began moving to IP phones across the house (and it's all been down to me to do it, but hey, I guess I've managed, even though it's been completely a new concept). SIP, or session initiated protocol, is the backbone of our new network. Our network is powered by a Raspberry Pi which handles all outgoing calls currently and will soon deal with incoming calls. Our original DECT analogue phones will be slowly moving to SIP, with one set of them moving this week and one will remain on the analogue line until we transfer entirely to SIP. My bedroom will use my new Grandstream GXP2170 (which was only £100 so only £30 more than I was going to pay and I got a much better phone). I'll also be finally getting my own private number in the house. 

As it happens, BT wants to switch the whole country from the basic PSTN to an IP based network to make it more competitive and it's a good move too. There's more about this change that BT wants to bring to us here.

I've finished setting up my SIP network. We've got a trunk for both inbound and outbound numbers. Asterisk on my Raspberry Pi deals with all calls and forwards them to all of three extensions (though we have more so we will need to fix that) in a ring group. If the call is a business call, i.e. one for Jambour Development, only two phones ring. If it's for the house, all phones ring. We also have voicemail and out of hours setup. 
Posted in Tech talk
sip
session
initiated
protocol
new
technology
gadget
fun

It's often been laughed at by my friends, but now it was too much (or too little). Our broadband connection was abysmal - often only achieving a paltry 2Mbps (0.25MBps). This meant that simple things like SSH couldn't even work properly and would often timeout. 

I will point out, where I live was one of the pilot locations for broadband when it first came to the UK, so we had faster broadband than quite a few people at the time. On October 26th we decided to complain about how slow our internet connection has become. During a complaint about the speed, we were told that an engineer would be out to have a look. The engineer did arrive and mentioned about the speed that we were able to get superfast broadband (up to 56Mbps or 7MBps) now according to the system. We were, of course, delighted, although a remained somewhat sceptical about this, but we decided to move to it straight away.

Now the fun starts. We were originally promised that it would be Tuesday the 31st of October and there would be absolutely no disruptions to our service until then. We were sent a BT Home Hub 5. Then within a few days, a new BT Smart Hub (aka the Hub 6). We were told to disconnect the old router and connect our new BT Smart Hub. We immediately lost our internet connection. On the 31st of October, after getting all excited for our new superfast connection, I was let down. 

On the 2nd of November, after having had no internet now for a week, meaning no maintenance on my web server or anything and only one backup downloaded in that time (thanks to my friend Calum, who allowed me to download a backup at his place using his superfast connection) I was beginning to get weary. We were annoyed that we had no superfast on this day but when we phoned BT to find out why, there were a bunch of excuses, but in the end, we figured out the main problem - the line wasn't supported. Wait a minute, didn't the say it was?

What BT said originally was not true, our house was not suitable for fibre; because we did not have a connection to the cabinet but a connection direct to the exchange, bypassing the need for the fibre-enabled cabinet. 

So we were then promised the following Tuesday (7th November) for our superfast connection. I again remained extremely unsupportive that this would be all done and dusted by then. My dad, on the other hand, kept firmly believing that this would happen.

As you guessed it, we didn't have it on Tuesday 7th of November, but we were told it would be there on Thursday the 9th (the day I was originally meant to be moving it my own house but that's for another story). We were then told on Friday the 10th that it wasn't going to happen then and would definitely be in place by the next Tuesday (14th).

All in all, I'm just so angry with BT for messing us around. I once believed they were a good company but this has changed my opinions entirely.

Another new contract and another new technology. 

This month has been pretty good for me obtaining contracts; just finishing one at the start of the month, getting a new one at the start of the month and a week ago and a potential fourth one this following week. I aim to provide my clients with the best possible service I can, and if I say so myself, I think they are pretty happy with what I offer them at present.

For my latest contract, I've been working with Stripe, which in case you haven't heard, is a fantastic way to build in a payment method into a website. I have used PayPal's API in the past and found it to be very easy to handle, however, some websites demand more than just PayPal due to users not having access to PayPal or whatever.

With the latest contract, I am working on, reviewing the requirements specification document we formed, it's completely necessary to have a seamless, transparent payment system that allows users to quickly input their details including payment details. For this, I turned back to Stripe, which I have used briefly in an experimental website I was developing a few years back. Stripe is secure and easy to use. It also looks very professional. 

Let's talk API stuff now. Stripe provides an exemplary API, however, I decided to use the PHP wrapper found on GitHub to make this lightweight. I then made my own wrapper that transforms it into a reusable script across all of the sites I host.

The great thing about the API is there is no redirect or required way in which you process data, and you choose what you want to do with the finalised output of the form. In fact, you don't even need to take payment (that's a bit silly but it's true). You need to write a simple script that will process it after. 

The main benefit of this is that you can do all sorts of things prior or after the form submission such as sending an email of receipt or a notification of a purchase on the website. You can also add this to a database that stores what a user has purchased. 

But the main thing about Stripe is its ease of deployment. It only took me about 2 hours to get the whole site up and running with a test version of Stripe.

Posted in Web Development
stripe
php
ecommerce
website

In the last few months since I setup my own server I've been experiencing something I didn't even know might have happened before now.

I'm talking about brute force attacks on each of the websites I host. None of them are at all clever and I've been mitigating these problems recently anyway. 

But before I had root access to my server I had no idea that these attacks happened so often. The last few days I have been blocking several IP addresses from SSH and website visits on the sites I host, but I'm starting to notice a trend.

In fact, this trend relates to a post I made when I first moved to WordPress. I haven't used WordPress for years and I'm happy to say that, because I wasn't a huge fan of WordPress. I ended my WordPress part of my website at the end of 2013 and I haven't looked back. However, my websites are still getting constant requests to access one certain file that doesn't exist. I'm talking about these errors in my Apache error logs:

  • /var/log/apache2/access.log.1:IP_ADDRESS - - [07/Nov/2017:12:38:28 +0000] "GET /wp-login.php HTTP/1.1" 404 28038 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1"
  • /var/log/apache2/error.log.1:[Tue Nov 07 05:37:02.133215 2017] [:error] [pid 30560] [client IP_ADDRESS] script 'wp-login.php' not found or unable to stat

There are hundreds of them! As a result, I've decided since none of my customers or myself use or will use WordPress, I'm going to block all wp-login requests.

If there's one thing you should take from this post, check your logs for the same issue!

Posted in Web Development
apache
log
wordpress
wp-login
scam
hack
brute
force

Now that ZPE 2.0 is really progressing, I thought I'd let you know about how it is doing in this post. Note by the way, that ZPE 2.0 is my C++ implementation of ZPE.

To be honest, I haven't worked as hard as I could have on ZPE 2.0 as other things still take precedence such as websites I have been working on. However, ZPE 2.0 got a bit of work last night that adds several features:

  1. If statements (no conditions yet, but if, else and end if)
  2. Tree generator view (one of the first modes added to ZPE 1.2 because it makes it easy to debug the code)
  3. Memory management tools

What will need to come next is a bit of interpreter stuff. To be honest this is where things get more complicated and I will likely need to take a bit longer than before to build it.

It's been a while since I last worked on BalfBar but the latest improvement is a huge one! The latest update is version 1.2.

The newest BalfBar release brings a bunch of changes. Most important changes are removals which now includes the floating logo (BalfBar shouldn't manage this) and the Dark Mode (later named Alternate Mode). 

Let's start with why the floating logo / logo base idea was removed. In fact, let's start with why it came to BalfBar in the first place. Many of you will remember that I used the floating logo on my own website. This was removed in about 2015 when I changed to simply have my name. No body who used BalfBar that I know of was using this feature and more importantly, BalfBar shouldn't need to deal with minor things like this. It's removal was obvious and it makes the SCSS file much easier to understand.

Next, Dark Mode. One of the oldest features of the menu was Dark Mode, originally inspired by Mac OS X when it offered us a dark menu bar etc. I became a fan and decided to upgrade my own menu (powered by jQuery Smart Menus) to have this feature. When I developed BalfBar to replace it on my website I had to include the feature. Now I realise that even I don't use this feature. The main reason for it's removal is that firstly it complicates the SCSS file, secondly it will increase the CSS output file considerably and thirdly it can easily be added if needed by just compiling two SCSS files with the different themes anyway.

The SCSS file is now completely cleaned up and ready to use again. I'm also working on adding some new menu types to it including a large menu like I used to have. This will be sometime before it is ready though since my other projects are now taking precedence again.

I have now updated the JS file to work much more fluidly. However, no longer does BalfBar add a fixed_menu class to the HTML but only to the menu. This came from the idea that it's possible that two menus maybe on the same document at the same time, causing both to go to 'fixed mode'. It also allow it to remain more clean and succinct.

One more thing about the new change is that there is now both a desktop and mobile fixed height option. This also means the removal of the permanent mobile created in the CSS. To make a BalfBar instance always mobile, use -1 as normal.

Posted in BalfBar
balfbar
1.2
wnp
menu
bar
Powered by DASH 2.0