Saturday, 9 June 2012

Working on the portfolio: Morton Electrical

I have been Working on my portfolio, the first of with is my brothers web site he is an Electric Installations Specialist, which I assume is a fancy full way of saying Electrician, I personally prefer sparkle but I assume that wouldn’t get him as much work.


Ladies and gentlemen and variation thereupon you can view Morton Electrical for North-eastern Electrical Installations website here.

Sunday, 1 April 2012

Burton on Trent in the 1980's

Well as many of you might well know I Kevin The Glorious was born in the 1980's, and this map found at the very bottom of the Burton library shows what the town of Burton was like back then, it was a simpler time no one honestly cared about what you looked like because we were all things were made of big block pixels. 

It was also a lot simpler to get around back then as there was only 2 dimensions left-right and up-down.

Friday, 24 February 2012

You asked for it, my very own IAMA all about dyslexia

It is no secret that I am dyslectic and it is probably obvious to most that dyslexia plays a gigantically, massive, huge part in my life.

Unlike some dyslectics I honestly do like to talk about my disability, so after a few requests I made a IAMA of Reddit all about me and dyslexia, so without further ado I present to you the questions and answers.

Wednesday, 8 February 2012

Automatically generate function header comments in netbeans


Oh Netbeens how we love you, today's tip comes from a question asked in IRC that was.

" Excuse me my good sir but is there a way to generate the phpdoc function headers? I'm using Netbeens 7"

Well yes little Tim there is, this code complete tool works in all the supported languages Java, PHP, C++,C ,and  of course plenty of others, it's so so ridiculously simple to use.

Saturday, 4 February 2012

Graceful Degradation and Progressive Enhancement.




Wednesday, 1 February 2012

Java Tips and Hints: Comparing Strings in Java with examples.

This might seem like an ever so obvious thing to most users of the good old Java, however it comes up in IRC and the /r/java subreddit all the time. so this brief post is to help them all out and me so I don't have to keep typing it.

OK so you should be reasonably familiar with the "if" statement well here is a program that uses it:
import java.util.Scanner; 
public class Variables {
        public static void main(String args[]) {
                Scanner input = new Scanner(System.in); 
                System.out.println("What is your name? ");
                String name = input.next();
   
                if(name == "bob")
                {
                    System.out.println("Your name is awesome, " + name);
                }
                else
                {
                    System.out.println("Your name sucks, " + name);
                }
        }
}
Well there you go that  program is syntactically correct it will compile and run, so we did it? well nope, There is a logical error in that code take a second to go compile it. no matter how you type bob it will not tell you that bob is an awesome name this is because we are comparing for a reference.

Instead of using "==" we need to be comparing for value equality, So we do that like this:
import java.util.Scanner;
public class Variables {
        public static void main(String args[]) {
                Scanner input = new Scanner(System.in); 
                System.out.println("What is your name? ");
                String name = input.next();
   
                if (name.equals("t"))
                {
                    System.out.println("Your name is awesome, " + name);
                }
                else
                {
                    System.out.println("Your name sucks, " + name);
                }
        }
}
Go ahead and check out the "if" statement now on line 18 you see that is how we compare Strings we are comparing the value equality in that string.

OK so now we have that we might find we have another issue you need to type "bob" because if you type  "Bob" with a capital letters in it then will return "Your name sucks" and we might not want that.

In that case we can use this ".equalsIgnoreCase" instead of just ".equals" that way we can Ignore the Case of the string.

OK then so now we have them what about more, well there are a lot so why don't you look in the Java documentation and leave a comments with the things you find.


Saturday, 28 January 2012