Search This Blog

Friday, 16 March 2018

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 program. It will start at line 1 then execute line 2 then line 3 and so on unit it reaches the last line of the program it's processing.
An example of Sequencing...
When you first load up a game, you are using sequencing because the program is having to run the all the way through to ensure the program loads correctly.

Selection
 This is used when you may only want to run some lines of code sometimes when a condition is met as so the computer will have to ignore the other lines of code and 'jump' over them. This action can be achieved by using IF statements e.g. if a condition is met then lines 4,5 and 6 are executed otherwise the computer jumps to line 7 without even looking at line 4,5 and 6.
An example of Selection...
When a character for example gets to a certain part of a game for example Selection  may be used to launch what is called a 'cut scene' to be played only when the player reaches that point in the game however. Another example is when a character reaches a stated amount of EXP that character will have the option to level up, this level up feature will only be called on when the player reaches that required amount of EXP (Condition met---> Action)

Iteration
 Iteration is used when sometimes your wanting to execute the same line of code whether it be 2 times in a row to 1000's upon 1000's of times in a row. This is done by using a loop. These loops have three different types: For loops , while loop sand repeat while loops. This is handy as it enables you to not have to copy the same lines of code many times.
An example of Iteration...
Using an example of a game again, when a character is in sort of combat, a while loop will be continuously running to check whether the characters enemy is out of health or has reached a certain amount of health remaining. While loop are extremely efficient at preforming these soft of actions.

Friday, 2 February 2018

Post 5 Programming Standards

To begin with, what is a standard exactly? A standard is a guideline of sorts, as it's basically an agreed way of doing something such as making a product, forming code, delivering something or simply supplying the materials. Standards are a huge part of how organisations, that require a lot of co-operation between the work force, function efficiently.

 Standards in Programming

White Space: White space is the open space between the boundary of your program and where your code starts. White space doesn't really matter to the computer at all it doesn't register the space , only the start and end of your code. White space is used by a lot of programmers to make the code look more presentable and easier to read, however there are those that don't use it and while it doesn't effect their personal code, when working for an employer it can be less desirable to them.

 Naming Conventions: This is basically how different pieces of the code like: variables, functions or characters are named and identified. Naming conventions tend to differ depending on a couple of different conditions. One of these conditions is whether you are working independently or whether your working in a team of some kind.
If your working independently then it's understandable that you would be able to remember and figure out the different names of your variables or functions for example if you was to put a line of code that included a variable like:                         ' if (emailAddress == true);'
You should know where the variable can be declared again. For example whether they are a 'Global' or 'Local' variable or even the type of variable they're (Data type) such as 'char' or 'float'

If however you happen to be working in a team, declaring a set of standard to how you will structure these names will help you reduce the work time as well as the amount of errors. For example of the way in which you all might agree to create name standards is:
'if( g_stremailAddress == true);'
As you can see from the example is differs from the first, in this example 'g_s' has been added onto the variable name. The 'g_' represents the fact that this type of variable is Global and can be declared at any point in the program. the 'str' represents the fact that this variable is a string meaning that it will hold both numbers and characters. Doing something as simple as this will allow the rest of your team to identify these variables quicker and use them for themselves in there own work.

Hungarian notation: These are the base standards for how you should attach a prefix to a variable, function, etc. While most companies have there on twist or flavour of the Hungarian notation if you will they all stem from these base prefixes. An example is for how to state that the variable is a C++ string this being 'str'.

Position of brackets: The position of brackets again is not something that necessarily makes much of a difference as long as they're included and apparent. Most programmers have their own options on how to separate and set the brackets in code, sometimes these ways stem from habits of previous different programming languages that these programmers have used or maybe it's just a personal preference that includes how these brackets should look. It's important again, when your working in a team, that you either come up with an agreeable standard for how your team will set these out or either just simply stating it to them or making a comment at the start of the code.

Comments: Comments can be left in your own code to either help you figure out where certain parts are of simply split them up into separate segments. Comments can also be used to reduce the risk of members of your team if there are any getting lost in your code or not being able to find a certain part of in. Leaving comments is a very useful feature that will save you a lot of time if used properly.

Positional notation:





Composite Word Scheme:



Wednesday, 10 January 2018

Post 4 Varied Data Types

