SOFTWARE ENGINEERING
Unit - I
  Software & Software Engineering
Introduction to Software Engineering
                                       1
            Software engineering
• Software is more than just a program code. A program is an
  executable code, which serves some computational purpose.
  Software is considered to be collection of executable programming
  code, associated libraries and documentations. Software, when
  made for a specific requirement is called software product.
• Engineering on the other hand, is all about developing products,
  using well-defined, scientific principles and methods.
• Software engineering is an engineering branch associated with
  development of software product using well-defined scientific
  principles, methods and procedures.
• The outcome of software engineering is an efficient and reliable
  software product.
        What is Software?
The product that software professionals build and then support
over the long term.
Software encompasses:
(1) instructions (computer programs) that when executed
    provide desired features, function, and performance;
(2) data structures that enable the programs to adequately
    store and manipulate information and
(3) documentation that describes the operation and use of the
    programs.
                                                                 3
         Software products
• Generic products
  – Stand-alone systems that are marketed and sold to
    any customer who wishes to buy them.
  – Examples – PC software such as editing, graphics
    programs, project management tools; CAD software;
    software for specific markets such as appointments
    systems for dentists.
• Customized products
  – Software that is ordered by a specific customer to
    meet their own needs.
  – Examples – embedded control systems, air traffic
    control software, traffic monitoring systems.
                                                         5
   Why Software is Important?
• The economies of ALL developed nations are
  dependent on software.
• More and more systems are software controlled (
  transportation,       medical,      telecommunications,
  military, industrial, entertainment,)
• Software engineering is concerned with theories,
  methods and tools for professional software
  development.
• Expenditure        on      software      represents  a
  significant fraction in all developed countries.
          Software costs
• Software costs often dominate computer
  system costs. The costs of software on a PC
  are often greater than the hardware cost.
• Software costs more to maintain than it does
  to develop. For systems with a long life,
  maintenance costs may be several times
  development costs.
• Software engineering is concerned with cost-
  effective software development.
                   Software Evolution
• The process of developing a software product using software engineering
  principles and methods is referred to as software evolution.
• This includes the initial development of software and its maintenance and
  updates, till desired software product is developed, which satisfies the
  expected requirements.
• Evolution starts from the requirement gathering process. After which
  developers create a prototype of the intended software and show it to the
  users to get their feedback at the early stage of software product
  development.
• The users suggest changes, on which several consecutive updates and
  maintenance keep on changing too. This process changes to the original
  software, till the desired software is accomplished.
• Even after the user has desired software in hand, the advancing
  technology and the changing requirements force the software product to
  change accordingly.
• Re-creating software from scratch and to go one-on-one with requirement
  is not feasible. The only feasible and economical solution is to update the
  existing software so that it matches the latest requirements.
              Software Evolution Laws
Lehman has given laws for software evolution. He divided the software into
three different categories:
• S-type (static-type) - This is a software, which works strictly according to
   defined specifications and solutions. The solution and the method to
   achieve it, both are immediately understood before coding. The s-type
   software is least subjected to changes hence this is the simplest of all. For
   example, calculator program for mathematical computation.
• P-type (practical-type) - This is a software with a collection
   of procedures. This is defined by exactly what procedures can do. In this
   software, the specifications can be described but the solution is not
   obvious instantly. For example, gaming software.
• E-type (embedded-type) - This software works closely as the requirement
   of real-world environment. This software has a high degree of evolution as
   there are various changes in laws, taxes etc. in the real world situations.
   For example, Online trading software.
        Characteristics of good software
• A software product can be judged by what it offers and how well it can be
  used. This software must satisfy on the following grounds:
    – Operational
    – Transitional
    – Maintenance
Operational
• This tells us how well software works in operations. It can be measured
  on:
    –   Budget
    –   Usability
    –   Efficiency
    –   Correctness
    –   Functionality
    –   Dependability
    –   Security
    –   Safety
Characteristics of good software Cont..
 Transitional
       This aspect is important when the software is moved from one
  platform to another:
  – Portability
  – Interoperability
  – Reusability
  – Adaptability
  Maintenance
      This aspect briefs about how well a software has the capabilities to
  maintain itself in the ever-changing environment:
  – Modularity
  – Maintainability
  – Flexibility
  – Scalability
               Features of Software
Characteristics of software :
• Software is developed or engineered, it is not manufactured in the
  classical sense which has quality problem.
• Software doesn't "wear out.”
    – but it deteriorates (due to change). Hardware has bathtub curve of failure
      rate ( high failure rate in the beginning, then drop to steady state, then cumulative effects of dust,
         vibration, abuse occurs).
• Although the industry is moving toward component-based
  construction(e.g. standard screws and off-the-shelf integrated circuits),
  most software continues to be custom-built.
      – Modern reusable components encapsulate data and processing into software parts to
        be reused by different programs. E.g. graphical user interface, window, pull-down menus
        in library etc.
                                                                                                          12
