2. WordPressEssentials
• Computer program is the art…!
• Development of a solution to an identified
problem.
• Series of instructions which when directed
through computer hardware will produce
• the desired results.
3. Basic Steps
1. Define the problem.
2. Outline the solution.
3. Develop the outline into algorithm.
4. Test the algorithm.
5. Code the algorithm into specific programming language, or
merge it with the existing system.
6. Run the program.
7. Document and maintain the program.
WordPressEssentials
4. 1- Define the problem
WordPressEssentials
1. The input.
2. The output.
3. The processing steps to produce the required outputs.
5. 2- Outline the solution
WordPressEssentials
Break the problem into smaller tasks or steps and establish an
outline solution.
May includes:
• The major processing steps.
• The major subtasks.
• The major Control Structures.
• The major variables and records.
• Mainline logic.
• May include structure chart.
6. 3-develop the outline into algorithm.
4- Test the Algorithm for errors.
5-code the algorithm in the specific
programming language.
WordPressEssentials
7. 6- Run the program
WordPressEssentials
Search For Logic errors and make enhancements
to your program functionalities.
Well designed program make this step easy.
8. 7- Document & Maintain
WordPressEssentials
Ongoing Task From the initial definition of the
problem to the final test results.
Both external doc , hierarchy charts, Data results &
internal doc.
10. Compilation errors
Are errors that prevent your program from
running.
When you run a program, (Consider scribing languages)
programming language compiles your code into
a binary language that the computer
understands. If the compiler comes across code
that it does not understand, it issues a compiler
error.Most compiler errors are caused by mistakes that you make when typing code.
misspell a keyword, leave out some necessary punctuation, or try to use an End
If statement without first using an If statement.
WebDevelopment
11. Run Time Error
WebDevelopment
Are errors that occur while your program
runs. These typically occur when your
program attempts an operation that is
impossible to carry out.
The program must run in order for this error to be detected, and run
only if it comes with a valid value.
When a run-time error does occur, you can use the debugging tools if
exists to determine the cause.
12. Logic Errors
WebDevelopment
Are errors that prevent your program from
doing what you intended it to do. Your code
may compile and run without error, but the
result of an operation may produce a result that
you did not expect.
For example, you might have a variable named FirstName that is initially set to a
blank string. Later in your program, you might concatenate FirstName with
another variable named LastName to display a full name. If you forgot to assign
a value to FirstName, only the last name would be displayed, not the full name
as you intended.
13. what is an algorithm…?
An algorithm is like a recipe وصفة it lists the
steps or orders necessary to get the desired
output.
I like to call it a Punch of code warp together
inside Computer memory.
WordPressEssentials
Problem-solving operations
Formula for solving a problem.
15. Structured Programming
Top – down development.
Outline the general solution then create steps and break mission
in to parts.
Modular design.
Grouping tasks together because they perform the same function
WordPressEssentials
Errors free code
17. Developing and algorithm
Define the problem.
Designing a solution algorithm.
Checking the solution algorithm. ->(master lang)
WordPressEssentials
General Considerations
18. Define the problem.
Carefully reading and rereading the problem until you
understand completely what is required.
Input: a list of the source data provided to the problem.
Output: a list of the output required.
Processing: a list of actions needed to produce the required
output.
WordPressEssentials
General Considerations
19. Variables
Actors of your Movie
WordPressEssentials
Meaningful names
Carefully select data type
Dig …?
20. Desk checking
Create setting points and assign its input variables.
Choose simple input which are valid, two or three cases will be
sufficient.
Establish what the expected results should be for each test.
Make table of variables (variable name, data type , stored data)
Results match the setting points.
WordPressEssentials
Six simple steps
21. Example
A program is required to read the length and width of a
rectangular house block and the length and width of the
rectangular house building.
You have to compute the time to cut the grass around the
house at the rate of two square meters per minutes.
WordPressEssentials
Calculate Mowing time
22. Solution
1. Calculate mowing time.
2. Prompt operator for block length and
width.
3. Get block length & width.
4. Prompt the operator to input building
length & width.
5. Get All required Inputs.
6. Calculate mowing area.
7. Divide mowing area by 2.
8. Print results in minutes.
WordPressEssentials
24. Answers…?
Be sure that your code in Human readable format.
Document everything.
Create backups (WP files & Database).
Update Your WordPress Website & Keep your WordPress
secured.
WordPressEssentials