Science Fair Projects Ideas - Procedural code

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Procedural code

Procedural coding is an anti-pattern that involves building indivisible, monolithic solutions to problems by not factoring out commonalities. This leads to highly complex dependencies between components of the code. A classic example of this is a function that contains one hundred lines of instructions.

The main casualties of this anti-pattern are:

  1. Re-use: Since the granularity of the solutions are not very fine, it is difficult to re-apply one solution to another problem.
  2. Readability: In order to understand the problems being solved it is necessary to step through code while trying to keep track of the complex state of the world.
  3. Maintainablilty: Since dependencies are highly complex, it is difficult to make a change and know what the outcome will be.
  4. Robustness: Since everything depends on everything else, there are an exponentially large number of failure points.

As way of illustration consider the analogy of driving to a destination. The procedural solution is to follow a set of step-by-step driving instructions without using a map. E.g. "turn left at Main Street, go 2 blocks and turn right...". The driving directions are highly context sensitive and of little use to those who do not share the same point of origination and destination. If we lose our place we may need to back trace through the instructions to find out where we are. If an unanticipated detour occurs a lot of unnecessary analysis is required to get back on course. Also, one wrong turn could lead to hours of lost time or the inability to arrive at the destination.

It is impossible to develop a solution without any proceduralism anywhere, the question is where this occurs and how. Most programming paradigms in use today aim to break up the procedures into small re-usable chunks. See Object-oriented programming for one example of this.

Another paradigm gaining in commercial popularity aims to break the solution up into two independent stages, a declarative and a interpretive stage. The goal state is declared in one stage independent of the solution, and the actual processes used to arrive at any given goal are left up to the interpretor. In order to handle all possible permutations of processes needed to arrive at the goals that the various declarative stages might desire, the interpretor is forced to break the problem domain down into its natural components for re-use. See declarative programming.

10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice