Nowadays, most of us take cryptography for granted. In every email we send, online purchase we make, every WhatsApp message we send, we are benefiting from centuries of cryptography. There has always been the need to send messages and to only have certain people read them.

An early (and well-known) example of cryptography is the Caesar Cipher, named after Roman General and Dictator, Julius Caesar. When sending private correspondence, Caesar would shift each letter of the alphabet down a certain number of letters. This number of letters (the key) would need to be known by the recipient in order to decipher the message. They would simply reverse the shift to decipher the message.


The next logical step in creating a cipher was to randomly assign each letter to another. The key in this case, would be each letter and its random match. This is a much more powerful cipher due to the huge number of possible keys. In response to substitution ciphers, Frequency Analysis was used. In the English language, some letters are used more than others. Think of Scrabble – “E” is much more common than “Z”. If you study the frequency of each letter in English, something like a digital fingerprint will appear as seen below: 


Frequency Analysis

Note that these are only averages. In the secret message the letter E may not be the most common. However, the larger the piece of text, the more it will resemble the above frequencies. It was now possible to crack the Substitution Cipher by deciphering one letter at a time. 

There has always been evolution with cryptography. A new cipher is constantly under attack from code breakers. As a result, cryptographers have looked for more complex ciphers throughout history. The Vigenère Cipher was a considered a breakthrough for code makers.

“It has the alphabet written out 26 times in different rows, each alphabet shifted cyclically to the left compared to the previous alphabet, corresponding to the 26 possible Caesar ciphers. At different points in the encryption process, the cipher uses a different alphabet from one of the rows. The alphabet used at each point depends on a repeating keyword.”

No longer would the most common letter be the letter E. The letter E would have different ciphers at different points in the message. It wasn’t until 1854, over two hundred years later, that the Vigenère Cipher was finally cracked by the British cryptographer Charles Babbage. Babbage employed a mix of cryptographic genius, intuition and sheer cunning to break the Vigenère Cipher.  Below, is a Vigenère Square which is used to encipher a message.


With increased computational power in the 20th Century, cryptography has taken another leap forward. Famously, the Enigma machine (with a possible 150,738,274,937,250 keys  ) used by Germany in World War 2 required the use of the “Bomb” computer developed with the help of Alan Turing.

Modern Cryptography

In the age of online communication, there has been a need for greater security when transmitting messages. The issue that has always existed in the history of secret messages is protecting the key. The recipient of a message needs to have the key in order to decipher it. How then can you safely get the key to the recipient without it falling into the wrong hands?

One solution was to use a mathematical operation that is easy to do in one direction, but not in the other. For example, you can multiply 453,658 by 789,624 and in no time have 358,219,244,592. However, if I gave you the number 358,219,244,592 and asked you to find the two specific numbers I multiplied to get it, it would be a much tougher task. Image such a problem on an exponentially larger scale and you can start to see the difficulty. The issue now became finding a key, I.e. finding an operation that was easy to reverse only if you have a mathematical key.

In 1974, GCHQ’s Clifford Cocks was able to solve this problem by writing a one directional formula. It allowed messages to be sent over the internet where anyone could read the encrypted text. However, only the recipient would be able to decipher it using another of his formulae.

Nowadays, we can send messages that cannot be cracked by the best secret services in the world. For the first time in history, we all have access to unbreakable codes.


The fifth generation of mobile network (aka 5G) is on its way. How fast will it be? What will be possible? Will I need to get a new phone?!  When 5G arrives we can expect to see drones monitoring cows Netflix for gaming  and, eventually, a world without traffic lights.

Wait. Didn’t we just get 4G?

It seems strange to move onto a new generation when 4G has only 77.28% penetration in the UK. Put simply, 5G equals faster upload and download speeds than 4G. It is believed that speeds will be between 20 to 30 times faster than the previous generation.  All of this is possible because of the use of “high-spectrum band” frequencies. Better use of the radio spectrum will allow more mobiles to have access to the internet at the same time. The catch is that these higher frequencies cannot travel as far as 4G signals. This means that more antennas will need to be built.

One of the most notable changes will be felt with latency. Gamers rejoice! 5G may bring an end to dreaded lag. While 4G had latency of approximately 45 milliseconds, 5G’s latency could theoretically be as low as 1 millisecond. This would make delays undetectable to humans.  With vastly greater upload and download speeds, incredible changes will be possible using new technology. An internet connection will always be there. The Internet of Things (IoT) will become a reality.

