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

Recently (I'm talking about the last three or four months or so), I relied on restoring an older version from a backup, at least for some parts of the project. The project is, of course, ZPE Programming Environment. This is because the new features added unintentionally caused issues with previously added features. Much to my disappointment, this meant rolling back several versions of the code to mitigate the problems brought by the new changes.

My commit messages helped a lot here but were not perfect. The messages often describe fixes or new features being added but do not detail precisely how I do this. That's because the ZPE Programming Environment core is closed-source, and I do not want to share all the new things in full detail to everyone (particularly when it could affect security). 

Take this commit:

Added a fix that seems to have fixed bug #35 ("Fix excess bracketed calls")

They are far more helpful because I can refer to the bug in more detail. This led to the ZPE Tracker, which is designed to identify and describe bugs and features brought to ZPE and allows commit messages, which could be done just before heading to work, to be much less detailed and just linked to the bug number. 

Anyway, commit messages are designed for several reasons, but one of the main reasons is that if a program needs to roll back to a previous version, finding that version can be done much more straightforwardly. ZPE is multifaceted in that I record commit messages, update the changelog, and maintain a list of bugs and features on the Tracker.

In general, from working in the industry and working on my projects such as BalfBar, DASH etc, commit messages must be incredibly detailed. They are designed to ensure that other developers can pick up the code and figure out exactly what happened in the last commit and for team members to see exactly what a developer did on a project. Messages, therefore, must be incredibly clear. 

I got some awesome feedback from a parent of a pupil I teach (I also asked if I could share their feedback anonymously on my website). They said:

[My child] thinks the world of you and everything you do for the school. We also know all the great work you do for the school, and all we hear is great things about your class! We also love what you've done with your lessons by making them all online, and they are great. Thank you for everything you do!

I was, of course, over the moon with this feedback, but I also know I put a lot of work in for the pupils and do my best at all times! The comment referred to my DragonDocs tasks and the interactivity that it brings (which has been praised several fold in the last few weeks by many pupils).

It's very nice to get feedback like this from a parent, especially after having had feedback from some parents at the weekend, too, to add to this!

Did you know that in CSS, counters do not affect elements that are display : none? What I mean is that they do not increment inside an element with display : none.

I recently discovered this weird little anomaly whilst building in some updates to DragonDocs and I never knew this. 

In the last few weeks I have been focusing on improving DragonDocs and DragonSlides interoperability. To that end, one of the things I wanted to do was reduce the number of file reads and writes, which have always been a risk for bottlenecking. As a result of the constant back-and-forth nature of reading JSON data for the API, the file reads are wasteful. Instead, I've decided to use APCu.

APCu allows me to store the JSON data in RAM rather than on the SSD storage. SSDs are fast, but RAM is considerably faster. There is a noticable improvement to the system as a result of this update too. 

I moved into my current house four years ago today!

This is my first house but not the first time I've lived away from my parents house as that was in 2013 when I moved into my halls of residence at university. 

It was strangely easy buying my house back in 2021 as I had saved enough money up myself (I was saving an awesome £1200 - £1600 a month at the time and had been for the last 4 years) and I got a slight discount of 5% for being a teacher so I had the deposit I needed. Buying the house took place in August 2020 where I put down my deposit for the house to be ready for April 2021. I remember it kept moving between April and June but eventually towards the end it ended up being February. 

Living here has been so much nicer than living at home (obviously) and I've done a lot of stuff to the house since moving here including running a network around the house, I've had my garden done beautifully (thanks to mum), getting my loft boarded (I couldn't live without this as I'd have nowhere to store stuff), I've installed my own smart home with Home Assistant and I've now got my fabulous CleverCloset understairs storage.

I'm always happy to come home to this place and whilst I have plans to move to a different life style in the next few years, I will continue to enjoy living here. 

Today marks a special day. Today, four years ago, I got the keys to my first house! It was a wonderful day until I was told I couldn't move in because the mortgage provider hadn't released the funds on time, so I had to wait over the weekend until Monday.

However, perhaps more significantly, ZPE 1.2 was released on this day ten years ago. 1.2 was the most significant change to my programming language and environment ever and was the first version of ZPE that replaced BlackRabbit 1.1. BlackRabbit was the precursor to ZPE, but the performance was never on par. It was named after Petro, my adorable and wonderful little black rabbit. 

After a weekend of looking at my whiteboard, this is what I've come up with.

I'm pleased to announce that after nearly ten years of using hash maps in ZPE, I've switched to using my new binary search tree implementation. This improves performance further than before since in some cases my hash map, which is some 8 years old, would lead to collisions that in turn presented a O(n) case. This was not good. 

The worst case for a binary search tree is indeed O(n) also and it's best case is actually worse than that of a hash map, which is O(1), but I've been testing out a new binary search tree I've developed and it performs marginally better. What's really cool about the binary search tree implementation is that it is actually a drop in replacement for the hash map I've been using for the last few years with methods like put, get and so on. 

Throughout the next few weeks I'll continue to assess this. 

It's sad that I have to move from Disqus after moving back to it only a few years ago, but Disqus decided to force ads onto the free tier when a website becomes busy enough. Because I'm now actively getting 6,000 to 8,000 visits a day, Disqus now force ads on to my website, which I think is totally unacceptable and not part of the original model of this website. As a result, I'm building my own comment system again. 

Please continue to use Disqus in the mean time.

BalfML, my own markup language, is now available to view on my GitHub as a formal specification.

Whilst the specification is clear and provides some clarity as to what the language context will look like, it's is far from finished. There are plans to update the formal specification and indeed the markup as I begin to develop Java, Python and C# libraries that will parse the data to the correct format. 

The formal specification of BalfML is similar to that of the specificationless INI format and the TOML markup language. However, BalfML has a few additional data types and features. 

I will soon build this in Java as well as for ZPE. 

I also intend on using this as a configuration format for ZPE soon enough.

The latest version of ZPE is here. And it's met the original target set out. This might be a small update in terms of features, but the features are pretty big. 

First of all, we've got the new ChatGPT model. This model allows for direct communication with ChatGPT using an API key. The setup is simple and is done within the properties file. It can be used to assist in the editor as well as can be using as an object in code.

Second, we've got two new parsers; TOML and INI. Both formats are similar but offer advantages. I like TOML as a format and have considered using it as the main form of property storage in ZPE. INI is simple and basic and less likely to find use with me but it's great to finally have two new data formats that can be decoded by ZPE. 

ZPE 1.13.2 will be released very soon and I'm also planning for two releases in February. The first new features that will come to ZPE are the encoders for both TOML and INI files. I also want to release an XML encoder by the end of February as well.

ZPE has increased in file size however, and this is due to the inclusion of ChatGPT. It's worth it though.

Powered by DASH 2.0