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

ZPE for the last few months has been in the back-burner a bit, something I absolutely hate to have to admit, but it's been like this because of the fact that it's really such a complete language. This makes it hard to add new innovations to the compiler design and features to the interpreter. 

For a long time, Typo has been under development and unfortunately has yet to be released. During the days of BRS, Typo was an easy system to implement but because of the fact that ZPE focuses on speed of compilation Typo has been difficult to implement. 

The future of ZPE is not going to be about updating each version with new interpreter functionalities but focusing on tightly integrating the design so that it supports 'plugins' - but not plugins to add features but to add more built in functions. The standard library (stdLib) did this in a way that expanded ZPE using only the ZenLang code and in turn only used features that already existed to build a set of very useful tools.

ZPE's plugin system is powerful and efficient, so development of smaller functionalties is a good idea - it will also keep the size of the main executable file down to a minimum thus making it more portable for users who do not need all of the functionalities. I recently added a new function for testing if a built-in function exists so that applications can be independent of versions.

I hope you have enjoyed using ZPE to date and I'm looking for feedback. Version 1.4.4.3 includes the feedback command, so all you do is type into your code to leave feedback:

feedback();

A couple of months back I was the victim to a website (not to be named) that was hacked and ultimately gave the information of it's users away that ultimately included my information. The reason behind this was that passwords were not stored in a effective manner. This meant that the minute you have access to the database you have access to all of these passwords.

What this now meant for me was that they had my email address and my actual address and began to subscribe me to many things I would never sign up to whilst also sharing my user name and password details on the web. It's a cold and horrible thing for someone to contemplate doing because I had done nothing to them in the first place for them to launch an attack at me. And to be honest the website who was a website who's sole duty was to help others - so it's pretty cruel to do that. Anyway, storing details about people in a secure manner is an important factor of online security.

What an unsecure database may look like

In a world where security is not a thing, algorithms such as the SHA (secure hash algorithm) would not exist in the field of security. In fact, the field of security would not need to exist. But unfortunately, because there are people who want to either steal something or just for the sake of it damage something, we have to compensate for this by developing secure ways of storing information.

In the world without security however, passwords could be stored as plain text - simply as they were typed in to the text input. This means that anyone who has access to the database can then scroll down to the appropriate field and read their password. Unfortunately however, if a hacker gains access to this information, they have access to the raw password - that's the password they can use to login to the system. This is not good. So database designers and web developers and so on go a step further and use some kind of algorithm to conceal the password.

How to store sensitive data effectively

When data like a password is put into the database it should be encoded using some kind of algorithm.

The first way of storing passwords is to create or use an encryption algorithm to encode the password and a decryption algorithm to re-obtain the password from the cipher text. This method is uncommon because it means that there is at least one method to decrypt the password in the database, and therefore leaves open a security vulnerability (if someone obtains this decryption algorithm and the key needed to decrypt the passwords, they can simply decrypt every password and it's easy enough to figure the key out if you have a password and it's cipher text). 

The most common algorithm is the SHA because it's been guaranteed to have a one-to-one mapping from the plain text to the cipher text - meaning that no two passwords generate the same cipher text. When this algorithm is applied it is designed to be irreversible, that is it is impossible (or at least near impossible) to figure out what the original text was (at least without going through each combination of characters and testing it against the cipher text). This method is more secure than the former since it does not offer a quick way to take a cipher text and turn it to a plain text. 

These are just two ways of storing passwords but you can probably find other ways. I use a combination of both on my website (my own hashing algorithm and my own encryption algorithm on top).

Posted in Tech talk
secure
hash
algorithm
storing
passwords
decryption
encryption
md5
sha

Apple's 2016 event was hyped to be about the new iPhone 7 and Apple will not disappoint. Other things expected included the wireless EarPods and the removal of the 3.5mm jack on the iPhone. 

I'm hoping for a change in the stupid design of the Apple Magic Mouse and having the Lightning connector moved to the top of the mouse so you can use it whilst it charges but that's likely not going to happen.

Anyway, the presentation begins soon so I'll need to begin writing since this post is now live.

Apple + Nintendo

This might sound too good to be true, but I'm happy that Nintendo chose Apple to release their new Mario Run game. Firstly, seeing Miyamoto at the Apple Event was absolutely awesome. The game looks good fun for a mobile game (I'm not a huge fan of Mario games on my Wii U).

