Wednesday 2 April 2014

Unit 6 D1

Unit 6D1 - Discuss factors that can improve the quality of code.  
  1. Explain in detail why the following terms are important when programming? (D1)
Debugging
Team working
Updating
 Debugging
Debugging is very important this is because of bugs and errors, without testing this programmers could end up in a bad situation within their coding, this can mainly happen when doing long programming this could be when an operating system is being coded. If an operating system is being coded and another member of your coding team adds new code to the project it could have an effect on the old code causing errors and bugs this is why debugging is very good element in programming. The primary function of debugging is to find and help resolve problems with your code you or someone else has created.

In computers, debugging is the process of locating and fixing errors in computer program code or the engineering of a hardware device. To start to debug a program or hardware device is to start with a problem, isolate the source of the problem, and then fix it. So in Visual Basic this is done in this window and it gives you a small description of the problem ad web link on how you can fix this.



Team working 
Some people prefer to work on their own in isolation, but yet a lot like to work in a team. In every team there is a team leader and the other people that make up that team. When you have a team it is important each and everyone of you know what role you have within the team, being in a team gives you responsibilities also you need to report to others in your team to keep everyone up to speed in whatever you are doing as a team.  With team work it is vital that everyone knows what role they have otherwise people may end up doing the same things as each other. The reason for a team is that some tasks are not doable on your own, like making a video game for a console you have many different departments working on different sectors like you have the designers the game engineers and the management team all working together.
Updating 
We update day in day out through social networking, our computer programs, apps, the list goes on but updating has allot more to it than some me see for example Apple's iOS 7 software there has been an update in every 1-3 months patching small things like language issues, adding languages to the Siri file system, patching small errors like with the new iPhone 5S the fingerprint touch ID was not 100% perfect bu these patches slowly overtime sorted these issue out. Updates come out for a variety of reasons for example users say they want a new feature to be added or removed or an option for the feature companies will look at what their customers say and see how many people want want in the update.
Updating an application  or the software you create the applications in is important this is because of the software owners patching problems in the software you use and you the creator of you application helping the people who have your software. 
Updated software this will help resolve security issues, bugs, patches also updating software will allow you to prevent people exploiting and making illegal versions or licenses if your program requires a license to run with all features.

References
, . BTEC Level 3 National IT Student Book 1. 3rd Revised edition Edition. Pearson Education.


Wednesday 26 March 2014

Unit 6 M1

Unit 6: M1 - Explain the importance of the quality of code 


Annotation

Annotation is where you give a short but straight to the point line that dies not interact with your code, basically your describing or explaining what that line of code is doing this is to benefit you and others who see your code and do work on it. Here is an example of commented code.




                              





Above is a screenshot of a section in my code in green are the comments. To write a comment you start with a ' and then type what you want it to say like this 'Here is a comment. The line you have written will go green.


Sequence


When writing programs a sequence occurs; this is when an action takes place which leads to an event happening. This ensures that all steps are executed properly.  An example of this could be if the program multiplies in numbers, this means that the user will have to input the numbers and multiply them, this will allow them to be displayed so that the user has the ability to view them on screen.

Selection

This will change as it moves around the way your code is written this is because a condition decides which route the program will take when reading your code normally this occurs when a question or proposal . Here's an example “is a less than b?" The condition would be (a<b) or you could have 


Iteration

Iteration is when you reuse a piece of code this is because it needs to meet a requirement virtually all programming language uses this method to reduce the amount of code required to run a program to create tasks this is known as a loop.
There are two types of loops definite and indefinite:
A definite loop repeats only tow. Certain amount of times set manually by the programmer whilst the indefinite loop only repeats until a condition is met this would be like when a file is being read and if the program was relation dates it would stop when no more dares can be repeated.

 Eliminating repeated and redundant code

To do this what we do is make a new public class and then put the code we want in the class, this then turns into a call function, what a call function allows us to do is make the program read the piece of code we have written without slowing the PC performance down or take up lots of memory, here is an example.










Program structure

This is how the code is written if its organised really, when i write my code for my Simple Simon game i put all my Variables at the top of the code viewer then wrote the rest of my code commenting it as i went along. Having a good program structure is very helpful when writing out code this is because if the code was in the wrong order then if another coder came along to look through your code they probably would not understand what is going on and easily get confused because your program structure is disorganized.

Logical Methods






Reliable and robust this is to do with users wanting to test the program thoroughly for example on our simple Simon game we are developing we have a name input section this is for only text where as a code tester would check if numbers and symbols could be entered and accepted, if this were to occur a successful code build would be able to with stand these errors and bring up an error box telling you what to do to prevent it from happening again.

