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

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 spend a lot more of my time developing the front end than the back end of my website since the back end is pretty damn flawless as it is. I say this because I was originally more of a back end web developer - and I probably say this to many peoples' suprise but it's actually true that I still am. I prefer working on the front end sure, but the back end is really where I am more talented.

Effectively combining the front and back end is about ensuring that the back end stuff works with the front end stuff, but your front end needs may be quite high. For instance, iterating 1000 records on your local database is not going to be too demanding, but getting them from an external website and then generating the HTML for these then adds quite a bit more work. What if you are collecting the latest from your Twitter account (like I do) and placing it on the website and applying regexps all over the content? This is quite demanding. So I spent a lot of time reviewing literature on this exact problem and it seems it actually is a problem, albeit easy to fix.

Our PHP function may return us a HTML result when we get our Tweets back from Twitter's API, and we know that the Twitter feed is only going to update when we update it, so why don't we just throw the HTML result into a text or HTML file? This solution then means that we have to manually update (delete the file) the website when we update Twitter. Not ideal.

The solution, check the modification date of our cached file. If it is more than 24 hours old, delete it. The PHP function will no longer see the file and instead of getting a cached version it will refresh it with a new request to Twitter. Still not perfect though since we've got to delete the file.

The final solution, the PHP file checks if the file exists, if it does checks the modification date and if it's over 24 hours old it gets the latest data from Twitter and updates the file with that data and returns it.

There you have the description of a very simple PHP caching system. 

The following is another simple to use BlackRabbit Script sample.

BlackRabbit Script
//Copyright JBALFOURDTP//28/10/2014
//BlackRabbit Script version: 2.2.2.467

function main()
    //main method goes here
    output("Hello world");

    $x = 11
    $y = 11

    if($x == $y)
        output(True)
    else
        output(False)
    endif

    //Incrementing variables will not instantiate them. They must be instantiated prior to use.
    $i = 0
    while($i < 10)
        $i++
        output($i)
    endwhile

endfunction

In today's post, I'm going to be talking about how I have improved BlackRabbit Script. Today I added the concept of global variables and local variables.

I have been planning this for sometime as it is found in many programming languages.

My next aim is to add parameter passing to functions.

BlackRabbit Script is now in version 2.3.

As you may have noticed. I've been working on the site quite recently. There is a new blog specifically for BlackRabbit now. Here I will post updates about BlackRabbit and what I intend to bring to it within the future years.

As you may have noticed. I've been working on the site quite recently. There is a new blog specifically for BlackRabbit now. Here I will post updates about BlackRabbit and what I intend to bring to it within the future years. Twitter is now deeply integrated into my website now too.

Since the last post on the blog, I have procured a new development in software. This development has worked out to the best with BlackRabbit. The project known as "Warsaw" is considered a great improvement and with use of BlackRabbit, we have developed a "concise set of commands" which operate to reduce the time wasted repeating tasks over and over.

Site accessibility

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

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