Wear vs. Deterioration
                         13
         Software Components
• Resuabilty-    high quality of software
  components
• software components are built using a
  programming languages.
  – Lowest level- instruction set of the hardware
  – Mid level- smarttalk
  – Highest level- executable instruction are
    automatically generated
  • Fourth generation language is called non
    procedural language.
          Software Applications
•   1. System software: such as compilers, editors, file management
    utilities
•   2. Application software: stand-alone programs for specific needs.
•   3. Engineering/scientific software: Characterized by “ number
    crunching”algorithms. such as automotive stress analysis, molecular
    biology, orbital dynamics etc.
•   4. Embedded software resides within a product or system. (key pad
    control of a microwave oven, digital function of dashboard display in
    a car)
•   5. Product-line software focus on a limited marketplace to address
    mass consumer market. (word processing, graphics, database
    management)
•   6. WebApps (Web applications) network centric software. As web 2.0
    emerges, more sophisticated computing environments is supported
    integrated with remote database and business applications.
•   7. AI software uses non-numerical algorithm to solve complex
    problem. Robotics, expert system, pattern recognition game playing
                                                                    15
            Risk Management
• Risk is an uncertain event that may have
  positive or negative impact on project.
• Risk Management is the process of identifying
  and migrating risk.
• Why is it important?
  – Risk affect all aspect of your project , your budget
    and your schedule.
Reactive and proactive Risk Strategies:
• Reactive:
  – Don’t worry! I will think of something
  – Fire fighting
• Proactive:
  – Identity potential risks
  – Assess the likelihood of their happening
  – Estimate their impact
  – Plan to manage these risks
     •   Avoid
     •   Reduce likelihood
     •   Prevent
     •   Contingency plan
Difference
        Overview of Risk Management:
• Risk Index: Generally risks are categorized into two
  factors namely impact of risk events and probability of
  occurrence.
• Risk index is the multiplication of impact and
  probability of occurrence.
• Risk index can be characterized as high, medium, or
  low depending upon the product of impact and
  occurrence.
• Risk index is very important and necessary for
  prioritization of risk
                                                       19
• Risk Assessment: Risk assessment is another
  important case that integrates risk management
  and risk analysis.
• There are many risk assessment methodologies
  that focus on different types of risks.
• Risk assessment requires correct explanations of
  the target system and all security features.
• It is important that a risk referent levels like
  performance, cost, support and schedule must be
  defined properly for risk assessment to be useful.
                                                       20
     Software Risk Management:
• Risk Analysis: There are quite different types of risk
  analysis that can be used. Basically, risk analysis is used to
  identify the high risk elements of a project in software
  engineering.
• Also, it provides ways of detailing the impact of risk
  mitigation strategies.
• Risk analysis has also been found to be most important in
  the software design phase to evaluate criticality of the
  system, where risks are analyzed and necessary counter
  measures are introduced.
• The main purpose of risk analysis is to understand risks in
  better ways and to verify and correct attributes.
• A successful risk analysis includes important elements like
  problem definition, problem formulation, data collection
                                                              21
 Importance of Software Engineering
• More and more, individuals and society rely on
  advanced software systems.
• We need to be able to produce reliable and
  trustworthy systems economically and quickly.
• It is usually cheaper, in the long run, to use software
  engineering methods and techniques for software
  systems rather than just write the programs as if it was
  a personal programming project.
• For most types of system, the majority of costs are the
  costs of changing the software after it has gone into
  use.
                                                        22
                            FAQ about software engineering
Question                                   Answer
Whatis software?                           Computer programs, data structures and associated
                                           documentation. Software products may be developed for a
                                           particular customer or may be developed for a general
                                           market.
Whatare the attributes of good software?   Good software should deliver the required functionality and
                                           performance to the user and should be maintainable,
                                           dependable and usable.
Whatis software engineering?               Software engineering is an engineering discipline that is
                                           concernedwith all aspects of software production.
What is the difference between software Computer science focuses on theory and fundamentals;
 ngineering and computerscience?        software engineering is concerned with the practicalities of
                                        developingand delivering useful software.
What is the difference between software System engineering is concerned with all aspects of
 ngineering and systemengineering?      computer-based systems development including hardware,
                                        software and process engineering. Software engineering is
                                        partof this more generalprocess.
                                                                                                       3
   Essential attributes of good software
Product           Description
characteristic
Maintainability   Software should be written in such a way so that it can evolve to meet the changing
                  needs of customers. This is a critical attribute because software change is an
                  expected requirement of a changing business environment.
Dependability     Software dependability includes a range of characteristics including reliability,
and security      security and safety. Dependable software should not cause physical or economic
                  damage in the event of system failure. Malicious users should not be able to access
                  or damage the system.
