Jamie Balfour BSc

Welcome to my personal website!

Technology enthusiast

I am very interested in technology, particularly relating to computer science. I am most interested in web design and development.

My main hobby is programming. One of my most well known products from this is ZPE. I also am the sole creator of BalfBlog, BalfBar and BalfSlider.

A little bit about me

In 1997, when I was six years of age, I got my very first computer. I was always very interested in the ins and outs of it and dismantled it to see how it worked.

Years later, in 2016 I received my BSc (with honours) in Computer Science, obtaining a First class degree.

I'd like to welcome you to my website and hope you enjoy using it as much as I have enjoyed building it!

Google Plus
Me
Jamie Balfour BSc
Full stack developer

Personal Blog

Today I have decided as part of refurbishment of my own blog, I will be removing the BalfBlog posts from my blog and putting them in the blog dedicated to my projects. This blog has also been running for some time and since it is the intended place for BalfBlog posts, this is where I will be putting them.

As well as this, I have chosen to move all of my posts about my Zenith Engine from my own blog to the ZenLang website and the blog dedicated to ZPE and ZenLang. I recently opened this blog but it has long been the aim to remove these from my blog. 

I have plans to rename the blog dedicated to BalfBlog to my project blog, where I will put information about all of my main projects.

I have been focusing on improving the search algorithm used by BalfBlog. What happens now is this:

  • A search is sent to the database to search for items containing any of the words searched for
  • The results are then traversed and any results that do not contain all of the search words are removed

Another important step was removing the double query design. This was a pathetic idea in the first place and I never meant for it to be in the release version but only in a test version. I apologise to anyone who has since downloaded but the latest update is marked as CRUCIAL. Please make sure to download it as soon as possible.

BalfBlog now has a more flexible refinement of queries function that will ensure that the information coming out is suitable.

More importantly, the HTAccess directive file is much better now and it works more efficiently.

I would go as far as to say that over the few months I have learned so much and am aiming to become an Apache master soon! 

In the last year or two, I have also been using regular expressions (regexps) to do everything and I think it's fair to say I am a master of them. I find them to be the most useful thing you can know for using your computer on a day to day basis. I now use them to search my computer or a text editor, I have made my own programming language which uses them for matching in the compiler, and very recently to match things on my website. I recently mastered htaccess files on Apache and nginx servers. As part of this I have made my site much more SEO friendly and developed BalfBlog considerably. I have been using regexps for about five or six years, but I was not exactly using them often enough and skillfully enough. Back in my C# programming days (I haven't worked on my C# projects since 2013, but I am talking about when it was my main language in about 2008 - 2010) I used regexps in Wonderword for the search and replace features, in BlackRabbit Script it was pretty much the basis of the language and in other programs I used it for text replacement tools (also included in Wonderword, but also found in my BBCL library).

Recently I brought both of these masteries together and have done so much with my website to make it better. I improved my hotlink protection due to these regexps and, to be honest, I think I did a great job since I cut ninety lines down to three with some simple regexps. 

So today I'm going to share this with you.

cPanel, by default, allows you to add URLs that will not be affected by hotlink protection. As such you enter them in (or if you add a new subdomain it adds them automatically). Except as great as this is, my URLs looked like this:

HTAccess
RewriteCond %{HTTP_REFERER} !^http://2010.archive.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://2010.archive.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://2012.archive.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://2012.archive.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://airdisplays.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://airdisplays.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://alpha.archive.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://alpha.archive.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://archive.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://archive.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://ashes-scattered.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://ashes-scattered.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://be.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://be.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://castleinn.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://castleinn.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://clickit.education/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://clickit.education$      [NC]
RewriteCond %{HTTP_REFERER} !^http://developer.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://developer.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://doodle.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://doodle.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://doodle.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://doodle.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://edustream.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://edustream.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://flitter.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://flitter.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://firestarter.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://firestarter.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://jamiebalfour.co.uk/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://jamiebalfour.co.uk$      [NC]
RewriteCond %{HTTP_REFERER} !^http://jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://jbtest.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://jbtest.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://wonderword.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://wonderword.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.2010.archive.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.2010.archive.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.2012.archive.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.2012.archive.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.airdisplays.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.airdisplays.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.alpha.archive.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.alpha.archive.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.archive.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.archive.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ashes-scattered.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.ashes-scattered.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.be.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.be.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.castleinn.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.castleinn.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.clickit.education/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.clickit.education$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.developer.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.developer.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.doodle.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.doodle.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.doodle.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.doodle.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.edustream.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.edustream.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.flitter.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.flitter.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.firestarter.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.firestarter.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.jamiebalfour.co.uk/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.jamiebalfour.co.uk$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.jbtest.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.jbtest.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.projects.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.projects.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.wonderword.sites.jamiebalfour.com/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.wonderword.sites.jamiebalfour.com$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.zenlang.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://www.zenlang.net$      [NC]
RewriteCond %{HTTP_REFERER} !^http://zenlang.net/.*$      [NC]
RewriteCond %{HTTP_REFERER} !^http://zenlang.net$      [NC]