Hopefully this move will lead to more collaboration and more games from Nintendo on our Apple devices.

iWork update

The next big thing to be mentioned was the update for iWork. This update adds real-time collaboration with colleagues or the like using iWork applications. This is very similar to the way that Google Docs works or whatever.

Apple Watch

Pokémon Go for Apple Watch

Niantic, developers of Pokémon Go, are now bringing Pokémon Go to the Apple Watch. It's more convenient than checking (or staring) at the phone screen and I think although the audience didn't look too interested, I think it looks great.

Apple Watch Series 2

Whilst it was predictable that Apple would make the next iteration of the Apple Watch more waterproof, the way it has been designed is phenomenal. The speaker that is used to expel water after a swim is well thought out that only Apple would do. The screen has been revamped too, now with a brightness of 1000 nits. It also now includes built-in GPS. It now also features a dual-core processor.

Obviously, Apple has also released some new designs too. Nike came on to talk about their new Nike Plus Apple Watch which attempts to motivate you to run - to me perhaps the most useful reason for me to get an Apple Watch since I cannot even motivate myself to get out and run!

Apple has priced the Apple Watch Series 2 at $369 and renamed the original watch as the Series 1 and priced it at $269 and added the same dual-core processor found in the Series 2.

Pictures of the Apple Watch 2

The new Apple Watch Series 2

iPhone

Apple has now sold over a billion iPhones - making it:

The best selling product of it's kind in the history of the world.

iOS 10

You can now raise your iPhone to activate it. Machine learning has been added to the autocorrect in the keyboard. HomeKit has had a major improvement, adding it to the Control Center and adds hundreds of support. Tim Cook believes that HomeKit is going to be a big deal.

Messages is getting many new features including stickers and the ability to send payments using the messages app.

iPhone 7

iPhone doesn't always excite me - I'm more into the Macs, but I'm excited this year because it's the tock in the Apple tick-tock cycle.

A 'gorgeous new design' according to Cook. The new iPhone 7 actually is beautiful and it's high gloss back looks absolutely amazing. It's made using as few parts as possible, making it more solid than previous versions. The antennas have been far better hidden and don't look as ugly as before. Here's a picture of the new iPhone 7 in gloss black. 

Pictures of the iPhone 7

The gloss black iPhone 7

As expected, the iPhone's home button is getting haptic feedback and the iPhone is being made water and dust resistant. It's classified as IP67. 

The camera is still 12MP but has a better flash LED. Phil Schiller also explains that the images are much better and showed some examples that show how good it is when the object is moving. The iPhone 7 also features a new 7MP front-facing camera. 

The iPhone 7 Plus now features a 2x optical zoom - nice addition but not enough yet and I will stick with the simple iPhone 7 if I get it.

However, the addition of the portrait feature might sway me, since this allows you to take a depth of field photo - and they do look amazing. Here's the picture shown in the event:

Depth of field photo

A depth of field photo taken on the iPhone 7

It's about time but Apple has finally added stereo speakers to the iPhone 7. Another expected change was the move from the 3.5mm audio jack to the Lightning connector - something that is nice but will take time for people to change to. Apple has kindly included an adapter from Lightning to the 3.5mm jack. My main concern now is how this will work with my next MacBook Pro (not considering one at the moment).

Next: Wireless EarPods, known as Apple AirPods. I must admit, I really dislike the looks of them and really wouldn't go around with wireless waves going through my head like that but they may appeal to some! 

Apple has added their latest quad-core CPU to the iPhone 7 called the A10 Fusion - 120x faster than the original iPhone, 40x faster than the iPhone 5 and 2x faster than the iPhone 6. Its design is unique in the sense that it runs two cores on low-performance mode which are designed for processes that require less power and this should make it more power-efficient. In terms of graphics, the new graphics processor is 240x more powerful than the original iPhone's graphics processor. A sample of this was shown where we get to see 400 flying monkeys. Phil then tells us that:

Nothing proves performance like 400 flying monkeys

Apple claims that they have improved the battery life over the iPhone 6. We'll see about that.

As always, I'm happy to hear that Apple manufactures using the most environmentally friendly materials available. 

The end

