Thursday, 17 November 2016

A2

The project life cycle has four phases within it: Initiation, Planning, Execution and Closure.

The initiation phase is the 1st phase in the Project life cycle as it is where a project is started up. A project is started up by knowing its objectives, scope, purpose and deliverables that need to be produced. The project team will then need to be chosen and hired, an office for the project is setup and then a review of the project to ensure all is correct and gain approval to continue to the next stage. It is needed in software development to set out a plan of what is being done.

The planning phase is the second of the four phases in the Project life cycle. In this stage, a set of plans are created to help guide the team with instructions and resources through the last two phases of the project.It is important for a software development team to plan their project efficiently and see what is the best route of doing something

During this phase, plans are created to help manage time in the project, cost, quality, change, risk and issues. There are there also to help to manage staff, ensuring suppliers deliver on time and also within the set budget.

In the execution phase the physical project deliverables are built and are presented to the customer to sign off. This phase usually takes the longest time out of the four and also consumes a lot of energy and the most resources. This is where the software development team will test to see that all is working well.

To monitor control in this phase, management processes will need to be implemented. These processes are used to help manage time, cost, quality, change, risks and any issues.

The final phase in the Project life cycle is the closure phase. This is where a project is formally closed and a report is created to analyse the success of a project and report that to the sponsor. The software development team will look here at whether the project was a success and what can be changed for next time

In this stage it is all about handing over deliverables to the customer, passing over the documents to the business, cancelling any supplier contracts, releasing the staff and equipment that are no longer needed and masking the stakeholders aware that the project is complete.

When the project is complete and has been closed off, a Post Implementation Review is undertaken and completed to identify the success and any pointers to take into the next project.

Discuss the use of various software structures and how they fit into the life cycle, consider:

Functions: These fit into the life cycle mainly in the execution stage as the developers will look to see were the functions may be necessary to have a purpose.
Procedures: The procedures may be thought about in the planning stage to plan to code what they will do or what needs to be done.
Classes/Objects: Classes and objects fit into the life cycle in the execution phase as they are implemented here to have a purpose and to act within a program.
Data abstractions: This is the hiding of data so would fit into the life cycle in the project execution as well as it will need to be executed and do its job to ensure that it is hidden away and the access to the particular data is forbidden.
Pre-defined code: This will fit into both the initiation and execution phase as it is already pre-defined so this will already be known in the initiation phase but then it is actually implemented in the execution phase.
Readability: This will fit into the planning and execution phase. The planning phase will show what needs to be done and read so will show that the code needs to be understandable not only now but also in the future. This will then be implemented into the code at the execution phase.


Task 2:
Use these phrases: Annotation, Logical methods, Program structures, Sequencing Selection Iteration, Eliminating repeating or redundant code.
·         Readability – When writing code, it is important to ensure that it is readable for people to go back and look at adapting or fixing that code. If it is all cramped up and not written in a presentable manner then it won’t be able to be fixed without being time-consuming.
·         Comments – It is useful to annotate code whilst writing it so that users can make sense of what the code is and does at a later date. It will also be easier to navigate through it if there was a problem with it. Annotations are used to clearly label a part of a piece of code.
·         Appropriate names for variables – This is used to avoids any confusion whilst coding. An example is if a game had a red ball alongside a number of other coloured balls, it would be very confusing and hard to monitor if the ball was simply called either “ball” or “ball1” for example.
·         Indentation – This is used to show that a piece of code belongs to that above it; so for a loop when a “:” is used, it automatically indents to show that it belongs within the loop. Indentation also makes code look presentable and shows sub sections to code rather than just a long section of primary base code. This is a logical method of coding as it saves time and is easy to look back at how it works.
·         Quality of code e.g. efficiency – Having a good quality of code is useful for making the code make sense in as less code as possible. This is efficiency and it is key to be efficient while coding because it is a long drawn-out process.
·         Reliability – Making code reliable is important because it will work correctly. This also counts for adapting code, if code is taken form previous examples or is taken from elsewhere, it is important that it is from a reliable source so that it will work.
·         Robustness - Having robust code allows a system or a computer to handle any errors in code and still execute it like there were no errors. This is useful for large amounts of code because it could take a long time to identify any errors within a piece of code.
·         Usability – It is useful to have code that is easy to use because it ensures that it can be looked backed upon if it needs to be edited as it may have a function to it. This code may also be used for other things so it may be copied and inserted somewhere else. This means that is should be able to be used by someone else even if they have not coded it.
·         Portability – The portability of code is how well it can be transferred from a computer environment to another. The code may well be transferred with no problems but when it is opens or put into practice t may fail. It is important to always ensure that it can be supported on another operating system or to wherever it is being transferred to.

