Sunday, 21 October 2012

Why dont macs support java or flash?

This has always been a question in my mind. I started doing a bit of researching and looking into the issue.....

I found this website very handy, it has many reasons as to why. Check it out: http://labs.teppefall.com/2010/02/why_the_apple_ipad_has_no_java.html

Even though all the answers seem complex, all the answers are factual but true.

Wednesday, 17 October 2012

Outcome - Task 4

Task 4 was definitely more of a challenge with alot more code needed to get the succesful outcome. I almost had it but had to get some help from trusty codedotblog.blogspot.com.au. I couldn't quite get the name to repeat and paste into the final answer! but now it works!!

// TASK 4 - Liam Edleston

var name= prompt("What is your name?")

var number1= parseInt(prompt("Enter the first number"))

var symbol= prompt("Enter the Chosen Symbol(+,* or -)")

var number2= parseInt(prompt("Enter the second number"))

if (symbol=== "+")
{
    alert("Congratulations " +name+ " The Answer is "+(number1+number2))
}
else if (symbol === "*")
{
    prompt("Congratulations "+name+ " The Answer is "+number1*number2)
}
else if (symbol === "-")
{
    prompt("Congratulations "+name+" The Answer is"+number1-number2)
}

// END



Outcome 1 - Task 3


Task 3 for me was quite simple, as you can see its quite basic. All we were asked to do is t calculate the cost of the order. Each pizza was $7 and each extra topping was $0.6. Based on that information the following javascript code can calculate the total amount with simple maths!


// TASK 3

var pizza= prompt("How many pizzas?");
var topping= prompt("How many toppings?");

alert(pizza*7+topping*0.6)

Outcome - Task 2

Here is the the second task! This task wasn't as hard as the first one as it was as simple as prompting the user and multiplying those number.


// OUTCOME 2

var price = prompt("What is the price per meters sqaured?")
var height = prompt("What is the height in meters?")
var length = prompt ("What is the length in meters?")
alert (height*length*price)

Outcome - TASK 1

Whoo have finished the first coding task!! I found the first code wasnt that difficult however the hardest bit was just getting started and getting your head around it!!.....


// Task 1

var tempreature = (prompt("Whats the tempreature outside???"));
if (tempreature < 0)
{
alert("It's freezing out there!");
}
else
{
if (tempreature >25)
{
console.log(tempreature);
alert("It's hot out there!");
}
else
{
alert("You don't need skis or board shorts!");
}
}


Debugging

Debugging code is the hardest thing about coding. Finding that little mistake or finding a solution to a mass pile of problems can take along time. I find the best way to debug code is to look at the overall picture and decide which way you need or want to go about a solution. Also another way that i find really useful is to go back to basics whether thats doing some codecademy.com exercises or looking at some if or else statements and even either googling the topic or finding definitions. For me going back to basic and starting simple and working on that has helped me solve debugging code which has lead to successful results :)

Monday, 15 October 2012

JS Pocket Guide!

After struggling to find time to code, i have started to get back into it!! i have started by reading this book which is great for definitions and for giving you a general idea into the idea of coding. Here is the link: http://www.scribd.com/doc/15490748/JavaScript-Pocket-Reference.

I have found it has re-inforced my learning and understanding of coding and helped fix a couple of niggling little issues.... such as booleans and if/else statements.