You can expect driverless vehicles to take advantage of 5G technology. The low latency will be vital in keeping the vehicle on the road and making split-second decisions.  Imagine opening your door in the morning to find a parcel delivered by a delivery drone. This is not far from happening with Amazon applying for a patent for its own hack-proof drones in 2016.



Amazon’s delivery drone which can be flagged down as shown.

Emergency services will also benefit. In the event of a disaster, drones would be able to access hazardous areas whilst remaining in constant communication. Wearable tech will also be able to communicate immediately. Ambulances could be contacted automatically if a person is injured or has no heartbeat.

The fun part

5G will truly change how we consume media. In gaming, it will be possible to stream games rather than own a physical copy. A Netflix-style business model would become a real possibility. Along with developments in cloud computing, 5G will signal the end of games console as we know it. Furthermore, Augmented Reality and Virtual Reality on the go will become a reality.  Increased download speeds will allow for the streaming of 4k Ultra HD video without buffering issues.

With 5G not due to roll out in the UK until 2020, we have a while yet to wait in anticipation… and yes, to access the new 5G network you will need a new phone.

There are two types of collections: generic and non-generic. A non-generic collection is one which can contain any data type, whereas the generic collection must state the type as a parameter. Generics can be considered safer to use as you have greater control of the data involved. Microsoft themselves recommend the following:

“Be sure to choose your collection class carefully. Using the wrong type can restrict your use of the collection. In general, avoid using the types in the System.Collections namespace unless you are specifically targeting .NET Framework version 1.1. The generic and concurrent versions of the collections are to be preferred because of their greater type safety and other improvements.”

Here is a brief explanation of some of the more commonly used Generic Collections. This is not an extensive list.



Generic lists are ideal for storing and retrieving large number of elements. You must specify the data type <T>. As you add entries the size of the list will expand – it is not fixed. 

The data can have nulls and duplicates and supports indexing. Lists are not guaranteed to be in order, so the Sort() method may be necessary.

Dictionary<TKey, TValue> 

A collection of key-value pairs where the data type of each is specified. The key is used to identify and order each pair. It acts as primary key so it must be unique and cannot be null.  The values can be null or duplicates.



A SortedList is quite similar to  a Dictionary, although the SortedList uses less memory. 

It is a collection of key-value pairs that are sorted by the key in ascending order. When a new value is inserted, it is automatically placed in the correct order and the indexing adjusts accordingly. The key must be unique and cannot be null; the value can be null or duplicate. You can also have a non-generic SortedList which can take any data type.



Similarly, a Stack may be generic or non-generic. Stack<T> can be described as a last-in-first-out (LIFO) non-generic collection of objects that are of the same specified type. Use a Stack if you wish to access data in a reverse order.



A first-in-first-out (FIFO) non-generic collection of objects.  A Queue can be used to access data in the same order as it is entered in. Both Stacks and Queues are useful when you need temporary storage for information; that is, when you might want to discard an element after retrieving its value.


Each collection type has its own strengths and weaknesses, but which to use? It really comes down to what the situation calls for:

  • If you need to access the elements in a certain order, you should choose to use a Queue<T> for FIFO or a Stack<T> for LIFO.
  • A Dictionary<TKey, TValue> or List<T> would be suitable if you needed to access each element by an index.
  • If you need to sort the elements differently from how they were entered, you could you a SortedList<T>. A List<T> also has a Sort() method which could also have the desired effect.


Be aware that there are many other types of Generic Collections which may better suit your needs:

  • LinkedList<T>
  • Collection<T>
  • KeyedCollection< TKey,TValue >
  • SortedDictionary<TKey,TValue>

We all make mistakes – it happens. Luckily for most of us, these mistakes may only result in a minor inconvenience. From getting your “There, Their, They’re” mixed up, to forgetting to include punctuation; typos are a fact of life.  In programming a typo can happen as easily as a slip of the finger. Such slips are easily caught thanks to an IDE such as Microsoft Visual Studio.  Even if something slips through, what’s the worst that can happen…

A lot can happen, actually! Spare a thought for the programmers who made the following simple, yet incredibly costly mistakes.


Aliens: Colonial Marine


In 2013, the video game Aliens: Colonial Marine was released to widespread ridicule. Despite high hopes, the game was found to be practically unplayable with noticeably glitchy AI.

In October of 2017, a possible reason for the glitches was discovered – a single misspelt word. A typo was found in the game’s configuration file. A word should have spelt “AttachPawnToTether” but had instead been spelt “AttachPawnToTeather”. This caused the enemy Aliens to have no understanding of where they were in the game. They would randomly appear or not react to the player at all.  Despite strong initial sales, the game ultimately flopped. Poor reviews and online scores saw to this. But for a single letter change, Aliens: Colonial Marine may have had a completely different fate.


