Today the IEBlog announced you can download the IE10 Platform Preview 1. This is super cool! Furthermore, it looks like they are putting a lot of effort in supporting new CSS features such as (In order of my personal view of how awesome they are):

IE10 Platform Preview 1 appears to be pretty snappy. When I compare it to Firefox 4 and Google Chrome, the difference in speed is seriously hard to spot.
I seriously, cannot wait to see what cool creations web developers create if Microsoft continues working at such a pleasing rate.
On a side note, some of the stuff on the IE Test Drive website is really cool. If you can, check it out.
Posted April 12th, 2011
I was recently introduced a group of really funky new HTML5 JavaScript methods, which make me seriously think we can avoid having to include the jQuery library in lots of small websites. These methods are querySelectorAll() and querySelector().
In a nutshell, these methods behave exactly the same as the jQuery selector but comes integrated into the browser, meaning you input the CSS selector (e.g. “#myDiv” or “.MyClass”) and out pops the first element in the tree, or a StaticNodeList of the elements (depending on whether you use the All part) .
Read the rest of this entry »
Posted March 18th, 2011
Recently I’ve stumbled upon a really neat technique to listening to Spotify while I’m heading off to bed, then not have to get up to turn my music off once I’m dropping off.
Firstly, set up a playlist in Spotify which will help you relax. Once you have done this step, open up command line (cmd.exe) and type the following:
shutdown -s -f -t 900
Code Breakdown
The above command will shutdown your PC in 900 seconds. Let me quickly break down how this command works:
- shutdown indicates you want to run shutdown.exe
- -s is a flag saying you want to shutdown your PC
- -f is a flag stating you want to force shutdown, so your PC will not hang around waiting for applications to close while shutting down
- -t is a flag which indicates you want a timed shutdown
- 900 means the amount of seconds until the shutdown occurs. In this case 900 seconds, or 15 minutes.
Once this is command has been run you should see an information bubble (Like below) stating when the shutdown will occur.

Read the rest of this entry »
Posted March 10th, 2011
A few days ago I was researching methods of validating alphanumeric strings and I was shown PHPs Ctype Functions by Sebastian Roming.
In a nutshell they are a group of PHP functions why can be used to check strings to see if they are alphanumeric, numeric etc without using regex (So they are fast!). The key thing to remember is that they return TRUE or FALSE, unlike filter_var which returns FALSE or the string.
Here is the code example:
<?php
// Check if input is alphanumeric (letters and numbers)
ctype_alnum('abcdef1234'); // This returns TRUE
ctype_alnum('£%^&ab2'); // This on the otherhand returns FALSE
// check if input is alpha (letters)
ctype_alpha('dssfsdf'); // returns TRUE
ctype_alpha('12345dssfsdf'); // Returns FALSE
// Check if the input is numeric
ctype_digit('1234'); // TRUE
ctype_digit('1as2d34f'); // FALSE
?>
Read the rest of this entry »
Posted March 5th, 2011
Validating an email address is a great way to reduce spam on your website, but there are several methods to do it. You could use a messy regex approach or alternatively you could also use PHP built in functions, it’s really up to you. Here is the function I use:
<?php
function validEmail($email){
// Check the formatting is correct
if(filter_var($email, FILTER_VALIDATE_EMAIL) === false){
return FALSE;
}
// Next check the domain is real.
$domain = explode("@", $email, 2);
return checkdnsrr($domain[1]); // returns TRUE/FALSE;
}
// Example
validEmail('real@hotmail.com'); // Returns TRUE
validEmail('fake@fakedomain.com'); // Returns FALSE
?>
Free feel to copy/share.
Posted March 5th, 2011