As always the event finished with a song and I must admit the song was a dreadful choice in my opinion, but that's just me. I was also disappointed that no new Macs or a new iPad were announced today. Overall the keynote was good and the iPhone 7, which dominated the keynote, looks beautiful.

I was a bit disappointed to find out Apple is not offering the 32GB model (which is now the base model) in the Jet Black model, but as I have a 64GB version as it is I may choose the 128GB anyway. I still believe this will be an off putting factor for many.
Posted in Apple Corporation
apple
keynote
event
2016
september

ZPE production has currently stopped as I have decided to focus on my other projects a bit more at the moment. These projects currently include BalfBlog and my PhD. As a result ZPE production has currently been halted. This is a decision that has been made since ZPE is currently pretty stable and is already very impressive. 

ZPE was never meant to be just another programming language, simply a little project I've been working on, and one that's given me a great insight into building a compiler and a language, as well as given me a lot of fun and something I can actually use to do some tasks.

The primary focus for me now is on the improvement of BalfBlog which is currently pretty stable too. BalfBlog needs new features added to it to make it more powerful and useful, but as I say it's pretty much done now anyway. 

zpe
future
zenith
engine

When I first released my website, there were occasional pages with expletives within them but as my website became more and more public and eventually used within my role as a teaching assistant I had to make the decision - remove them all or just hide them.

At first, the latter appealed to me more. I developed a JavaScript (using jQuery) script that would simply hide the words and show them when the user hovers over the word. I have since decided to remove this in favour of removing the words altogether but I thought I'd share my original code with you:

JavaScript
//Swear words
if (showSwearing) {
	jQuery(".swear").mouseenter(function() {
		var sword = jQuery(this).attr("data-sword");
		var nword = jQuery(this).html();
		jQuery(this).attr("data-nword", nword);
		jQuery(this).html(sword);
	})
	.mouseleave(function() {
		var m = jQuery(this).attr("data-nword");
		jQuery(this).html(m);
	});
}

This very simple script works on the basis that each word contains an nword (normal word) and sword (swear word) set in the data attributes on the span element that contains the word. As I say, it's a simple little implementation that works well enough for the job, but you could do it quite easily with CSS.

BalfBar has had a significant improvement to make it even easier to get your website the way you want it. You can now forget about setting the height when BalfBar becomes a fixed menu - it figures it out itself. Now all you need to do is tell it you want it to check for this and it will make the decision as to when to float the menu.

On top of this, a significant chunk of JavaScript has been removed from the core, making it much more streamlined and lighter. Suggestions for future versions can still be made on my website.

Posted in BalfBar
september
2016
improvements
balfbar

I'm very happy to say that I have kept my word on website changes in that I haven't made major changes to the structure of my website in the last year. Minor usability tweaks have been made but nothing major, and a lot of the stuff that I have changed has remained quite consistent with the 'new' flat interface.

General tweaks to make the site more efficient with bandwidth and processing time have been made and as a result, I feel that my website is much better, even better than it was a year ago when I made the change to remove a few hundred lines of JavaScript and CSS and made my website much flatter.

If you feel the same way, please leave feedback, I'm really interested to know. Also, my website achieved 1000 people each week this month - by a long shot the best result to date. It has also moved up 11,852,082 places in the Alexa ranking system as a result of this surge in the last month alone. 

Alexa Ranking

I think a lot of the improvement on my website comes from the fact that I have not been focusing on these changes and ensuring that there is good content on my website, as my blog is now one of the most viewed parts of my website and my reviews are not far behind. 

A lot of the time changes are now directly to improve the DragonScript concept for a more efficient server side website. I have also been removing bits and bobs from the accessibility menu, since I no longer feel the need for this.

However, as a suggestion was made to me to do this, I will be updating my website with a new cover picture-esque thing like Facebook pages have. This will likely be a picture of Perthshire or somewhere in Scotland.

Posted in Website news
website
changes
2016
nothing
new

As HTML, CSS and JavaScript keep advancing, the power that resides in your web browser grows. More can be done efficiently and interactively with JavaScript in the web browser, and with server side languages doing back-end processing. As a result of this, more and more software applications are being written in web languages instead of standard systems languages such as Java. 

This post has come to be because of something I noticed the other evening when out for dinner at one of my favourite restaurants - they were using Google Chrome to manage orders and so on, this was the first time I'd ever seen this kind of e-commerce application.

