Wednesday 29 August 2012

Compression

I made an image of a sunset using the gradient and paint brush tools in Adobe Photoshop CS5.5 and saved it an a JPEG format with 3 different levels of compression.

This is the original image.
This is the lowest level of compression and has the highest quality.

This is a medium level of compression and has medium quality.
This is the highest level of compression and has the lowest quality.

As you can see, as the level of compression is increased, the quality decreases in the image. The most significant change that is noticeable in the change in quality is in fact the line quality of the image. Most of the colours are there, but the lines are reduced in quality and make the quality of the image look bad when it is highly compressed.

I also made an image in black and white on Paint to use for the compression exercise. I have the original image and three levels of compression of that image.
This is the original image.
This the the image with the highest quality and the lowest level of compression.
This is a medium quality, medium level of compression image.
This is the lowest quality image with the highest level of compression.
The line quality in these images slowly decreases as the compression level increases.

Tuesday 21 August 2012

Encoding

A Caesar Cipher in encryption coding is a shift in the alphabet a certain amount of characters. As an example, I will write out the normal alphabet and then make a shift in the alphabet of 21.

Normal alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Shifted alphabet:  VWXYZABCDEFGHIJKLMNOPQRSTU

That is what a Caesar Cipher is. I have encoded a message using my Caesar Cipher with a shift in the alphabet of 21.

Ocdn dn v nzxmzo hznnvbz.

The encrypted message above says: "This is a secret message."

I was also given a code to work out without the key. Code I was given: Aol gpwwf Dvtisl sprlk av lha Hwwslz. I used a Caesar cipher with a shift in the alphabet of 7. After the code was deciphered, it said: "The zippy womble liked to eat apples."

When the key is given, the person will easily be able to work out what the encrypted message says. This type of encryption is prone to a Brute Force attack which will easily work out which letter is which. The Brute Force attack which involves using every possible key to eventually find the correct key.

A Substitution Cipher is a method of encryption where the plaintext is replaced by the ciphertext and be anything from single letters, pairs of letters, triplets of letters and so on. When the Substitution Cipher is being unencrypted without the key, the person doing so does a inverse substitution.

A Frequency Analysis attack takes advantage of the most common letters in the English alphabet to find the key by assuming the most common letter used in a Substitution Cipher is 'e', and so on.


Monday 13 August 2012

An awesome picture

I thought I should post something completely unrelated to what my blog is about. So here it is:

http://media-titanium.cursecdn.com/attachments/40/479/halo4concept11.jpg

http://halofanforlife.com/wp-content/uploads/2012/04/Halo-4-gravity-well.jpg

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhl-4ZZUTMDVGiBOHQhd1e1GNpl1clJ4xmXy9tE1397gqtBDCecj_XUsSyLwxdfo7tHnZzoIJkKMfbWHjuTwbyweUTK3ouJ5e7surEJe_j-1sN3_3Sbn3t73TH6Nwn8f2yjCw2KMo3G6mge/s1600/Halo-4-Concept-Art-1.jpg

Usability heuristics

In class, we are learning about Nielsen's heuristics to do with using a device. My chosen device is an iPod Touch.

We have been given 5 steps to carry out.

1. Identifying common tasks.

My 5 common tasks are:

Turning the device on
Play "Tourniquet" by Knife Party
Changing the time
Taking a picture
Viewing that picture

2. Reorder the tasks into an order in which they may be carried out.

Turning on the device
Changing the time
Taking a picture
Viewing that picture
Play "Tourniquet" by Knife Party

3. Apply Nielson's heuristics as someone else carries out the task.

I took a series of screenshots for each step in the task of playing the song had been completed and one on the lock screen.






The usability of the iPod is really easy to use as it's all touch screen and has a really basic way of navigating the interface. This is done by accurately labeling each of the buttons on the screen that are used for navigation. It only required 2 taps (clicks) to find where the song was located and a third to play it.

4. Choose 2 problems to fix. (Explain how)

Help users recognize, diagnose, and recover from errors:

Some errors that occur on the iPod can cause it to freeze and doesn't make an error message appear detailing what went wrong. I would fix this by either fixing the bug which caused it to happen or by making a message box appear detailing what happened to cause the error and how to fix it.

Error prevention:

Relating to the above, it would be even better to not have the errors occur at all. So to fix this there would have to regular bug checks. These bug checks would lead to finding the bug which causes the error to occur and then lead to an updated version of the software.

5. Does your selection violate any other heuristics?

If the explanations on how to fix an error are quite long, it would violate the help and documentation heuristic. Otherwise, no.

Tuesday 7 August 2012

Unicode and ASCII

What is ASCII?

ASCII is a 128 character set used for the English language in text on things such as computers and communications equipment. ASCII uses only 7 bits.

What is Unicode?

Unicode is used for text on things such as computers and stuff but can replace ASCII as it has enough space available to store characters from numerous other languages. Unicode comes in UTF-8, UTF-16 and UCS-2. UTF-8 uses the same code values as ASCII characters and has up to 4 bytes for other characters. UCS-2 uses a 16 bit code unit with two 8 bit bytes for each character but can't use every character for the current Unicode standard. UTF-16 extends on UCS-2 using two 16 bit units which is four 8 bit bytes and can encode the characters that UCS-2 can't.

The list of advantages and disadvantages for Unicode:

+ It can store characters from more than one language
+ It can store characters from languages with more than 250 characters

- Because it has more characters, Unicode uses a lot more space

The list of disadvantages of ASCII:

+ It uses the English language and can hold all the alphanumeric characters
+ It uses less space than Unicode because it doesn't have more than 250 characters

- It only makes use of the English language
- If a Unicode document is read in ASCII, it won't display the characters correctly

My first name (Adriaan) in ASCII and binary and hexadecimal

ASCII: 65 100 114 105 97 97 110

Binary: 0100 0001 0110 0100 0111 0010 0110 1001 0110 0001 0110 0001 0110 1110

Hex: 41 64 72 69 61 61 6E


Wednesday 1 August 2012

Parity Card Trick

Yesterday, I performed the greatest of any magic tricks that exist or have existed on our planet. The power of this trick was so immense, it could easily out do an incinerating fireball or an extremely fast bolt of lightning to the face. This trick is called the 'Parity Card Trick' because it involves error control.

How to do the trick:

1. Get someone to lay out a 5x5 square of cards with a black and white face in any order
2. Add another row into the grid, turning it into a 6x6
3. Make sure there is an even number of black sides in each row
4. Turn around and get someone to turn over one card
5. Find the card by checking for an odd number of black sides (odd bits)

This is related to error control because you use the Parity trick to detect the errors and fix them.

1. The data
2. The Parity check data
3. Checks for an odd amount of bits by checking the Parity data in relation to the other data
4. Finds and fixes any errors



A Parity bit is a bit that acts as a check on a set of binary digits. It is calculated by making sure there are an even amount of 1s but occasionally there will be an odd amount of bits.