Can Of Code

Category Archives: General

The Cookie Monster

I’m sure you have heard of the new EU directive that dictates that all website that wish to use cookies must inform the user. If you haven’t, here is an article from the BBC explaining the situation.



Source: Glenn Fleishman


My first reaction to seeing banners and messages on websites warning me of their cookie based intentions was that of madness. However after spending some time reading the Directive (DIRECTIVE 2009/136/E), I realised that it’s rather a sensible idea.

No 66 of the Directive clearly states:

“…It is therefore of paramount importance that users be provided with clear and comprehensive information when engaging in any activity which could result in such storage or gaining of access.”

All that states is that the user should be made aware when you plan on using cookies. This is good to avoid the evil usage of cookies but cookies are vital for functionality such as logins.

The directive covers this by later stating:

“…Exceptions to the obligation to provide information and offer the right to refuse should be limited to those situations where the technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user.”

I’m no Law expert but what I understand that to say is that if the cookies are necessary to provide functionality the user requests, i.e. a member’s area then your exempt from providing warning. Not so bad after all.

Posted in General | Tagged , | Leave a comment

Backing up

Backing up? who cares..

For the last two weeks i have be working on my final year project for uni. One of the clear messages that has come across is the unnecessary dangers of not backing work up. If I’m honest i have never bothered with backing up because the Windows backup utility takes around 2 years to perform a backup and I’ve been too lazy to look for alternative solutions however this time i have more to lose.

Where to start..

The first area I looked into was backing up my files. During my project I’m likely to be creating a number of Word documents and images so these will need to be backed up.

I first considered keeping all the files on a pen drive and then manually backing the pen drive every so often. This approach meant that I could take all my files with me if I were to go and work on the project at uni however if I lost the pen drive I would be screwed as I could guarantee that I would forget to backup regularly.

The second approach I considered was the geek-out method of creating some .BAT files that would make copies of the project files to a backup location. This approach however was risky because I rarely plug in an external drive and backing up the files on the same drive would be pointless if the whole drive failed, something which is likely to happen with how unstable the SSD hardrive I’m using is.

The third and final brainwave was to let someone else to the hard work by using some third party software to do all the backing up for me. This seam the safest approach as it does rely upon me to do anything however I would be putting faith in the software to do what its supposed to.

Enter MOZY. They are what you could call a cloud backup provider which offer software the runs on your computer and backs the files up in the background into their online storage. I have been using it for a few weeks now without issue.


The annoying MOZY status screen

The annoying MOZY status screen

The good points:

  •  Simple to setup
  •  Easy to select the files you want to backup, includes common file groups like emails or photos.
  • generous level of free storage (2GB)
  • Can select different versions of the file to backup, ideal if the document gets corrupted at some point and then backed up
  • Can access backed up files from their software, website or app.

The bad points:

  •  A screen pops up every time its finished backing up which seams pointless
  •  Doesn’t allow you to backup any external hardrives or flash drives.
  • Since i signed up with MOZY, every website i seam to visit is displaying ads for MOZY, Like I’m being stalked by them!

To backup files for the project i have selected MOZY. Later i will write a post on which method i used to backup the source code.

Posted in General | Tagged , , | 1 Comment

How to make a LED light up, The programers way

In my quest for avoiding what i should be doing I had discovered a rather fun bit of kit. The kit is called Arduino and for around £20 you get a circuit board that can plug into your usb port. As you can tell from my last sentence, I know absolutely nothing about electronics but that is the great thing about this kit.

Arduino Uno Device

Arduino Uno Device


What is it?

Well its a device that plugs into your USB port and allows you to program the outputs. That means that you can control almost anything that’s connected to the outputs by programming it. So yes you guessed it, you can make LEDs flash! What i like most about it is that it comes with its own IDE. This IDE and framework makes programming the Arduino nice and simple, ideal for those who have never done any electronics like I hadn’t. The Arduino site also has tons of learning material and a strong community eager to help.

Where to get it

I got my Arduino Uno device from a great online shop called oomlout. The site also does a really handy Breadboard kit so you can put your LEDs and resistors on it easily without having to solder anything. They also sell a lot of other components to play around with which come with nice and simple instructions on how to use them.

What can you make with it

Well almost anything!  Although with my rather limited knowledge of electronics all i have managed to make is a traffic light out of LEDs. Don’t let that dishearten you all you need to do is search youtube to so what people are doing with them. What i really like is you can just have a go without worrying about blowing anything up as the board turns off if you do anything silly.

For any fellow programmers, I highly recommend picking up a Arduino, once you do your be hooked!

Posted in General, Software | Tagged , , | Leave a comment