·         Maintainability – The reason to maintain important code is to avoid any updates to it or the programmes that they are run on deleting them or changing what the code does. If the code is changed and not maintained it would be useless.

Explain in detail why the following terms are important when programming:

Debugging: A program needs to be debugged when it doesn't work properly. Finding any mistakes in the code can be hard at times so it is time-consuming to try to find what the problem is. Once this problem has been found then the program will work properly. It is important to be able to debug code because it allows any form of program to be able to work whether it be a game, a webpage or anything that requires code.

Team working: Working as a team whilst programming is important as it allows a program do be finished and worked on quickly and efficiently.  This also helps generate more and creative ideas which could ultimately build a better program than what would have been created. Teamwork also brings a group together as friends and individuals can work better as a team.

Updating: Updating code regularly is important while programming because the current code may become out-dated and the function of the code may have changed and cause a bug in the program. Also updating may introduce new code which could bring in brand new code that could be more useful than what is currently available


Monday, 12 September 2016

Unit 6 P1 and P2

Task 1 – Programming Paradigms

Describe the application and limits of Procedural, Object Oriented and Event Driven programming paradigms.

Procedural programming: These have start and end points that are definite. Before there were GUI operating systems the languages were normal as they usually have a single starting point and then follow a sequence. The modern versions of programs respond to events. This means that the start points can be anywhere within the code. An advantage is if making a big operating system then it is one of the best paradigms to use as it is used to make large programs. The main disadvantage of procedural programming is that it isn’t as fast compared to lower-level language code. This means that for applications that may require a lot of processing power, it can then limit the effectiveness of it. The big restriction of procedural language is re-using it . The same method of coding cannot be used multiple times as it will become more and more complex.

Object Oriented: This is about classes and inheritance. The objects can be viewed as machines which have an individual role. These are capable of receiving messages, processing data and sending messages to other objects. This is known as encapsulation. An advantage is that it is useful to create classes and sub-classes for a website such as ticking boxes that would be displayed on a site. This is also very good for a user interface design. A disadvantage is there are only a few illustrations with object oriented and there are also no tools to develop the application. 

Event Driven: These respond t.o events and an example would be a louse click. This is an example of modern programming because they need to have the responses to a large variety of events that GUI operating systems provide. An advantage is that it allows you to add sounds to a task such as an alarm clock for when it reaches a certain time it will make a soundSpy. A disadvantage is that this doesn’t allow you to enter event loops and doesn’t allow a user to do it manually.

Here is a video on Programming Paradigms: https://youtu.be/sqV3pL5x8PI

Visual Basic:

Advantages:
·         Visual Basic is easy to learn and is also an integrated IDE. It is free to download and there is great online help available.
·         
Disadvantages:
·         They only work in Windows OS and a lot of memory is required. It is also slower than other languages.


C++:

Advantages:
·         Its free to download and is one of the fastest around.
·         The syntax is similar to what is used in other languages and it is multi-paradigm friendly.

Disadvantages:
·         It is a complicated language
·         It is difficult to debug
·         It is only 8-bit

DarkBASIC:

Advantages:
·         Free download
·         Easy to learn
·         Doesn’t require a lot of code

Disadvantages:
·         Costs money to use a version without advertisements
·         Mainly focused on creating games
·         Not very fast
JavaScript:

Advantages:
·         Java is free so anyone can use it.
·         It is a secure program to use so people can use it and keep their files safe.
·         Cross platform so can be used on multiple operating system.
      It is also easy to learn so that anyone can go on to use it.

Disadvantages:
·         Can be difficult to learn if the correct resources aren't used.
·         Slow to develop and run so projects could use with another form of code to develop and run things.

HTML:

Advantages:
·         Free to use
·         Text is used to make it easy to understand
·         Supported by most browsers
·         Search engine friendly

Disadvantages:
·         Limited security
·         Static language
       Pages must be edited separately

P2

Time Constraints: Different programming languages take longer to code so if a programmer has limited time then they will have to choose a language which doesn’t take as long to code.

Organisational policies: Organisations will have to follow policies of which programming languages can be used on which operating systems they use such as Windows, Linux, and Apple Mac. If the company doesn’t have a policy which states which programming language they have to use then they can choose whichever they like. This will be chosen to suit the build of the system which is being used.