Usability this is to do with the design aspect of the program this is the graphical user interface. What this means is that usability for other people accept your self this is having clear labelled buttons for easier usage, having clear headings and titles so that the user can see what they are doing and having a good colour choice so that colours do not clash causing eye strain and headaches to the users an example would be having neon green and white the two bright colours would not work with each other as the neon green would over power the white preventing a clear heading.

Portability this means that the code of your program should not be to complex to run on lower version on operating systems this could be you developing a program on windows 7 with an intel i5 processor having lots of background code running in the program you made then trying to run this on windows XP this would create conflicts as the operating system is outdated and may not run all features making some parts to your game inoperable, this could also lead to other problems like freezing the computer and causing lag making the computer run under performance.

Predefined code are software systems that's are similar to many other systems this means they have many similar functions and procedures from other code so therefore when you come to writing another program the predefined code is already written and this will save you a great deal of time when developing code for programs.

Readability this is to do with complicated code that looks horrific because the previous coder had not put any comments.
What are the use of comments? What comments do is give a brief explanation of that piece of code does a comment is written like this 'calculate average display because of the quotation mark the software that you code with for example Visual studio 2012 the quotation mark the code doesn't get read by the software instead it only acts like a description and doesn't affect the written code when running the program itself.

Maintainability This is to do with commercial software, this is when the developers bring out updates for the program to help with compatibility issues, bug fixes and patches this will help make the software more stable and create a better user experience.



Tuesday 25 March 2014

Unit 6 p4

BTEC level 3 Extended Diploma in IT(Software Development)

Unit 6 + 14 – Software Design and Development / Event Driven Programming

Assignment - Task 1 - Programming languages

Draft submission deadline: 23rd March 2014

FINAL submission deadline: 28th March 2014

Scenario: 

Unit 6: P4 - Outline the benefits of having a variety of data types available to the programmer

Outlines the range of data types available to a programmer
Discusses the different purposes for which data types can be used.
Explains why it is useful to have various data types available.
 
It is useful to have various data types because if we only had one choice of a data type then a system would crash as the values would be incorrect also not having the right choice of the data type his could result in excessive amounts of storage space being set aside. 

Sunday 23 March 2014

Unit 14 m1

Explain how an operating system can be viewed as an event driven application.

An operating system can be viewed as an event driven application as it requires human input to function there are many ways to show how an operating system can be viewed as an event driven application and I will show you some.
The picture above is showing us the windows 7 start menu to get here we would have to move the mouse and click either the right or the left side depending on your mouse primary click settings.
What we have just done is an event the event is known as a click event. Now that the start menu has opened we have many different events in this menu now we are going to go ahead and click the control panel link event.
Here the computer has opened a new window and closed the start menu, this window is control panel so as you can see this is event driven because of all the tasks we had to do to get to this window form moving the mouse to clicking the icon.

Another way an operating system can be. died as an event driven application is when we insert removable media from a disk to a portable drive of some kind or any USB powered device.
When you insert a USB Emory stick this menu pops up


Here in this menu are five different link which all have a different even behind them, if we selected Use this drive for backup a new window would open in the operating system and allow us to backup certain areas of our computer, but today we are going to select view files even you have clicked this a new window would open showing you what removable media drive you have inserted into the slot on your computer he slot we have inserted our removable media into is E:, when the drive is open in a
It's new window you will be able to see what files are stored in the removable drive.

The next example on how an operating system can be viewed as an event driven application is when we come to turn the computer off, restart the computer, switch users, log off, sleep and hibernate.
All these names are events with different functions behind them.

This is the shutdown menu and when you click like the annotated image shows on the small arrow you get this small side menu pop up this is event driven ans when you click another menu on top of the start menu will display, in this little menu are six different event driven processes each process has a different outcome some are similar but still not the same I will now tell you about all six 

Switch users this is used when you have more than one account on the computer clicking this option will let you keep your computer how it is and switch to another user and they can do what they need to do without closing down anything you have open.

Log off this function will log out the user and close down all of the programs you have open and take you back to another menu where you have the choice to chose which login you would like to use.

Lock this function is so that you can immobilise your computer and to get back onto it you would require a password so this is used for when people are at work places this prevents people from using your machine for these purposes.

Restart this function allows the user to turn their computer off and on again without then having to press the power button once switched on also the restart option can come up when you are installing new programs normally what the program will say is "Please restart the computer to finish the installation." You should get a choice depending on program to restart now or later.

Sleep what is function does is leave all your programs open not close anything down and out your computer In a low power state this is known as sleep mode and when you need to wake up the computer normally you would wiggle the mouse or on some laptops press the power button.

Hibernate this function is for when a user could he running low on battery and not get to a charging point in time what this function will do is almost freeze your computer in a promary state and cannot be changed as the computer will save itself on your drive an when you power up the computer again you will he able to continue where you left off last.