Mariner 1


Launched in 1962, Mariner 1’s mission was to survey the planet Venus. At a cost of approximately £380 million in today’s money, its downfall was partially caused by one of the most expensive typographical errors in history.  Shortly after take-off, Mariner 1 went sharply off course. Alarmed by its trajectory, NASA decided to hit the self-destruct button. Reports at the time stated that a misplaced hyphen caused an error in the guidance system.

While the “most expensive hyphen in history” has been widely reported as the reason behind the failure, NASA have since announced that this was just one of many bugs. Nonetheless, Mariner 1’s 5-minute flight was a serious blow to NASA’s reputation during the Space Race.


Ariadne 5


In June 1996, it was the turn of the European Space Agency (ESA) to rue software errors. The ESA were planning on launching a group of spacecrafts called Cluster, using the brand-new Ariadne 5 rocket. On its maiden flight, a catastrophic system failure lead to the self-destruction of the rocket and its payload.

Ariadne 5 had been designed to use much of the Ariadne 4 computer systems. However, the faster engines exploited a previously unknown error. They had failed to protect against integer overflow. The system had tried to force a 64-bit integer into a 16-bit space. This overflow caused a complete system shut down and lead to an expensive blot in the ESA’s copybook. A software handler that could have dealt with the problem had been disabled, and so there was no levee to dam the cascade of system failures that led to the destruction of the thankfully unmanned spacecraft.


Let these events serve as a reminder for the importance of proof-reading. Now go and review that code you’re working on before you publish it!

Prior to working in software development, I was a primary school teacher specialising in Computing. While not the traditional route into programming, I did gain some valuable experience in the classroom. In recent years, the market for computing and programming products in education has steadily increased. With Apple, Microsoft and Google muscling their way into British classrooms. It seems that everyone wants in on the action.

However, there are some fantastic (and free!) educational resources that are already available for the young coder. Both the BBC Micro Bit and Scratch are great introductions to computing with resources freely available online.  


MIT’s block-based coding system, Scratch, was one of the pioneers in child-friendly code when it first appeared in 2002. Through numerous iterations Scratch has developed into an outstanding educational tool. The system eliminates most syntax errors as only certain blocks fit together.


Scratch can introduce concepts such as conditional operators, loops, events and even lists and variables. The program is entirely free and can be run through your browser. The Scratch website also features a vibrant community with literally thousands of projects uploaded and shared. There is a low-ceiling, high-threshold approach to Scratch. It is simple enough for a 7-year-old child to use; it can still be seen in introductions to Computer Science courses.


Above:  Shark Attack Remastered!

BBC Micro:Bit

Another route into computing is the BBC Micro Bit. The older programmers among us may remember the original BBC Micro, released in the 1980s, which was used in schools to teach about computing. The latest release, only a mere 33 years later, is the BBC Micro Bit. An initial batch of 1 million devices were given out to Year 7 students for free with the hope of encouraging a new generation of tech-savvy learners.


Consisting of a 5 x 5 array of LEDs, an accelerometer, a magnetometer, and two pubuttons, the Micro Bit is perfect for physical computing projects. The 23-pin edge connector allows for electronics projects. Below is an example of one of the projects you’ll find on the Micro Bit website. The block code creates a Rock, Paper, Scissors game, taking advantage of the accelerometer.  


It is even possible to use a Micro Bit in conjunction with Scratch! As your knowledge with coding increases, you can move away from block-based coding and use JavaScript.

For those unable to get their hands on a Micro Bit , the BBC have provided a digital simulator so that you can still practice coding and see the output.  If you are looking for a way to introduce young people (or teachers!) to coding, Scratch and the BBC Micro Bit  would be a great way to begin. If you have a coding itch that needs a Scratch, or if you have the Bit between your teeth, have a look at some of the following resources and get coding!



BBC Micro Bit 

Life is a highway … or a roller coaster … or is it like a box of chocolates? In software development, metaphors can be very useful when trying to understand a new concept. I have been reading the excellent Code Complete 2 by Steve McConnell. In Chapter 2, he states the following: 

A software metaphor is more like a searchlight than a road map. It doesn’t tell you where to find the answer; it tells you how to look for it. ” 


I have had my first experience of the Model-View-Controller (MVC) recently and, having worked mainly with Windows Forms, I have found the shift in thinking to be challenging. Despite an excellent lesson from our in-house teacher, Andy, I found that MVC wasn’t as straight-forward as I’d hoped. Knowing the value of a good metaphor, I found a great post that put MVC in terms that I might understand. “Explain MVC like I’m Five“. The title spoke to me.  

