Process methods in ZERO-DEFECT software engineering.

23
process methods in ZERO-DEFECT software engineering

Transcript of Process methods in ZERO-DEFECT software engineering.

Page 1: Process methods in ZERO-DEFECT software engineering.

process methods in

ZERO-DEFECTsoftware engineering

Page 2: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringINTRODUCTION

What are zero-defect methods?

“Zero-defect methods are practices thataim for zero defects in the software

before software is built.”

Page 3: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringINTRODUCTION

Why zero-defect methods?

• Software testing can only remove about 73%of defects on average

• Software testing can be impossible to carryout in specific end systems (asynchronousentities, embedded systems)

“The expensive and inefficient phase of software testingcan be avoided with the use of zero-defect methods.”

Page 4: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringINTRODUCTION

About Sitoni Oy

• Sitoni Oy is a software engineering, consultingand training company established in 1991

• Its software aims for elastic management andhandling of data

• The software seeks to abandon predefineddefinitions of processed data

Page 5: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringINTRODUCTION

About Sitoni Oy

• The software attempts to manage largeheterogeneous flows of data and solve thedemanding data processing problems relatingto them

Continue?

Page 6: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringINTRODUCTION

The work consists of two parts

• Research part Researching Sitoni zero-defect concepts

• Development part Developing the media for the researchedconcepts

Page 7: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringPHASES OF THE WORK

Phases of the work:

Preliminary Study

Analysis / Requirements Definition

Design

Implementation

QA / Testing / Deployment

Page 8: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringPHASES OF THE WORK

Preliminary study

• Project plan

• Schedule with phases and milestones

• Development web site (for the supervisor)

Page 9: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringPHASES OF THE WORK

Requirements Definition

• Division of requirements (content part,web site part)

• Definition of individual requirements and theirpriorities

• Combining the content requirements into largerentities

Page 10: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringPHASES OF THE WORK

Design

• Designing of the linguistic issues of the contentpart

• Designing of the web site (“User Interface”,appearance, markup language, highest leveluse cases, script intended functions, etc.)

Page 11: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringUML USE CASE EXAMPLE

Page 12: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineering

Implementation

• Writing of the content part

• Implementing the web site by the design Standard markup language XHTML 1.0 Modular design User-agent dependencies avoided

PHASES OF THE WORK

Page 13: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringCONTENT EXAMPLE

Content Example:The WndProc function (WinAPI)

Page 14: Process methods in ZERO-DEFECT software engineering.
Page 15: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringCONTENT EXAMPLE

Adding basic zero-defect concepts to thedefault form of the WndProc function• Removing of extra return statements so that thefunction complies with an axiom of one input –one output

• Adding basic parameter checking Is the hwnd handle valid? (IsWindow) Safety limits for msg parameter

• Making code layout systematic and to supportzero-defect concepts

Page 16: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringWEB SITE EXAMPLE

Web site Example: PHP-function

“Gathers date, time, IP-address, user-agent information and writes themto a text file (log). The current entry is not appended to the end of thetext file but previous entries are read from the file first and then thecurrent entry is written to the beginning of the file followed by theprevious entries. The relative path of the log file is given as a parameter‘$file_name’. The maximum limit of the size of the text file size is givenas parameter ‘$filesize_limit’. When this limit is exceeded it willoverwrite the file and start from 0 bytes. This function does not returnanything.”

write_hit_log ($file_name,$file_size)

Page 17: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringWEB SITE EXAMPLE

function write_hit_log ($file_name,$file_size_limit) { $truncate_ok_flag = FALSE ; $rewind_ok_flag = FALSE ; $write_ok_flag = FALSE ; $file_size = NULL ; $in_buffer = NULL ; $out_buffer = NULL ; $date = &get_server_date (0) ; $time = &get_server_time (0) ; $ip_address = &get_remote_address (); $user_agent = &get_user_agent () ; $file_handle = NULL ; settype ($truncate_ok_flag,"boolean") ; settype ($rewind_ok_flag,"boolean") ; settype ($write_ok_flag,"boolean") ; settype ($file_size,"integer") ; settype ($file_size_limit,"integer") ; settype ($file_name,"string") ; settype ($in_buffer,"string") ; settype ($out_buffer,"string") ; settype ($date,"string") ; settype ($time,"string") ; settype ($ip_address,"string") ; settype ($user_agent,"string") ;

Page 18: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringWEB SITE EXAMPLE

if ($file_name != NULL) { if ($file_size_limit > 0) { $file_handle = fopen ($file_name,"r+") ; if ($file_handle != FALSE) { $file_size = filesize ($file_name) ; if ($file_size < $file_size_limit) { $in_buffer = fread ($file_handle,$file_size) ; $out_buffer = $date . "," . $time . "," . $ip_address . "," . $user_agent . "\n" . $in_buffer ; $rewind_ok_flag = rewind ($file_handle) ; if ($rewind_ok_flag != FALSE) { $write_ok_flag = fwrite ($file_handle,$out_buffer) ; if ($write_ok_flag != FALSE) { ; } else { echo "\nAn expected event has happened in the PHP script: Unable to write to the file\n" ; } } else { echo "\nAn expected event has happened in the PHP script: Unable to rewind the file pointer\n" ; } } else { $truncate_ok_flag = ftruncate ($file_handle,0) ; if ($truncate_ok_flag != FALSE) { $rewind_ok_flag = rewind ($file_handle) ; if ($rewind_ok_flag != FALSE) { $out_buffer = $date . "," . $time . "," . $ip_address . "," . $user_agent . "\n" ; $write_ok_flag = fwrite ($file_handle,$out_buffer) ;

Page 19: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineeringWEB SITE EXAMPLE

if ($write_ok_flag != FALSE) { ; } else { echo "\nAn expected event has happened in the PHP script: Unable to write to the file\n" ; } } else { echo "\nAn expected event has happened in the PHP script: Unable to rewind the file pointer\n" ; } } else { echo "\nAn expected event has happened in the PHP script: Unable to truncate the file\n" ; } } fclose ($file_handle) ; } else { echo "\nAn expected event has happened in the PHP script: Unable to open a file\n" ; } } else { echo "\nAn expected event has happened in the PHP script: Invalid filesize parameter\n" ; } } else { echo "\nAn expected event has happened in the PHP script: Invalid filename parameter\n" ; } }?>

Page 20: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineering

QA / Testing / Deployment• Website quality controlled with validationservices provided by W3C

• Content quality controlled by linguisticchecking

• Testing carried out by viewing the web sitewith several different browsers

• Deployment consists of setting-up the web siteon the client’s web server

PHASES OF THE WORK

Page 21: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineering

Future Development

• Studying of zero-defect methods profoundlyand on a wider scale

• Results combined into a full scientific specificationof the process

• The study could be published as an appendingspecification or a full-length book

• Adding the interactivity level of the web site

FUTURE DEVELOPMENT

Page 22: Process methods in ZERO-DEFECT software engineering.

process methods inZERO-DEFECT

software engineering

Conclusions

CONCLUSIONS

• The project succeeded in terms of the requiredspecification and defined schedule

• The pragmatic orientation diminishes the scientificvalue of the content part

• Sitoni zero-defect concepts are independent andextremely contrary to “normal” SE methods

A hope that this thesis work enlightens theworld of zero-defect programming

Page 23: Process methods in ZERO-DEFECT software engineering.

process methods in

ZERO-DEFECTsoftware engineering