Efficiency        Software should not make wasteful use of system resources such as memory and
                  processor cycles. Efficiency therefore includes responsiveness, processing time,
                  memory utilisation, etc.
Acceptability     Software must be acceptable to the type of users for which it is designed. This means
                  that it must be understandable, usable and compatible with other systems that they
                  use.
              Software myths
• Myth: means wrong belief or misinformation.
• Software myth: software myth are beliefs about
  software and the process used to build it.
• Myths have no. of attributes that causes serious
  problem on software.
• There are 3 types of myths:
  – Management myths
  – Customer Myths
  – Software Engineers’ Myths or Developer myths
   Management Myths [Pressman]
• We already have standards and procedures for building
  software; isn’t that enough?
   – How widely used is it?
   – How relevant to the team?
   – How useful to the project?
• If we’re behind schedule, we’ll just add more programmers to
  catch up
   – “Adding people to a late project makes it later”
   – Interference
• They think they have latest computer.
• A good manager can manage any project.
     Customer Myths [Pressman]
• s/w myths believed by customer who can internal
  or external.
• Customer always think that s/w is development is
  an easy process
• A general statement of work is sufficient to kick
  off the project,
• Requirements can change, and that’s OK because
  software is so flexible
  – Most software project failures can be traced to
    inadequacy of requirement specifications
Software Engineers’ Myths [Pressman]
• If I miss something now. I Fix it later
• Once the program is written, I’m done
   – Between 60-80% of effort expended after delivery
• Until the program is written, quality is uncertain
   – Formal design reviews
   – Formal code reviews
   – Test-first approaches
   – Prototyping to verify design and structure
   – Prototyping to validate requirements
• The only deliverable is the program itself
   – Lots of documentation: installation guides, usage guides,
     maintenance guides, API definitions and examples
Software Engineers’ Myths [Pressman]
• Documentation is Software-Engineering busy
  work
  – Focus is on quality, not quantity
  – Documentation can be hard for engineers to
    write, just as C++ may be difficult for poets.
  – Conserve energy: documented code can serve as
    a basis for useful documentation
          The Essence of Practice
           (Software Problems)
• How does the practice of software engineering
  fit in the process activities mentioned above?
  Namely, communication, planning, modeling,
  construction and deployment.
• George Polya outlines the essence of problem
  solving, suggests:
     1.      Understand the problem(communication and
       analysis).
     2.      Plan a solution (modeling and software design).
     3.      Carry out the plan (code generation).
     4.      Examine the resultforaccuracy (testing and
       quality assurance).
                                                               31
      Understand the Problem
• Who has a stake in the solution to the
  problem? That is, who are the stakeholders?
• What are the unknowns? Whatdata,
  functions, and features are required to
  properly solve the problem?
• Can the problembe compartmentalized? Is it
  possible to representsmallerproblems that
  may be easierto understand?
• Can the problembe represented graphically?
  Can an analysis model be created?
                                           32
               Professional Visibility
1. Confidentiality: You should normally respect the confidentiality of
   your employers or clients irrespective of whether a formal
   confidentiality agreement has been signed.
2. Competence: You should not misrepresent your level of
   competence. You should not be knowingly accept work that is
   outside your computer.
3. Intellectual property rights: You should be aware of local laws
   governing the use of intellectual property such as patents and
   copyrights. You should be careful to ensure that the intellectual
   property of employers and clients is protected.
4. Computer misuse. You should not use your technical skills to
   misuse other people computers. Computer misuse ranges from
   relatively trivial to extremely serious.
             Software reuse
• In most engineering disciplines, systems are
  designed by composing existing components
  that have been used in other systems
• Software engineering has been more focused
  on original development but it is now
  recognised that to achieve better software,
  more quickly and at lower cost, we need to
  adopt a design process that is based on
  systematic reuse
               Benefits of reuse
• Increased reliability
   – Components exercised in working systems
• Reduced process risk
   – Less uncertainty in development costs
• Effective use of specialists
   – Reuse components instead of people
• Standards compliance
   – Embed standards in reusable components
• Accelerated development
   – Avoid original development      and hence   speed-up
     production
                  Process Visibility
1. Maintainability: Software should be written in such a way
   that is may evolve to meet the changing needs of
   customers. This is a critical visibility because software
   change is an inevitable consequence of changing business
   environment.
2. Dependability: Software dependability has a range of
   characteristics, including reliability , security & safety.
   Dependable software should not cause physical or
   economic damage in the event of system failure.
3. Efficiency: Software should not make wasteful use of
   system resources such as memory & processor cycles.
   Efficiency therefore includes responsiveness, processing
   time, memory utilization etc.
4. Usability: Software must be usable, without undue effort,
   by the type of user for whom it is designed. This means that
   it should have an appropriate user interface & adequate
   documentation.
SDLC