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

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.

dragon
script
dragonscript

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 its 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) (1.5.0)
  • Remote ZPE: Client and Server (already done and available in all versions of ZPE) (1.5.1)
  • 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 (finished in 1.6.7)
  • Includes: Inclusion techniques to include non compiled code in the non compiled version of the code. Much like the C and PHP include methods. (1.5.1)
  • 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 (1.6.8)
  • 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). (1.7.1)
  • 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. (1.6.3)
  • 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. (1.7.1)

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 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.

zpe
engine
zenith
update
2017
major

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. 

zpe
engine
zenith
update
january
2017
major
1.5.0.1

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 1.5.0.1, 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. 

Browsers

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. 

Posted in Web Development
npapi
end
finished
chrome
mozilla
firefox
google
ios
android
safari
internet
explorer
web
development
edge

I am happy to announce that my website has had quite a few new changes in the last few weeks, all of which I am finishing now. They are almost all content based but some also improve the actual usability of the website.

DragonScript 2

Last month I began to implement an improved version of DragonScript, DragonScript 2. DS2, codenamed Robber, is a huge update that improves the performance of the backend of my website, thus resulting in shorter loading times for users. It will take a while for me to bring it to every page on my website since some are still using DragonScript 2015 and I have to manually change the PHP file to update the page to DS2. 

New page percentage scroller

If you are on my website reading this then you will see that I have implemented one of those scrollers that goes from left to right as you scroll further down the page. I thought this was a nice navigation element to bring to my website and it was pretty easy to implement so, well you know, I thought I'd give it a try. Lemme know what you think by the usual method!

Goodbye old email accounts

My website email addresses are now limited to the webmaster, information and the no-reply subscribe and admin. Getting in touch via the contact form now goes straight to my personal email address.

New tutorials

I've finished my MySQL tutorial and I am now working on a new tutorial on Web Design. This tutorial focuses on design techniques, design patterns and methods to make a website more efficient and usable. It's fully planned out (and believe it or not I am organising it using the web design technique called card sorting). This tutorial is already coming on. The inspiration to start this tutorial comes from a book I recently purchased on design techniques. It also comes from the fact I now consider myself a bit of a design geek, since I am absolutely obsessed with usability and aesthetically appealing designs now more than ever.

New site features

Since you can now access a JavaScript method without the need for plugins to copy and cut stuff on the web, I have added a Copy button to every code sample on my website. If you cannot copy using the execCommand function in JavaScript, an error appear for you in the form of an alert. This is a pretty cool little feature.

Changes coming

On top of this, clickit.education will finally shut down this year since I didn't receive enough in donations to cover it. The same goes for the zenlang.net website I never finished. I will be moving both to subdomains on my website (www.sites.jamiebalfour.scot). On top of that my DevNet will no longer be maintained. All of this allows me to focus more on my personal website, which I guess is good. I may bring back zenlang.net at some point in the near future, but for now clickit.education will be the biggest loss. Like I said, it is all based on donations which were just not enough this year (there is also ad revenue, which I keep most of so I can continue to pay for things like Creative Cloud used to maintain this website).

Posted in Website news
website
jamie
balfour
update
mysql
web
design

Here is another of my summaries of the year things that I do at the end of the year. I always feel sad saying goodbye to another year, and I like to remember the last day of the year in a sentimental way. That's why I'm writing this post, which will not interest anyone but me since I use my blog as a log of my life as well as a personal blog that everyone can read.

I am finishing my yearly completion of The Legend of Zelda: Majora's Mask as we speak. I'm hoping to finish it before the year is up since I do this every year at this time of year.

Also, I write these posts every year, probably just because I'm sentimental and enjoying doing this, you don't need to be interested at all in this post. 

Last meal I ate: Salmon

Last thing I had to drink with a meal: Coca-Cola

Last place I went out to eat: Goblin Ha'

Last film I watched: Harry Potter and The Deathly Hallows: Part 2

Last game I played: The Legend of Zelda: Majora's Mask

Last song I listened to: The Legend of Zelda: Majora's Mask soundtrack - Clock Town 3

Last person I have sent a text to: My brother

