Introduction to the Microsoft .Net Framework

Article by George Garza (1,900 pts ) , published Oct 29, 2009

Why is programming hard? How can it be made easier and at the same time allow for the dynamic changes that occur with the introduction of software which make it more difficult and challenging? The only way is if there is a framework that takes into account these elements.

What is Programming and What Problems are associated With it?

Programming is the science of writing executable code that guides the computer to perform certain tasks. That sounds easy enough, but in actuality it is one of the most difficult jobs that can be undertaken. Writing code involves setting up a series of instructions that tell the computer to do one thing and one thing only. It has to be understood by the computer, it must be fast, and it must be free of collateral operations or unintended consequences.

Take two very common tasks on a computer, printing and saving.

For printing one tells the computer,

  • print this
  • print this at this location
  • print it now
  • print one copy.

For saving you have a similar set of operations

  • Save this file
  • Save it to this location
  • Save it now
  • Allow me to retrieve it whenever I want
  • And I want to retrieve it in the same condition that I saved it in.

All of those tasks have to be programmed. But as the users expectations have changed over time, those expectations have led to more complex computer operations. Because of that there is always the problem of duplication of effort, that is code that was written once for one project and which can be used again is not used, so the code is re-written. Writing bloated code, that is code that should take only sixty lines for example may take 200 lines. Other problems are errors in the code and having to spend too much time on debugging or trying to fix the code.

How do you fix the problems?

One way to fix problems is to remove areas where coding issues like errors or duplication can be avoided. To that end, one of the most common programming tools are the libraries. These are specially coded programs that developers can use that take much of the duplication out of their hands. They also provde uniformity and consistency. Programmers that rely, for example on video or audio, can access the library, and not have to rewrite the code for accessing those features. This means that the code will work for any type of audio or video component that the programmer may need.

Another way of eliminating programming problems is by designing the code to not only be more flexible, but also to operate in a strict environment. One way to do this is to force the programmer to use only certain tools and use these tools only in restrictive ways. Some methodologies were created for just that purpose. One is object oriented programming. The other was modular programming.

In object oriented programming, the programmer has to create certain objects, but they can then be used again and again. Here the focus is on the data, not the function.

Another form of programming is modular programming. It focused on the function of a module, rather than the data. It also allowed for reusable units of programming logic and code.

Both of these approaches were concerned with quality. Each wanted to guarantee that the approach to programming would be as smooth and without problems.

Another problem involves code as it affects memory management. All programs have to access memory; they use it to store the results of CPU processes and to prepare data for processing. Memory has to be freed to allow other programs or applications to access it, but sometimes thay don't do that.

Showing page 1 of 2
Sponsors
 
Camtasia: record, save, share!
Record onscreen activity, your voice, and webcam video. See how great your presentation videos can look with Camtasia screen recording software!
Subscribe to Windows
RSS
Get free weekly updates, directly to your inbox.
Browse Windows Platform