WORKSHOP: Coding

October 29, 2013 § Leave a comment

At last we are actually learning how to use new softwares, after a year of waiting. It is very hard and complex to learn but hey nothing is easy. The software we use for coding is called Processor app. It’s a good skill to learn and the outcomes of it is actually really interesting and there’s so much you could do with it.

 

Before doing any coding. there is a process of words we have to type in to get the computer to understand our intentions and what we’re going to do. First thing we type in is void setup () {  we leave an open bracket and all the coding goes in between the open and closed bracket.

You must always finish your instruction with a ; this indicates to the processor that we are about to start a new instruction. This example should produce a image of the word hello in the bottom section.

screen-shot-2013-10-14-at-11-48-10

 

 

To make the computer draw anything. we must tell it to draw, therefore the code words for that is println(‘drawing’);.

screen-shot-2013-10-14-at-11-51-27

 

Now the computer does not actually know what to draw, thats why it’s repeating the word draw over and over again.
we to first make a canvas size, background, colour/fill, then the stroke… size(1024,768); background(255,255,255); fill(100,100,100); stroke(100,100,100);

 

I know there’s a lot of numbers involved in this, it’s called coding for a reason lol. there is a way of storing numbers in the system rather then repeating it. The code words for this is float xpos;. when you type this in, the computer will then

xpos is the name of the line were about to draw. To make the line move we need to put the next sequence of codes xpos=xpos+3; 

 

screen-shot-2013-10-14-at-12-01-39

 

As promised. The line appeared and it moved around non stop. This first lesson on coding has been really complex and quite tough to get understand. I have to admit, during the lesson. I fell behind a few times, and had to ask the tutor to bring up to speed

Leave a comment

What’s this?

You are currently reading WORKSHOP: Coding at A Reflective Blog On My 2nd Year At University.

meta