String
Strings are just lines of text and are most most commonly used to produce: Names, words and labels. Strings take up around 20 bytes of data however this is just the constant while it's usually 20 byte + 2 times the length of the string.
An example of a String: "This is a String"
An advantage of using a string is that it can hold much more characters than the data type "char" however because of this it takes up much more memory than "char" too.
Char
The Char data type is a single one-byte (16-bit) character. The data types stores this one character for future use for the program.Char stores a character from the Unicode character set which includes the variety of symbols ,accents , mathematical and technical symbols as well.
An example(s) of a Char data type: "A" , "a" , "+" , "?"
Boolean
Bools or Boolean data types are just a simple choice of whether something is true or false. They are not very large and take up only 1 bit of data. Boolean data types, as stated before, are simply the choice of whether something is true or false as such the type can only be one of two different values.
An example of a Boolean:  "True" or "False"
There is not much in the way of specific advantages for a Boolean data type apart from that if you were to use it it would help with the optimisation of your program in the way of memory and sometimes speed, however due to Boolean data types only involving either "1 or 0" or "True or False" there is a limited amount that you can do with them.
Integer
Integers are whole numbers that are either positive, negative or zero. Unlike the other data type "Real" also know as "Floating point numbers" integers cannot have decimal places and are one of the most commonly used data types in computer programming.
An example of a Integer: "5" or "-5"
The size of an integer tends to vary between either 2-4 bytes
An Integer has benefits to a point. A small integer up to a 64-bit can be very efficient represent in the underlying hardware and memory meaning that using them will be fairly quick however they have a limitation as for a lot of calculations you need to use real numbers and as such integers are not appropriate for these calculations.
Real
The "Real" data type is used to present an approximation of a real number. Because  these "Real Numbers" are not countable a computer cannot represent them using a limited amount of information. Real numbers are used in the computers computers calculations as well as integer calculations, the calculations that are preformed using the real numbers takes part in a separate section of the CPU known as the FPU or floating point unit.
An example of a Real number: "3.142..."
The size of 4 bytes for a simple float however if your wishing to create a double or long double version of the number it will got to 8 bytes then to 10 bytes.
Real numbers have a couple of advantages the first being that they can represent the values between integers and secondly is that they can represent a much greater range of values. However Real numbers do have their drawbacks as they can be slower than integer operations and may also lose precision.



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.

Monday, 16 October 2017

Week 6

I've continued to study subjects such as C++ and Mathematics in my own time to further my knowledge and to support my work. I focused on trying to find the best way of studying these programming languages as well.. By using things such as video tutorials allows me to cut down on some of the time of which i'd be studying for however i'm not yet sure that I've figured out which way(s) fit me best. Mathematics however i'm seeing that i'm learning better from reading it out of a book. Work experience is still undecided. In lessons I've started learning a lot more and i'm getting used to the change of pace College has brought about.

Week 5

This week is not much different to the last week. I've completed to task 1 in Computer Architecture and we've moved on to task 2.Part of the the spec in Doug's lesson is where we're learning about how a computer system is constructed and deconstructed.Overall i'm learning more than i have done before and continuing to progress my knowledge on computing. The situation with Work experience is still on going as i'm still looking for a job that will aid me in computing. The work at this point in the lessons are fairly independent however it's starting to show more join work too as we're presenting work and giving feedback this is a step in the direction of completing my target of getting used to join work.

Monday, 9 October 2017

Week 4

This week I've continued the search for work experience to aid with my course, I've sat at studied a lot of C++ as well , which hopefully should provide me with some support when I comes up in the lesson , however I know this is not enough so I will continue to read up on it. Unfortunately I have not idea when join work will come into play as yet i still hasn't College remains independent study for the most part. Other than this I've not done much in the way of binary research so this is something that I will most definitely have to improve on.

Monday, 2 October 2017

Week 3

This week I've started exploring different opportunities that will allow me to gain some experience in the computing industry. My computing skills are developing steadily as I'm currently studying binary and logic gates. I've done a steady look over websites to see if I can find any jobs that fit in with computing however at the moment I haven't managed to find anything that will work. If you remember I wanted to work on getting involve with more join work than independent but currently most of my college work seems to be independent meaning that I haven't really had chance to get used to working with other people.

Monday, 25 September 2017

Week 2

My Targets

Although targets are essential at this point coming up with targets that fit perfectly into my academic and practical studies is hard.Other than gaining the current information taught in my current lessons to secure good grades in the subjects as well as especially good grades in the areas in which i need to excel at,  there currently is nothing else i need to focus on or achieve at this moment. 
Although if i was to push for a answer i would say finding work to fit in with my wanted field would be best... so trying to find this experience is quite essential at this point, although finding a part-time job that covers the entirety of computing may be more beneficial. I have a target of getting more used to join work other than independent as my desired career involves both types of work effort, so I will continue to find time or ways to work on this in the future. On top of this studying on weaker areas of my current course may help me in the future so this is something that i will start to focus on.

Monday, 18 September 2017

Week 1

Programming: Software developer/Game designer or developer

What is needed: High grades in programming and relevant subjects as well as experience.


Soft skills that could be required: Communication, flexibility, teamwork, creativity, professionalism, responsibility, work ethic, listening, interpersonal skills, positive attitude, mentoring/teaching.

This is what I currently want to do when I leave education and I have identified what I need to acquire during my education and what skills are required and need developing on my part. I personally think that the hardest part of me getting to where I want to be is the prior experience to pursing my career in computing. I struggle with join work as I find it much easier to work independent that with others and it's something that that I hope to work on on the in coming weeks and through my education and any part-time jobs I move into along the way.

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...