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.

Friday 8 November 2013

Unit 6P2

Unit 6: P2 - Describe the factors influencing the choice of programming language
Write a brief report/blog post which outlines the key factors which would influence a developer when choosing which language to create a particular software solution. Consider:
 Time constraints
 Organisational policy
 Suitability
 Availability of trained staff
 Reliability
 Environment
o Hardware
o Operating systems
 Development and Maintenance costs
 Expandability
What you need to hand in:
Your report Spell checked, proof read, with a with a cover page / blog first page (name, unit, title, date) Minimum 600 words (P2)

Time constraints-This would be how long it would take to code in that language for example coding in visual basic. Time constraints would also follow when learning a new program because it would take you longer to learn that program.

Organisational policy-Big companies such as Microsoft own there own programs to code in such as Visual Basic.If a company purchased this for there coding developers to use this would mean that they would get full support from Microsoft this would direct developers to choose there language of coding.

Development and maintenance costs-This would help developers decide on the programming language because buying the newest version of the software  will cost allot but will help if the language upgrading the language will help you make your programs or websites easier to develop as the language in the software would be enhanced for better performance.

Suitability-Developers would only want to use the software with the language if there hardware in the PC is completely compatible, otherwise you will end up having to buy new hardware to make your software where the new updated coding language is usable, also developers would only want this if it has all the correct feature's in the language this could be from a timer to a text box.

Availability of trained staff-In a programming company you would need your staff to know or have previous knowledge in this language because it is no good having new employees who either know nothing about C++ for example but know Python language.

Reliability-This is key to know that the program and the language you are using is going to be reliable for instance say you were building a program and you come to test the code that you have written out and the program comes back saying 'program not responding' this would show that your program is very unreliable and if this keeps occurring  then you have a serious problem with either your system or your program.

Environment-This would be the way the program and language is displayed in the program that would be the environment, many coders prefer to set their window layout personal preference to themselves, that could be from moving the window layout around so placing and swapping the environment that you work in around. 

Hardware-Developers will want to know whether their hardware components will be compatible because otherwise errors will occur language may not perform at maximum performance, this could lead to potential damage this could be the processor for example overheating causing permanent damage meaning you would need new processors.

Operating systems-This is essential as you would need to have more than one operating system in your bushiness as developers that code will want to build it for multiform such as Mac OS X or Linux. Developers would prefer to be able to test on different operating systems as they can sort out problems they encounter along the way.

Expandability-Developers would want to have a high expandability for instance if they developed a beta for a program and you had a certain amount of users testing it you would need a high capacity server to take all the requests. Some languages are better than others and have more feature's so you would need a larger system to support that. 

Thursday 19 September 2013

Unit 6P1


P1 - describe the application limits of procedural, object oriented and event driven programming paradigms

Procedural Programming language

Procedural programming languages are used to solve a lot of different problems.
 This style of programming was brought as a result of lines of code being too complex and time confusingly long; thousands of lines of code were needed for one program. The procedural approach of programming was brought in so that users would break down these lines of code into block of around 10 lines of code; these blocks were used to carry out specific actions for the final release of programs. These are procedures acquiring to the name of this style of programming it is called Procedural Programming. In procedural programming a program would be built by writing these functions/procedures and calling upon them when you need them to perform a function within the program.

Object Oriented Languages

Object – orientated programming (OOP) – OPP takes a different approach to the stricture of a complex program. OPP was developed in a format to help with the difficulties that were troubling in the creation of highly complex system using the procedural approach. With OPP, a program is broken down into objects rather than procedures.

Event Driven Programming

The first programming language limitations that I will discuss will be EDP language. This language will be hard to get to grips with because it is complicating; also it is only really easy to use with a GUI, graphical user interface, and framework such as frames per second (FPS). If you made a program with a calculation using a few textboxes and a button you will only get those values calculated once the button is clicked. This is fine but where the limitation stands if you wanted to get rid of the GUI you would need to recode all over again as the previous code would be bases on a GUI system and wouldn’t be able to be put somewhere else.

Object Oriented Programming

OOP will be the second language that I will look at; some of the limitations for this programming language are that a lot of tasks must be done manually; they are difficult to modify or extend within an application that has been made.

Procedural programming