Suitability: The programmer will need to find out what the system needs to do for an organisation. They do this by asking what they need the system for and what they do on it and they then will help figure out what would fit the system.

Availability of trained staff: The programmer will need to find out what staff members there are in the company and how trained they all are to use specific language. This is because if the programmer creates the system in the language in the preferred language of the technicians.

Reliability: A company will have to have a reliable company system if they do not want the program to crash. If the program did crash it all depends on the system whether it will be down for a short period or even a day or two and this can be fatal to a business. The reliability also depends on how long the programmer actually has to code which results on which language is chosen. Most organisations which use Windows operating systems say that they want a reliable program but this can’t be helped because windows was designed with faults so crashes a lot.

Environment: A programmer will have to take into consideration what hardware may need to be linked up to the system such as for a supermarket they will have to link up to bar code scanners which will connect to the system and say what is in stock and how much an item is. A different type of programming language may need to be chosen once the programmer knows what an organisation needs.
Development and maintenance costs: Depending on how much programming language s used and how in-depth that language is will result on how much maintenance and cost is needed.  A programmer will have to deal with and bugs and create patches which will fix any problems. If there is a big problem there will be a big patch which needs to be create but then it will be fixed and will run smoother.

Expandability: This is if a company happy with the programme that they have made for them then they may want this expanded to all of the computers at the office. The programmer will then need to edit the code so that it can be used on multiple devices.

Sequence: In Python a sequence is a set in order such as lists, strings and tuplets. They show how tasks are carried out. For example if someone was to make a scrambled egg there would be a list of stages throughout which show clearly what to do next.

Selection: These are used in code mainly for if statements for setting a single conditions. The program then evaluates the condition to execute the demand depending on if it is true or false; this is done by using selection operators <,>, ==, !=, >=, and <=.
This code shows how the operators can be used to output different messages depending on conditions being met or not.

Loops: For and While

For loop: These are a form of iterative loops that make running code efficient. This allows a programmer to simultaneously run one or more statements constantly until a false expression occurs.
The code above shows a for loop which will output all of the elements in the array between the commas and the last one stop the element outputting with a comma.

While loop: This is a form of infinite loop which can execute one or more statements repeatedly until the condition chosen is met. The loop keeps repeating until the condition is met and then the loop will stop.

This while loop is used to make sure the input from the user is between two numbers.If the condition is not met first time round then the loop is continuously run until the condition is met.



Data Types
Example of data type
Space occupied
Boolean – True or false
This is a Data type that gives an answer of only True or False.
2 bytes
Date
25/12/2005
14 Feb 2017
05-11-17
These are three different ways in which dates can be displayed.
8 bytes
Decimal
A number with a decimal place 1.4 0.8 etc.
14 bytes
Double
Double precision floating point
8 bytes
Integer
Whole numbers such as 5, 7, 8 etc.
2 bytes
Long
Converts a value into a long integer.
4 bytes
String
This is a string of code that can be as long as the code goes on for.
10 bytes + sting length.


Why various data types are useful:

Boolean: Boolean's are useful as a data type because they give a straight yes or no or true false answer. They are good for getting straight to a point but this means that they can’t be used in complex functions.

Date: Dates are useful as data types because it simply is the date. It allows people to see current times and dates. These are used on all websites and on real time operating systems like Google. Dates also add a professional look to any website or operating system.

Decimal: Decimals are a useful data type because it allows a precise measurement of what the data is rather than just an integer. Decimals may be used in money too so an exact price is available.
Double: The double data type is useful for when working with extremely long numbers rather than just having to write out every single number from that point. This saves time and storage data and allows a processor to not have to use as much power.

Integer: An integer is one of the most common in programming, they are used in for or while loops and they are a whole number and unlike floating pint numbers, they don’t have decimal places. An integer is easy to understand because there is no long line of decimal places or a long string of numbers in a row. They also use less space than real or float numbers.

Long: A long data type is a long string of characters. This is useful because it allows a precise measurement of what is being inputted as there are the exact numbers that are needed for that task.

String: A string is used to connect other data types like integers and sentences together. Strings are useful because they make data make sense and add a context to the data.

Operators: These include logical operators or selection operators. Logical operators are AND/OR/NOT and selection operators are <,>,=. These are used for making different or explaining different values quicker than it is to type them out.