I was looking at what it generated tonight since I've been fixing a lot of htaccess directive files across my site and subdomains and my other domains. I realised that I can put these down to just three lines of code and make it easier for me to maintain in the future. So this is what I've got:

HTAccess
RewriteCond %{HTTP_REFERER} !^https?://(www.)?(.*.)?(.*.)?jamiebalfour.co(m|.uk)(.*)      [NC]
RewriteCond %{HTTP_REFERER} !^https?://(www.)?clickit.education(.*)      [NC]
RewriteCond %{HTTP_REFERER} !^https?://(www.)?zenlang.net$      [NC]

 So there you have a simple solution to a big problem. Learning regexps is like learning to use a calculator, it just saves so much time!

This is a difficult question since so much is new! I have added the following (not in order):

  • The number of posts has been added to the modular category list e.g. General [10].
  • The newly added mod_rewrite tools have been improved with more rewrites. This makes these URLs more SEO friendly
  • Adding a new post to a category is easier than ever, and the interface is no longer complicated by many input fields
  • The new settings panel allows you to maintain settings without needing to change the files
  • Pages, categories, posters and tags now all redirect to the newly implemented rewritten URLs. Instead of using ?poster=test BalfBlog uses /poster/test/
  • Security improvements
  • Prepared statements with MySQL and PHP
  • Search improvements to make the search work like Google's search engine
  • TinyMCE can be customised
  • The whole of BalfBlog has been developed to be widget-based/modular. Choose to use some of the built-in widgets including the BalfBlog sidebar widget and the categories widget and style them as you like. But of course you don't even have to bother with them, since that's what it's all about.

I'm finally done with my dissertation and whilst the last few months have been a disaster, my dissertation is, in my eyes, one of the greatest things I have ever produced! I'm nearly finished my degree too so I can have a relaxing few weeks to recover from everything and get back to a bit of stress free normal life.

The new BalfBlog version 2.0.1 will be released next week. Currently the main features that have been added have been added for the ClickIt blog to improve it, since I am currently working on that at the moment as my main project.

The following have been added:

  • Security improvements
  • Better use of mod_rewrite to make URLs work better
  • Search improvements now mean that you can join words together using "" e.g. "windows 8" would search for the exact term windows 8 and not each word individually
  • Dashboard improvements
  • A new settings panel
  • Add your own items to the TinyMCE editor! You can now define your own items for the TinyMCE editor.
  • A new system to update your blog automatically (Linux and Mac based servers only)

This will be the last update of April so I'm trying to make it somewhat significant. April and the end of March have been the most significant months in the development of BalfBlog. I hope you enjoy the next update as much as I am!

The front end of BalfBlog is now using prepared statements for everything. This was absolutely crucial since most of the front end relied on users sending GET requests to the blog. These are now completely safe since the update. 

The dashboard has already featured prepared statements for sending information, but the front end was still lacking. I will point out however, as a result of this update you currently cannot combine queries. This means you cannot search for a user and a category at the same time. So this no longer works:

blog/?cat=General&poster=jamiebalfour04

This is coming back very soon however. As a matter of fact it is in the latest version, it's simply not tested thouroughly enough for me to be sure it can be released.

The big security update for BalfBlog is done! Now all statements are protected against SQL injection and use PHP's prepared statements. I'm hoping this will make BalfBlog much more secure for all users.

If you are interested in downloading a pre-release version, let me know by email.

Posted by jamiebalfour04 in BalfBlog

Today I have decided I will no longer add support for Internet Explorer 8, 7, 6 and below to BalfBlog, BalfBar, BalfSlider, BalfRibbon and my own website.

Subsequently, users of these will see a very small reduction in file size. 

After many years of adding extra support to my website for older browsers, I have decided it is time to move on. I am officially ditching a percentage of users of these older browsers.

Hello everyone, I'm posting this comment about my Disqus comment system which I have recently had to update. Since Disqus currently does not offer the ability to move comments from an old URL to a new one, I had to delete older comments to prevent them going through to the error page. I have readded all these comments using the names of the original people (note the names, not their user accounts, thus these will not take you to their accounts). I have done this since some of these comments were useful and because there are still very few comments (despite hundreds of views a month). 

Site accessibility

A lot of the original functionalities that once existed here have been removed.

This page was generated in 0.26 seconds using 4194304 bytes. Slow? Let me know.

To use project mode, the window must be greater than 920 pixels in width.
Click here to disable Project Mode.
This site uses cookies to deliver its services, to personalise ads, to store preferences and to analyse traffic. Information about your use of this site is shared with other companies. By using this site, you agree to its use of cookies.
Contact me
Contact Jamie Balfour

Get in touch with me via this form.