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
Jamie Balfour BSc
Full stack developer

Personal Blog

BalfBlog is making a big change today that will change a lot of installations. Luckily there is a new plugin included by default with all installations that fixes this.

The fix I speak of is moving from using MD5 in any hashing algorithms at all. I was interested in finding out whether or not MD5 was a preferred choice to SHA1 for a short URL and came across a page in which the write manages to produce two images which are distinctly different yet the manage to produce the same MD5 value causing a collision. Not good. 

As a result I have decided to change from MD5 being used to generate hashed URLs to SHA which has a much lower chance of a collision than MD5 does. For more information on creating collisions (and it's a very interesting article) look to here:


Posted by jamiebalfour04 in BalfBlog

After hours of work and countless cans of juice, I have finished my website update for early 2017. Nothing has changed on the front-end except for my menu, which now implements BalfBar 1.2 and also now has padding on the dropdowns as well as new uppercase text.

This update did focus primarily on updating the back-end, primarily introducing DragonScript 2, the replacement for my January 2015 DragonScript package. This new version is much faster and works on the idea of hashing data rather than storing it in an array. It's a huge performance improvement that makes this website speedier than ever. On top of that I have been stripping parts of my website that are no longer needed with a focus on not only making the website faster but streamlining it so that it is easier for me to update and add to.

Disruptions have been minimal as I continued to support DragonScript version 1 on my website simultaneously with DragonScript 2, but as of five minutes ago, the two year old version has been retired. 

Will DragonScript 2 get a release? I doubt it. I don't plan to make it available now because it would be too much work since it is now intertwined heavily with my website. It is possible I will develop a more open, WN Project based on DragonScript, but not yet.

Finally, on top of the menu getting a little update. I decided to push my dark theme further on my website, and for the first time have built dark code samples. The choice to do this was inspired by the fact I now use Adobe Dreamweaver again, and I really like it's dark theme. This now makes them easier to see on top of looking much nicer.

var x = "Test"

This update removes even more skeumorphic designs and focuses even further on the flat design. It does however retract a bit on the statement I made about getting rid of curves, with more and more objects across the site being curved. Alas, I could not resist a couple of circular objects and feel they fit better than the square ones did.

Yesterday I tried out ZPE Remote with a friend across the Internet. It works well and he was able to execute commands on my MacBook Pro over the Internet. 

Most crucially, ZPE Remote also restricted access to certain built in methods using permission levels that would not be possible to bypass in the interpreter. I will continue to test this with people, allowing them try out certain features of ZPE Remote and let me know where it could be improved. 

The Nintendo Switch, the console Nintendo could not afford to go wrong with, especially after learning that the hard way with the Wii U's failure. 

However, I believe Nintendo has gone wrong again, and I'm disappointed to see my childhood gaming company make the error again.

If you haven't already heard about the Switch, head on across to Trusted Reviews to see all the information about it.

A lot was good:

  • The portability is awesome. I love the fact that I take home my games console and plug it into my TV then take it with me for the bus. 
  • It's Nintendo, which means some of the most awesome games will come to it
  • It's going to support Unreal Engine 4 - that's pretty demanding.
  • It's so flexible! I also love the fact that you can disconnect controllers and change things around so much.
  • Nintendo will final comply with standards and I will be able to use the USB Type C connector for my laptop to charge it

I will summarise what's wrong with it, and this is my opinion:

  • Underpowered. We have seen devices like the new Razer Blade Stealth (amongst many others) adding PCI-Express graphics cards to laptops when they are docked via Thunderbolt. Nintendo could surely have looked into this and made the Switch a 4K gaming experience when it's in the dock and then used a smaller less capable and yet more power efficient graphics chip when it's out and about, couldn't they?
  • Overpowered. Seems like a contradiction but I wanted to put that there because the Switch seems to suffer from the same problem that the Wii U Gamepad did. Battery life. How on earth can the Wii U Gamepad only last on battery for three hours when an iPad or even an iPhone can last for up to ten?! The thing only receives a wireless signal with a picture to display and the audio to play with it (as well as act as a controller). And what's worse is the low resolution (especially compared to tablets of today) of the Gamepad. Well the same is said about the Switch which can last 6 and 1/2 hours playing games, except that it ranges from just two hours with games like Zelda only achieving about that. THAT'S IT?!
  • Storage, or the lack of. 32GB of storage is still the best option for 2017?! And knowing Nintendo, it will use eMMC memory which will make it a slow 32GB of storage.  
  • The price, at £300 I would expect a bit more, especially saying as you can get something like an iPad or Xbox One for just a little more, even if they haven't got Mario and Zelda on them.

Feel free to criticise my opinion and write your thoughts below.

It has taken me most of last weekend and some of today (I have other work to be doing for my PhD as well, so I can't give this full dedication) to get here, but I'm happy to say that DragonScript 2 is finally here on my website.

All pages have yet to have this but any page which is within sections from A-M are now enabled for DragonScript 2 apart from my developer tools. You can probably see the speed difference between the two.

Oh and it was exactly 4 years ago tomorrow that I rebuilt my website for the first time, and for the very first time used HTML5 and CSS. Version 2.0 was finally released tomorrow 4 years after a long struggle to rebuild the content. Now in version 3.7 I'm quite happy with the way things are, particularly now with DragonScript 2 and BalfBlog.

DragonScript is the PHP system I made and use to power my website. It's a pretty genius way of making my website highly consistent and flexible. It allows me to make a single page in a matter of seconds. Previous to DragonScript I had a silly less capable way of managing my content. Now with this improved version I need not worry because it is all handled efficiently and quickly by DragonScript.

But now in 2017, two years after DragonScript was first used on my website, it is coming to an end. Well at least version 1 is. The new version DragonScript 2 is miles better. It is more efficient with memory and handles things better.

DragonScript originally worked by including a PHP file that was a template and providing several variables. No longer does it do this. Part 1 is still true but now in part 2 it includes the one $dragonscript variable which provides an array of values that are used to tell the server what to do. Things were messy in the original version of DragonScript and things like $beforeParseInclude variables were just plainly unused. 

DragonScript 2 also provides a new system which finds the name of the webpage and finds associated files. For instance if the page was called index.php it would look for index.head.php and index.foot.php for any additional code needed. As you'd imagine, this system is far easier to maintain too.

I consistently release a new version of ZPE each year. This year version 1.5 has been released.

In 2015 version 1.3 was released which brought the most changes to ZPE since it began in 2014. Version 1.3 added so much including the very basic compiler that version 1.2 started. Over 50 functions were added in this version. This version added if statements, for loops, while loops, functions, structures (although they didn't work properly until 1.4), RMM (Real Math Mode), plugins, libraries, lists, associative arrays, constants, variables, incrementing and decrementing, built in converters (and for a while one example did even exist that converted ZPE code to Java), image functions and of course, my favourite feature of ZPE, anonymous/lambda functions.

In 2016 version 1.4 was released and it brought a huge shake up of changes, but it's main focus was consistency between internal functions and imported ones. It also brought structures that are similar to those used in other languages such as function(){ } instead of function() end function. As well as this it brought the LAMP interpreter, lazy evaluation, function chaining, the object type, a better hashing of variables and functions, the internal manual for information on built in functions. Version 1.4 also brought support for many other new things, including octal and hexadecimal without the need for a function.

In 2017 version 1.5 was first released. This version currently adds one major new feature, Remote ZPE. Remote ZPE allows a system running ZPE to act as either a client to another ZPE installation or to act as a server that other ZPE Clients can utilise. The purpose of this is for smaller, much less capable machines such as the Raspberry Pi to be able to quickly take advantage of the processing power of a more capable machine. This was developed because I use ZPE remotely on my Raspberry Pi through SSH to do things, but what I'd really like is ZPE to work on my MacBook and send the result to my Pi (so it goes like this Mac connect to Pi through SSH which then uses ZPE Remote to do processing on Mac which returns the result to Pi which shows on my Mac, this way I can process scripts stored on my Pi and utilise them on my Pi).

The future of ZPE 1.5 however is very clear. 2017 will bring the following major features to ZPE:

  • JSON parsing (already done and available in all versions of ZPE)
  • Remote ZPE: Client and Server (already done and available in all versions of ZPE)
  • Multi-threading: Currently this project is underway and it's easy to test with ZPE version 1.5.1 (currently beta users only) using the following:
    $v = threaded function() { for ($i = 0; $i < 100000; $i++) print($i) end for }. It's easy to do and I'm sure it makes sense.
  • Interfaces for objects: allowing programmers to define interfaces
  • GUI builder: a way to develop graphical interfaces in applications (not sure if I will include this by default in all installations and might just include it as a library)
  • Conversion methods: New built in methods to make conversion plugins easier to write
  • Plugins will gain access to internal functions: A method of accessing built in functions from plugin functions
  • Typo: The new Typo typing system will finally come to version 1.5.x
  • Includes: Inclusion techniques to include non compiled code in the non compiled version of the code. Much like the C and PHP include methods.
  • Include imported functions: The import function will be changed to be a part of the compiler and will change the way it is run.
  • Ordered associative arrays: associative arrays currently store just one key and do not follow an order, this will allow associative arrays to be ordered
  • ZPE JSON: Improve JSON parsing and drop the use of GSON (the JSON functions will all work identically to how they work with GSON, it's just the wrapper functions on the top that will change).
  • Improved compiler: the compiler currently flows within the compiler-interpreter cycle whereby the compiler generates the input for the interpreter. This is fine for simply using the -i tool, but when running applications it means that one more step still needs to be run - transform the AST to something meaningful. With the latest update I aim to change this and put the compiler in a different place. The basics of the compiler will remain the same, but one more step will be added when compiling to a compiled program. This will improve the speed of the ZPE Runtime when applied to a compiled application (it will have no effect on the interpreter).
  • Power to the objects: objects, and as a side-effect structures, will be getting more powerful. It will soon be possible to declare a function within an object using lambda functions. As well as this objects will be getting more support in the LAMP parser. 
  • Passing parameters by reference: just as it says. I aim to have this feature in version 1.5.3. This would mean functions like list_dequeue would no longer need to be reassigned to the variable.

I am highlighting in green the features as they get added and highlighting in orange features that are partially added, so keep an eye on this post for updates.

There are several more but they will be put here once I have decided whether or not they are feasible or not.

This is a very tall order, and Typo and the conversion functions are currently at the bottom of the stack and although they have been suggested for this version and they were originally planned for version 1.4, I still may need to delay them to version 1.6.

Also, with the release of version 1.5, support for any version 1.4 iterations of the software has now ended, I encourage you to upgrade to the latest version of ZPE.

Since I started ZPE a year and a half ago it's come a very long way. From time to time I've put development in the background of my life, but I've begun working solid on it again. Now in January 2017 there are a whopping 155 built in functionalities plus a standard library designed to supplement the core functionalities with additional ones including sorting functions and much more.

When I launched ZPE publicly for the first time in July 2015 there were just 30 odd functions in the core. I was struggling to get even to 50 after months of development but suggestions kept flowing in from friends and people who used it. 6 functions have since been removed in favour of compiler based changes (the add, subtract, divide, multiply, modulo and concatenate functions, because all of them have since been replaced by a compiler change called LAMP).

The result of all of this is a much more efficient parser and interpreter but also a much more functional one. Who wants to write their code full of add functions rather than write a simple plus sign for instance? Adding LAMP was one of the biggest changes, and the latest update to it was made in November and it made a huge change that improved it overall. 

I continue to develop ZPE as a major project of my own, but I also use it for things now, and for that it's awesome. I know people do download it but feedback has since become less frequent. 

2017 will bring a whole lot of new stuff to my projects. I am going to start with one of my recently more neglected projects, ZPE.

ZPE will be rebranded this year, well in a way. ZenLang will no longer be called ZenLang and will finally get a proper name (more on this later). ZPE has received a huge number of updates in the last few days, bringing it to version, the most secure, advanced and best version to date. In this version there are a number of fixes and new a number of new features. Version 1.5.0.x brings a lot of new things like the remote server, which can now be used as a message server too. On top of this, ZPE now features a JSON parser, through Google's GSON. GSON has been worked to parse the JSON into a list of lists (or an array of arrays). There are new security and safety updates in version 1.5.0.x that are crucial. On top of this, the LAMP parser was improved and loops have been further optimised. 

My website has received it's yearly revamp, this time in the form of DragonScript 2 which is still being put in place on all pages across the site, but it's clearly a lot faster than the original DragonScript. I've also been adding more responsive tools and my code samples now have copy buttons for modern browsers. As well as this I introduced BalfJS to my front end. This is a new way of keeping all of the JavaScript I want to use organised. It also means that functions are better named too and prevents conflicts. My JavaScript was a mess from the days when I first built my website in 2013 and it was time to finally tidy it up four years later. I have also taken out the table sorter and I am also saying goodbye to the wonderful MouseTrap plugin which was awesome but no longer necessary.

BalfBar received an update in early December that brought many new features with one in particular, a sidebar menu. This gives developers the choice between two different types of mobile menu. As well as this it was made overall more efficient.

BalfBlog also received it's latest update in early December. This update, version 2.2, brings a lot of new things including more control over users, a better UI and an improved plugin interface for the tools menu. As well as this it became more modular than ever and far better organised, and in some ways can now be seen in an MVC manner. BalfBlog also became more dynamic, adding more ways to make your blog or website easy to update in the future. Finally, OneSignal's push notifications and social media buttons were added. This year a lot of new features are planned including the long awaited 'Single BalfBlog Multiple Blogs' (SBMBS) strategy that will eliminate the need for multiple copies of BalfBlog on your webserver. This is planned and I'm still putting together ideas on how best to approach it.

BalfSlider may receive some updates this year since it is dependant on whether or not new features come to CSS or JavaScript that can improve it. Many effects of the plugin require both CSS3 and JavaScript to work.

As mentioned before, ClickIt and the ZenLang website will come to their ends this year. My donation thermometer did not make it high enough (I made more in ad revenue this last few months). However, the themometer did make it high enough to help pay for my website for another year. 


NPAPI or Netscape Plugin Application Programming Interface was the norm for a very long time in web browsers. It was a single standard that allowed all browsers to use plugins. But plugins have plauged the web for a long time too. One of the most well known plugins, Adobe Flash, had become pretty much everywhere, requiring users to download a plugin for the system. It used NPAPI. On top of this, plugins were cumbersome to develop and meant developers needed to know several in order to achieve the results they wanted. Now the web is finally moving away from a plugin interface to a much more standards based interface.

NPAPI was the interface (a set of methods which each plugin must implement) which all plugins complied with. This was originally developed by Netscape, one of the original companies to develop a web browser and Microsoft's competitor in the first browser war. Netscape developed many standards and one of them was this plugin interface that has left us in the messy situation we are in now.

NPAPI has been around for a long time, but last year was supposed to be the end of it. In 2015 Mozilla announced they had plans to drop NPAPI by the end of 2016. This was later brought back to March 2017. Chrome has already dropped NPAPI and did so in September of 2015, only after turning support off by default in April that same year. Google cited that it "has become a leading cause of hangs, crashes, security incidents, and code complexity" thus that the older architecture of it needs "to evolve the standards-based web platform". It's important to note that NPAPI is an architecture from the 90s when the web began to take shape and at that point we were using HTML 3.2 and lower. Since then HTML5, CSS3 and JavaScript have all brought huge improvements to the standards-based web. 

Many plugins already exist that take advantage of NPAPI including Flash and the Java applet plugin. But both of these can be replaced by much more modern solutions. 

By removing the NPAPI browser developers are encouraging standards. They are making it more difficult for those who develop these plugins to make them a part of the future. By doing this they are offering a safer web environment for everyone. They are also ensuring that there is no longer the complicated mess of choice that Netscape and Microsoft once supported through the NPAPI and that we live in a standards controlled environment where no one company owns the web.

A standards based website is the way to go and older websites need to update to catch up with standards. Nobody has time for these older websites that rely on these plugins now, they themselves are slow and ineffective and need to catch up. 

Site accessibility

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

This page was generated in 0.29 seconds using 6291456 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.