I'm a huge fan of web technologies and developing for the web, but I'm not entirely a fan of the use of the web to develop every bit of software required out there. For a start, none of the languages used on the front end are compiled before being sent (now this would be a good idea for JavaScript) so it's easy to manipulate them with some kind of other underlying program (such as a virus). This could indeed by a security problem that could be avoided by a compiled program written in a language such as C. Also, as JavaScript is an interpreted language, it is interpreted considerably slower than that of a compiled program.

But web based technologies do offer some major advantages that can be seen as the main reason for their use.

The first is that they are available on any computer with a web browser. This also makes them platform independent since the web is a single standard that must be implemented by all web browsers. It also means if they are on a server somewhere, they can be accessed from anywhere and indeed do not need to be installed.

The second reason is because of the kinds of tasks being performed in these applications are relatively simple and do not require the full power of a system. As a result, the JavaScript scripting language is sufficient for performing these tasks and therefore cheaper too.

The third reason relates to user-preference as web-based applications offer a much easier alternative to other applications when it comes to setting user preferences. First off, we have cookies and session storage. Both of these let us save information for later and quickly restore it, and there are plenty of APIs for using this kind of stuff. Secondly, CSS makes it really easy to style items on the screen and is far more favourable for most companies out there.

Processing performance is a big advantage here too since we can do major processing on a server that is connected to the application rather than doing it on the local machine. This is a huge advantage that can help with mission-critical situations, such as a traffic monitoring system. 

Another major argument is scalability. Whilst some desktop languages really suffer as applications grow, web applications are by nature sub-divided into smaller programs and can be seen as more scalable. Expanding an application written in web based technologies does not need a full redeployment of the application, simply that a user refreshes the page. 

Security is also a huge advantage now, at least in terms of keeping parts of the application safe. This is because the code that is stored on the server will never be transferred to the client, so you can keep all of the secure stuff away from the users of application. This all makes it less likely that the application will be misused by its users.

Finally, the main argument for many developers, including myself, is ease of development. HTML, CSS, JavaScript, PHP or JSP are easy to develop for. It is this argument that draws most developers to it.

Posted in Apple Corporation
software
in
browser
web
html
css

As many of you know, I'm a huge fan of the Warcraft game series and since the very first game I ever played was a Warcraft game, I've always been not only entertained by the series but fascinated by it's lore. 

Once about 10 years ago, slightly after the release of World of Warcraft, I declared that I could not play the game because of two reasons. The first of those was the price of £8+/month and the second was that I believed it would ruin the Warcraft story lines. 

Well today, I tried out WoW for the first time (and I've been wanting to do this for a long time, but I really do not like the idea of playing it on my own). My opinion has changed. I learned so much about the mechanics of the game today (I thought at first that players battled each other constantly, it seems I was wrong!).

Today I even got the pleasure of experiencing a moment I remember from 14 years ago when I played Warcraft III (my favourite game of all time) for the first time when I saw King Terenas' throne room.

King Terenas' throne

An amazing sight - King Terenas' throne

All of this is enough to convince me that this game is for me. 

I obviously thank my good friend Calum for finally making me see sense and getting into WoW!

Posted in Apple Corporation
world
of
warcraft
wow
blizzard
entertainment

With Pokémon Sun and Moon just around the corner, I felt that it was high time that I compiled a top ten list of the worst Pokémon in terms of design. Remember, this is opinion based. Disagree all you like but it will not change the fact that this is my opinion.

I think my list does pretty much summarise the worst designs and names, and I think it goes to show just how bad it's getting over time. My list is only the top ten, I'd like to say that other Pokémon deserve to be in here too such as Magmortar, Diggersby, Probopass and Binacle. 

#10 - Escavalier

Escavalier

I'm just not a fan of either Escavalier or Accelgor. Escavalier (for those who do not know, cavalier is French for a knight or mounted warrior) is the combination of a cavalier and Excalibur (King Arthur's sword). The Pokémon has two jousting lances, which just look ridiculous in the first place, and is encased in armour not too unlike that which cavaliers would have worn. Just silly and uncreative. 

#9 - Machop, Machoke and Machamp

Machoke

These humanoid Pokémon really make me angry and always have. The very fact is they are based entirely on humans. The name is even pathetic since macho is a word in English which just means 'tough'. They even wear a pair of underwear and have slick back hair. All in all, Machoke is my least favourite of this family since it really does resemble a human far too much.