I found a series of great comments in this thread, but some jumped out at me more than others. This lead me to search online for other metaphors for MVC – the simpler the better. Below, I have shared some of my favourites.

  1. Imagine a shop with three workers. One is responsible for taking the customers’ requests, one is responsible for getting the item the customer wants, and the third one wraps the item in nice packaging and presents it to the customer.
  2. You walk in a McDonald and you order at the big interactive touchscreen. You place your order at the screen – this is the View. Your order is passed on to the worker who will go and fetch your order – this is the Controller. Finally, the type of order that you have placed is the responsibility of the Model.
  3. Mark understands the toys in the toy box.
    Vicky knows how to set out toys for certain games.
    Charlie tells Mark to get the toys for a certain game and tells Vicky to set them out. Vicky tells Charlie what new game the user would like to do.
    This continues for the entirety of play time.

As I gain greater understanding of MVC, I hope that I will be able to create my own metaphor that works best for me.

Over the past few weeks, I have been working with WordPress to create a new website for a client. As you may know, WordPress is an open-source Content Management System used to create and manage websites. Having a little experience with HTML and CSS, I was looking forward to getting my hands on the website.

One of the most attractive features of WordPress is the expansive library of plugins that are available to users. By using plugins, users can add impressive features to their website without having to write intensive code. In my short time working with WordPress, I have found a few plugins to be particularly helpful.


Most websites will need to have simple contact forms at a minimum. When you add in memberships and donations, you can find yourself creating many forms. Luckily the popular Contact Form 7 came to the rescue. I was able to create a number of contact forms which could then be customised and placed on various pages. In conjunction with the Conditional Fields for Contact Form 7 plugin, I was able to add conditional fields to my forms. For example, a few fields would appear only if the contact was from a business.



Slider Revolution allowed me to add a snazzy carousel to the home page. However, the plugin can also add sliders and hero pages, all by dragging and dropping images. Slider Revolution helped to create an eye-catching experience for visitors to the website without much effort. To create such an effect with my current web design knowledge would have been a stretch to say the least.



As someone who wouldn’t consider themselves to be much of a writer, Yoast offers help when writing posts such as this. Yoast offers guidance for Search Engine Optimisation, i.e. how to improve the visibility of your posts on search engines. You may need to use more complex sentences, or you may need to stop repeating yourself! Yoast offers clear help on how to make your posts more attractive to search engine results. This post is over the recommended minimum word count of 300, but not by much!



Default Featured Image is an excellent example of how a plugin can solve a specific problem that you need to solve. I had been asked to add a default image for every post that did not have an accompanying image. Without having to write code, I found the above plugin which did exactly that. While it may not offer many features, it does exactly what I need it to do.



As helpful as all of the previous plugins have been, they did not offer a level of control that was necessary to meet our client’s specification. WP Add Custom CSS has been invaluable in creating the website. It allows users to add custom CSS across the entire site from one place. You can still use your CSS knowledge to create a consistent and responsive website.

With over 50,000 plugins out there, I’m looking forward to seeing what new feature I add use next.



A lot has happened with Totally Unclutchable since my last blog entry. After weeks of work, I thought that I had created a fairly robust application. How naive I was.

Our resident testing expert, Andy, was let loose on the app and proceeded to break it at every turn. I realised that I hadn’t done enough to control the data being input into the system.  Andy entered strings where there should be integers. He entered characters designed to break my SQL queries. He found errors with the sequencing of steps when adding Cars. He was relentless. This was my introduction to validation. I clearly had a lot of work left to do to remove the Garbage data I was allowing to be used in my application.


What is Validation?

Validating data is when an application makes sure the data being input is of the correct type and is useful. There are several types of validation, but I concentrated on a few areas in particular:

  • Presence Check
  • Range Check
  • Format Check
  • Type Check


Presence Check

In order to add a new Car to the database, every field must be filled. For example, I needed to ensure that every car had a Daily Hire rate. I used the Validating and Validated events of a textbox to do this. I wrote the following method to check if the textbox wasn’t empty as well as checking if the content was a positive number. The user is unable to move onto the next textbox until an entry is made.




Range Check

It is often necessary to only accept values in a certain range. For example, ages must be between 18 and 75 to be accepted. This can be done by setting an upper and lower limit or by using comparative operators to make the checks. I have also gained some experience recently with ASP.NET Web Forms. The built-in validation tools make such a check much easier.  RangeValidator simply checks if the input is in between two fixed values.


Format Check 

