Search This Blog

Wednesday, 13 December 2017

Post 3 Local/Global Variables and Logical Operators

Local/Global Variables

Global Variables are declared outside any function and they can be accessed (used) on any function in the program. Global variables then to very Unreliable and are used for quicker running code more than for reliable and stable code.
Local Variables however are declared inside a function and can be used only inside that function it's placed in.

float a = 1; --> The Global variable is declared outside the function "void my_test()"

void my_test() {

  float b = 77; --> This is the local variable and it is declared inside the known function
  println(a);

  println(b);


void setup() {

  float b = 2; --> This Local variable will not be able to be accessed by any other feature  and you will notice that Local variables names can be re-used as long as they're in different functions 

  println(a);
  println(b);
  my_test();
  println(b);

Post 2 Variables and Naming Conventions

Variables

Variables in programming are things that are assigned values and used in the following code after it. Variables are commonly referred back to when a certain value needs to be taken and used to work something else out further on.

Below is a part of an email checker that I created previously






In this code the two variables known as "foundAT" and "foundDot" are assigned values and as you can see, are later brought back up to work out whether the email entered is valid or invalid and depending on what changes with these two values final outcomes will be produced to state the final answer

Naming Conventions

In computer programming a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote variables , types functions and other entities in source code and documentation.



Friday, 1 December 2017

Post 1 Selection statements

Selection statements work when a required outcome is desired to produce a specific output if this outcome is not delivered to the selection statement something else will happen that the selection statement would've been told to do.

An Example...



Something else to talk about is "Case Select" statements.
Case select statements is another way for a programmer to test whats inside of a variable but is mainly used when you know that there is only a select amount of things that can be in the variable.

An Example...

                    CASE COMMAND$ OF
            WHEN "Move west","Move left", "Go to the door on the left","Go to the door to the west": THEN ROOM = 2
            WHEN "Move east","Move right","Go to the door on the right","Go to the door to the east": THEN ROOM = 3
            WHEN "Move north","Move up","Go to the door to the top of the room","Go to the door to the north": THEN ROOM = 4
            WHEN "Move south","Move down","Go to the door to the bottom end of the room","Go to the door to the south of the room": THEN ROOM = 5


Monday, 13 November 2017

Week 10

At this point my work has been completed to the best of my ability I do have a few changes to make however those changes are not difficult to complete. As I said last week I had given up looking for jobs in the computing industry and focused on the everything for just the base work experience of being part of a company, i now have a couple of interviews for different places , so i'll see how it goes however i don't know if i'll take them due to having this time to just hold out for the jobs in the computing industry, i can't shake the feeling that if i keep pressing something will turn up eventually. I still haven't started to study again and i keep kicking my self about it but i need to do something to get myself to focus as i just can't after being at college for the entire day , something will have to change eventually.

Week 9

At this point I've realised that i'm most likely not going to meet my Targets for the most part. In my course i'v most of if not all the pass work for the current units i'm studying and working through the merit and distinction work currently. All the work I've done other than a few presentations have been independent so I've stopped even considering the joint work and getting used to it and I've focused on the work I've got in front of me as well as this I've still not managed to find a job i'm definitely now looking for a job not specific to the computing industry.

Week 8

This week I've started to get involved with a few different tasks that involve join work to allow me to develop that skill. Although the studying of programming languages and maths are still lacking as i haven't really been to the library to start to read back up on them which I really should. I STILL don't have a job and it's frustrating me beyond belief as nothing has turned up to even support my course , at this point moving forward I may just start to look for a job for the base work experience not just for computing experience , this will be under consideration.
At this point I'm starting to fall short of my Targets of  being in joined work and studying for certain areas and necessary areas of the course and my wanted career. I really need to start to focus again.

Monday, 6 November 2017

Week 7

This week there were no new developments. The studying of C++ has kind of taken a back seat including that of mathematics while I look for a job. Speaking of jobs , I still don't have one. Trying to find a relevant job in computing is becoming much more of a struggle than usual because of the lack of the access in the town that i'm currently in. I've managed to get in front of the work I have to complete in Doug's classes and i'm up to date with those in Paul's and Gordon's classes.

Post 6 Sequence,selection and iteration

Sequence Sequencing is when the computer will run the code it receives, one line at a time from the top to the bottom of the requested prog...