#8 - Purugly

Purugly

I hate cat-like Pokémon in general since all of them are incredibly boring. None quite make it to the same ranks as Purugly. It's name is just atrocious; a terrible combination of pur (like a cat) and ugly. And it is ugly. This Pokémon shows absolutely no signs of being unique or freshness and really just adds another silly cat Pokémon.

#7 - Cofagrigus

Cofagrigus

A sarcophagus/coffin Pokémon?! In fact, a possessed coffin now makes a Pokémon. I hate the pre-evolution, Yamask, just as much as this, but I pick on this because firstly, it looks childish and pathetic and secondly because this is just pure laziness. I imagine this all the time to reside in Gobi's Valley in Banjo-Kazooie back on the N64, but not in Pokémon.

#6 - Garbodor

Garbodor

Okay, a pile of rubbish is now a Pokémon?! This Pokémon is trash. It's design is horrible. It looks like a combination of a bin liner (garbage bag) and rubbish that's spewing out of it. It's name is terrible too: a combination of garbage and odour. 

I can tell you, I would never be a proud owner having this pile of rubbish as my Pokémon.

#5 - Klinklang

Klinklang

A rip off of the original Magnemite family but with an even worse design. Magnemite and co are one of those families who really look awful, but Klinklang and just feel like somebody thought "you know what, we'll rip of the crappy Magnemite family and make a new range of crappy Pokémon". 

Klinklang is a terrible name too - a combination of klink and klang, two sounds associated with metal hitting together. 

#4 - Chandelure

Chandelure

A fecking possessed chandelier?! Really just when you didn't think it could get any worse (well you probably did since you are reading towards the worst Pokémon design ever) we get Chandelure. This Pokémon's name is a combination of chandelier and lure since being a Ghost-type Pokémon it lures others. Who enjoys fighting using a chandelier then?! 

This Pokémon's typing is great since Fire and Ghost is a rare combo, but because of it's ugly design (and it's family aren't any better) I just refuse to use it.

#3 - Klefki

Klefki

Another 'possessed object Pokémon'. Yeah right! Game Freak once again ran out of ideas and when one of the creators of these Pokémon got into his car and started the ignition suddenly came up with the idea that we could really use a keychain Pokémon. No bleeding way. 

Game Freak still brought it in and we now have our third possessed Pokémon on the list. Another absolute waster of a Pokémon. 

#2 - Honedge

Honedge

Alas, Game Freak, the creator of some of the most successful games ever, decides to continue to shoot itself on the foot with the introduction of Honedge. This is one of the worst names ever. Hone, which literally means to refine or sharpen in the case of a blade, mixed with edge, specifically talking about the edge of the blade. It's evolution's names are just as bad. The name Doublade (double blade) and Aegislash (Aegis was the name of Zeus' shield in Greek Mythology and slash mixed into one). 

Anyway, once again we have another 'possessed object Pokémon'. This is another one the developers thought to look to the real world and just cheaply use an object and claim it to be possessed.

#1 - Vanilluxe

Vanilluxe

Woohoo! Number 1! 

I absolutely hate Vanilluxe. This Pokémon has the most childish design of all Pokémon, fails to introduce anything non-real world, and is just beyond belief pure lazy. I despise this Pokémon, and not just because it's an Ice Pokémon, but because this Pokémon is just awful. The name, which appears to be a combination of both vanilla and deluxe, is pathetic. "I'll have a deluxe vanilla ice cream please". Deluxe appears to have been stuck in here also since this is a tertiary evolution, making it the 'deluxe model of the family'.

Who would want to fight using an ice cream?! And how on earth is it so powerful; Vanilluxe has the highest base stat of any non-legendary Ice-typed Pokémon?! 

It's design is awful, obviously appearing to be like an ice cream cone with two wafers in it's head and then a giant cone shape for holding at the bottom. Honestly, when I saw this Pokémon I laughed and shed a tear at the same time - I literally froze and double-checked what I had seen was correct.

I'd like to thank Calum for unintentionally suggesting I write this post.

Posted in Gaming
pokemon
calum
pokémon
worst
designs
2016
sun
moon
generation
7
vii
Powered by DASH 2.0