Totally Unclutchable asks users for email addresses, phone numbers and postcodes. I found it quite complicated to create checks that allowed the correct formats. However, once I was introduced to Regular Expressions (Regex) it made the process much more accurate. Regex allows the programmer to decide which characters can be used and the format they can be used in. As an apprentice developer, I found it daunting to have to write my only expressions. Fortunately, Regular Expressions can easily be found online for the most common formats.


Type Check

As mentioned in Totally Unclutchable – Part 1, I designed the tables in my database to accept certain data types. For example, the Minimum Age for a Car is an integer; the Daily Hire Rate is a decimal. If my program fails to pass in valid data, it will crash. Therefore, checks for data types need to be done before calling to the database. I found that I needed to convert the text from textboxes to integers, decimals or valid dates. As you can see below, the DateRegistered required a timestamp to be appended for SQL to accept it.


Stopping the problem at its source

As I learned more of the properties of each control, I was able to be more sophisticated with my design. For example, in the Add Booking section, a user needs to select the start and end date of their car rental. I limited the dates available by using the MinDate and MaxDate properties of a DateTimePicker. I had prevented incorrect data from being input through improved design. If possible, it’s worth eliminating the need for validation checks.


The best way to learn to code is to actually code. I have read this in many places in recent months and now, over two months into my apprenticeship, it is making more and more sense. Until recently, I had  written mainly to the console. It was time to try something new. Introducing Totally Unclutchable, a fictional car rental company with an interesting name. This is my first experience of windows forms.  


  • Specifications

To begin, I was given very clear specifications for the windows form. In brief, it needed to have a Cars Module, a Customers Module and a Booking Module. A user can add, edit and delete cars and customers. The Bookings Module allows the user to assign available cars to customers in order to create a booking. At this stage of my apprenticeship, I require a lot of scaffolding with the instructions. In time, I will to design a program more independently.


  • Steps involved

To get the ball rolling, I learned about how to connect my windows app to a SQL database of customers, cars and bookings. To do so, I needed to use a connection string and make use of the SqlConnection class. It is good practice to close any connections before proceeding.  Over the course of the project, I needed to make various calls to the database. I learned a great deal about the format of a query. I learned the hard way that SQL and C# have different formats for dates. This was important in the AddCar and AddCustomer forms, where I needed to validate the information that is input by the user.

Using Object-Orientated Design has been a challenge for me in this project. I’ve had to understand the how classes and objects can interact with each other. Prior to beginning, I had a shaky understanding of constructors and methods, but I feel that I have made progress in these areas. I recognise the importance in planning the design and layout of a program in advance. Totally Unclutchable features a series of forms and manager classes.


I had no idea how much time I would spend on debugging when I started Totally Unclutchable. Debugging has helped me to find syntax errors, to correct data types, and to correct SQL queries. As I progress as a developer, I am aware that I will spend more and more time debugging.


  • What I’ve learned so far

While initially daunting, this project has helped me better understand Object Orientated Design. I had done quite a bit of reading, but nothing beats actually writing code. I have found it quite rewarding to work with windows forms as there is something to show for my efforts; there will be a working product by the end of the project. I have gained experience in using Visual Studio. Its tools for debugging have been particularly helpful.


  • Next steps

The Bookings module of my program remains. I will have to calculate whether a car is available, assign customers to available cars and check that they qualify for the rental. I have a great deal of work left to do. Join me next time to see if I can get Totally Unclutchable on the road!

Friends is back on Netflix and what better way to celebrate than to start a blog on being an Apprentice, and complete one of my first IT exercises to create a database of the friends characters and write some queries!

This past month, I have begun my apprenticeship with Quaytech Systems. Over the next year or so, I will be learning about Object Orientated Programming with the long-term aim of becoming a software developer.

Here at Quaytech, we are all big fans of Friends so, as an introduction to database management, I it made sense to create a database for the characters with SQL. This was a great way to introduce me to relational database management. I spent a few days creating tables of employees, managers, departments and salaries while making links between them using foreign keys. Once everything was set up, I started experimenting with writing queries. For example, I was able to write a query to find out which employees were in the finance sector (hint: it was Chandler).

Sub-queries were an early stumbling block but with a plethora of online resources to help (as well as very helpful co-workers, ) I was able to further my understanding of SQL.  All of this practice came in handy, as I recently wrote my first query which was implemented to answer a support ticket; the first of many, I am sure.

The next step was to access my Friends database through C#. I was introduced to Connection Strings and SqlCommand. I found this difficult at first; however, after a bit of debugging, I successfully accessed the SQL database through C# and even wrote some methods.

In my short time at Quaytech, I have already learned so much. I am looking forward to continuing my learning journey.