Last friend I have spoken to in person: Calum Cormack

Last TV programme I have watched: Scotland's Hogmanay Live

Last major purchase for myself: Canon EOS 1300D

Although 2016 has been a pretty bad year, there have been some real highlights in it. I graduated this year so it wasn't all bad.

I wish you all the best and a happy new year for 2017!

2015
last
things
done
jamie
balfour

Although this post may not interest anyone, I wrote it all the same. You see I like to look back at my year toward the end of the year. 

2016 has been a pretty bad year for me, and I think in general for quite a lot of people. However, in this post, I'm going to look at the positives in the year too since there were also many of those in 2016.

First off, January was a good month. I started working at Knox Academy for the first time, a school I'd always wanted to work at. I really enjoyed working here, as much even as at Ross High School where I'd been working before. I was doing something I really loved voluntarily every week twice a week. Fourth-year of university was also one of the best years I ever had at university. My courses were really great and it looked like I was on target to get a first-class degree too. However, the loss of the amazing David Bowie was quite a big shock to the world. Then just four days later one of my favourite actors, Alan Rickman (Harry PotterLove ActuallyDie Hard etc.) passed away too. And let's not forget Sir Terry Wogan who since I was a child had been doing so many great things for charity, in particular Children in Need. 

February came along soon and it was one of the worst months of my life. I was told on the 15th of February that my MRI results were bad and that I needed to get surgery. Towards the end of February, I went through a bunch of tests. I was also turned down for teacher training by two of the three universities I applied for.

At the start of March a biopsy showed that there was nothing to worry about. But the surgery did damage me, I had headaches for days on end and huge pains in my head over and over again. I also worried about how I was going to complete my degree. Admittedly, by the end of March, the plan was in place to help me finish my degree and I was on route to getting it again. Also in March, Ronnie Balfour Corbett passed away, 

April was not much better for me, I spent most of that month recovering from surgery. Although towards the end of April I did go back to teaching. I also finished my dissertation in April.

In May I submitted and presented my honours year poster, marking the end of my time at university. Towards the end of May, I got an interview for the University  of Strathclyde for teacher training. The interview and presentation I had to deliver went very well and both of the two members of staff said that I was perfect for teacher training. As soon as I got the conditional acceptance from them, I went ahead and phoned up the college I was going to go to for catching up on my Higher English I needed to pass the conditional requirements of the university. Even after phoning them just two days before where they had plenty of space they had completely run out. This meant I had a conditional acceptance that I could never meet the condition of. However, on the 30th of May, the degree classifications for Computer Science were released. I was amazed to see that I had a First Class degree. It was honestly one of the most amazing feelings ever! 

June was a good month, perhaps the best of the year. A few days after the degree classifications were announced our grades for our fourth year second semester and dissertations were released. I got 7 As and 1 B for my fourth year, and 82% for my dissertation. A couple of days later I was emailed by my mentor congratulating me but also asking me if I'd be interested in a PhD. Without thinking about it too much, I said "I'd be interested in a PhD so long as it matches what I'm interested in". I considered it a backup plan but also something I would have wanted to do at some point in my life anyway if I didn't get into teaching. I also went ahead and started applying for jobs in the industry, just in case, although at that time (and things have changed now) my heart wasn't really hugely set on a job in the industry. I graduated on the 21st of June 2016 and it was one of the best, yet saddest days, of my life - I saw a lot of my friends for the very last time but we were celebrating. Also on the 21st of June, I was told I would not be able to get into teacher training without Higher English and was given all the evidence to prove it. On the 29th of June, I was officially accepted onto the PhD I had applied for.

July was another month of relaxing for me, and of course my birthday. I had a good July, admittedly too relaxed but I spent a large amount of time working on BalfBlog and improving it, with version 2.1 being launched towards the end of July. However, I also was told that the house I had the deposit on was now completely possible since the mortgage I had applied to was now possible too.

August was another month of relaxing, and a week away up in Perthshire as always. It was an exciting month for me because I knew that I would be starting my PhD in a few weeks. 