Procedural programming is extremely advanced in performance, however like everything it does have limitations; one of the more serious limits is “spaghetti-code”. Spaghetti code is a form of code that would have had to have been written too many times so that the flow will become unusable to new programming coming onto the project. The new programmer will then have to take a preoperational-course which will enable to begin to understand the software. This is caused because the code will constantly have to be changed and adapted in order to meet the user demand which means introducing things like sub loops and new methods altogether is a hard to adapt. However there is no good tool which is for abstraction, which is something that only exists as an idea, and modularization in procedural languages. This means that it’s hard to add new functionality or change the work flow without going back and modifying all other parts of the program.

List of six programming languages most commonly used:

PHP-PHP is an open source web development language through HTML and supports cross platforms.


C#-C# is a general object orientated programming source this was developed by Microsoft as part of .NET.

JavaScript-JavaScript is not Java sounds confusing now doesn’t it but really its simple JavaScript is an object orientated scripting program. Also this program is easier to code and is smaller than Java itself.

VB.NET (Visual Basic.NET)-VB.NET is an object orientated implemented program designed by Microsoft’s.NET framework and is a lot easier to use than other scripting programs.
Python-Python is basically python would be classed as object orientated but is open source language based program it also utilizes memory management.

Java-Java is an object orientated based program developed by James Gosling in Sun Microsystems in the early 1990s. Developers describe this programming language to be “beautiful” because it is not part of the .NET framework or developed by Microsoft.

Why are there so many languages?
There are so many languages simply because new languages are designed and built to update existing languages such as C-C++ making improvements for a better user experience also there are so many languages because some languages are specially designed to do certain jobs or to create light weight applications Java is a good example to use for light weight applications.


References: 

U14 P1

Describe the key features of event driven programs.

1) What an event driven language is?
     2) A description of one event driven language
     3) Typical ‘events’ in your chosen language
     4) What features of the language are available?
     5) What are the advantages of your language?
     6) What are the disadvantages of the language?





Moving the mouse and clicking the windows icon brings up the start menu.
1) Modern programming languages are event driven this means that it works well with graphical user interface (GUI) example of an operating systems a common example is Microsoft’s Windows®. This type of programming is event drives example of this. This is an operation caused by the user clicking the icon which is the event, this then activates a line of code where then the code handler reads it and activates the code.

2) One example of an event driven language would be Microsoft’s visual studio (MVS) a program that allows users to write coding in VB.NET (Visual Basic.NET) this is very popular programming language.VB.NET is an object-oriented language, with a robust integrated development environment. VB.NET employs classes and objects as part of its object-oriented implementation, providing programmers with the ability to quickly create new objects from existing classes. This can your programming time and help you develop a better application.


3) Typical events that occur are clicking on a button, or entering some text in a text box, or clicking on a menu item all are examples of events. An event is an action that calls a function or may cause another event.




Here I have made a simple text window with two buttons to bring out two different messages “Good message” and “Bad message”. 







4) Inheritance, polymorphism, interfaces, and overloading these are just some of the language features in VB.NET (Visual Basic.NET). Here is a brief description of each feature that I have listed.
5) What are the advantages of your language?
Inheritance, the ability to define classes that serve as the basis for derived classes. Derived classes inherit, and can extend, the properties, methods, and events of the base class. Derived classes can also override inherited methods with new implementations. By default, all classes created with Visual Basic are inheritable.
Polymorphism provides the ability to vary the implementation of a method or property. With polymorphism, the same method or property can perform different actions depending on the run-time type of the instance that invokes it.


Interfaces define the properties, methods, and events that classes can implement. Interfaces allow you to define features as small groups, using interfaces you have a very small chance of any compatibility problems, this means that you will not run the risk of jeopardising your work. There is more flexibility with interfaces such as giving the user the ability to define single implementation that can then implement onto more complex multiple interfaces.

Overloading happens when more than one procedure takes place in coding, when multiple codes with the same name operate within a program. Advantages of this are shorter codes can be created with the same effect, several data types can have the same display types that look like this example below:








6) What are the disadvantages of the language?
Some disadvantages of this language VB.NET (Visual Basic.NET) are as follows:

The language can be slow this is to the fault that the program running the language requires a lot of processing power for the event loops to continuously check in the GUI (Graphical User Interface) yet to find out if anything has occurred i.e. syntax errors, general errors and faults. More power is being taken up when triggered to match functionality with the events of the event handler.