September was obviously the month I started my PhD. It started off very quiet, I did really know what I was doing. I felt quite lost. At the end of the first week, I seemed to feel like I was part of it however, with my supervisor treating me to lunch and explaining how the first week always feels like that. Week 2 of my PhD and I was helping at my first ever conference. I really enjoyed this, plus I got to see inside the new gym at the university. The conference allowed me to see just how these things work and how they benefit the subjects of the research so greatly, with many of them praising the work of the researchers. I also met two really good friends in September; Lewis and Ana, who have both been very supportive of me over the last few months and I couldn't have stayed without the two of them (it'd have been very boring). I also began lab helping again, something I thoroughly enjoy doing

In October I was diagnosed with a form of dyslexia (which I have obviously obtained from my treatment, which is what my doctor also believes also), which explains why I have difficulty reading for long periods of time (though this may have just been attributed to general brain fog). Dyslexia has not affected me in a huge way, since I can still write, spell and read, it just makes it more difficult for me to concentrate on reading for long periods of time. However, finding out that what I originally thought was true was very discouraging for my PhD. On top of that, there was a nightmare and disaster going on around me, since there was a huge problem with one of my friends. I'm not going to explain it for obvious reasons, but it had a huge effect on me. For the first time in 2016, I was actually feeling depressed again. However, there were still some good things in October, with the Computer Science department celebrating 50 years, and a fantastic dinner and lovely evening (where I got to meet Alex Balfour, the man who brought the first Computer Science degree to Scotland at Heriot-Watt). 

In November I felt I had to go back to my bank to double-check on the mortgage. To my disappointment, the bank had now changed their mind and was not prepared to give me the mortgage they had been able to get me before. My PhD, paying in a net salary, was not enough for the house any more. As a result, I started to get bad feelings and felt that this house was too good an opportunity for me to miss and that I need to think about myself rather than what others think for the first time. This house means a lot to me, and I may never get another attempt at such a good offer again, so I have to pursue it. On top of that, I felt really down because of the situation in October and felt like the PhD was no longer for me. After discussions with my parents, friends and a few others, I decided to stay with the PhD but apply to jobs. I made a promise that if none of the 20 jobs I applied to wanted me, I would stick with the PhD. I think a lot of that worry about the PhD did stem from the fact that I began to think about what I was doing and whether I could stick for the four years that I was being told it would take (when I applied it was 3).

December was a good month to start, with me feeling a lot more motivated about my PhD and getting on with it again. I got my scan results on the 7th and they were good again. I was also phoned by the bank to tell me that would be able to offer me a mortgage, but I'd need to increase my deposit by £3,000. However, on the 12th of December, I got a seriously bad spell of a little bug. This bug meant I was unwell for a whole 2 weeks, and I actually had to go to the hospital at one point because it was so serious. I finally recovered fully and was eating again on the 21st of December. It didn't end there, however, because the bug had put me into depression, and perhaps the worst depression I had ever had. I just could not shake it. We also found that our lovely little hamster, Henry, had a couple of tumours and not long left to live. We were all devastated by this news. Christmas Day arrived and I was still not feeling great. I enjoyed Christmas as always, but it was perhaps the worst Christmas ever due to my depression. Sadly also on Christmas Day, George Michael, one of my mum's favourite singers, passed away. I really liked Wham myself so it was also very upsetting for me. On the 27th I went away for a night up north and it seriously fixed me. Just that one night away was enough to get rid of my depression this time and so I was cured. And here we are now. The end of the year. At the moment I am not working and not doing anything but relaxing and, as I do every year at this time, completing The Legend of Zelda: Majora's Mask once again.

I'm hoping 2017 will be a much better year, and as I once said, the odd years are always much better than the even ones for me. I cannot see myself doing my PhD much longer since things have got very fraught between other people in the department and I'm always the one picking up the pieces. 

Posted in Life
2016
look
back
hindsight
year

Wishing you all a Merry Christmas 2016! I hope you all have a wonderful Christmas 2016! Here are some Christmassy pictures for you to enjoy (all stock and royalty free, but thanks to the people who made them)! 

Snowman Reindeer Christmas Tree Merry Christmas

Just remember the real message behind Christmas, and don't forget what Christmas is really all about!

Powered by DASH 2.0