All lessons Flashcards
What is software engineering?
A computer is a programmable device, so the essence of computing is programming. Program development is the most essential use of a computer. Software engineering is the study of program development. How to do it efficiently, develop reliable programs, etc. Considers any software development activity software engineering.
the systematic application of methods to build software in a rigorous way. It involves technically building the system but also understanding requirements, working with stakeholders, finding a solution that balances stakeholder’s needs
Why do we need software engineering?
Software is everywhere around us, to the point that the way we build and maintain our software effects our quality of life.
It can make the difference between a fun product and something the user hates, a successful company and a failed company, and in some examples life and death.
Example of a system that wasn’t engineered correctly: healthcare.gov (somewhere between requirements, architecture, politics, project management went wrong).
How was the software engineering discipline born?
In the 60s, people realized they weren’t able to build the software they needed, resulting in the SOFTWARE CRISIS.
Software Crisis:
1 - Rising demand for software (moving from HW to SW in our products)
The demand for software at companies (NASA, Boeing) grew exponentially between 60s and 2000
2 - Effort required for larger systems doesn’t increase linearly:
Programming effort = individual could (heroically) do it right themselves, Software engineering = team
Developer tools will never catch up with increased complexity in demand
3 - Developer’s productivity growth: developer’s abilities can’t keep up with what’s needed in terms of size/complexity:
Gap between what’s needed and what’s available
Various software processes
- Waterfall
- Go from 1 phase to the other in the same way water follows the flow in a waterfall
- Evolutionary Prototyping
- Start with a prototype, and evolve it based on feedback from the customer
- RUP/USP (Rational Unified Process/Unified Software Process)
- Heavily based on use of UML
- Agile
- Sacrifice the discipline a little bit to be more flexible and account for changes in requirements
Software process
- Requirements engineering (implies business modeling beforehand)
- Talk to customer, stakeholders, whoever we’re building SW for, to understand what kind of system we’re trying to build
- Design
- High-level structure, that can become more detailed, of our software system
- Implementation
- Write code that implements the design that we just defined
- Verification/Validation
- Make sure the code behaves as intended
- Maintenance
- Adding new functionality, eliminating bugs, responding to problems reported from the field after it’s released
Automated tools are ______ in software engineering.
FUNDAMENTAL
Not only for productivity. Not only efficiency, but also effectiveness
Software development mistakes
- People-related
- Heroics
- Work environment
- People management
- Process-related
- Scheduling issues
- Planning issues
- Failures (low quality, lost deliverables)
- Product-related
- Gold-plating requirements
- Feature creep
- R != D
- If your project requires you to develop new algorithms, it’s more research than development, and therefore it should be managed accordingly (you’ll have a highly unpredictable schedule)
- Technology-related
- Silver bullet syndrome:
- situations in which there’s too much reliance on some previously unused technology
- Switching tools in the middle of a product: almost always has negative effects due to learning curves
- Lack of an automated VCS
- Silver bullet syndrome:
What is an IDE?
A software application that supports software developers and has many useful features
Tools are the cornerstone of the software engr. discipline
Requirements Engineering
- The process of establishing the services that the customer requires from the software system
- Also details with the constraints under which the system operates
- Important because:
- Many errors are made in Req Specifications
- Many are not detected early. Key is to detect them in RE.
What is object-oriented programming?
- OO means to give precedence of data over function
- Data items rather than functionality become the center of development activities
- Allows for enforcing the very important concept of information hiding:
- Encapsulation and segregation of data behind well-defined and (ideally) stable interfaces
- Encapsulation and information hiding terms are often used interchangeably, although some people prefer to think of IH as being the principle and encapsulation being the technique to achieve it. The key idea is to hide data behind a wall and only give access through interfaces that you, the developer, define.
- Makes code more maintainable, because other code doesn’t have to be concerned about the “How” for an object, just that it works.
- Also allows for reuse of object definitions with incremental refinements, called inheritance.
- An object is a computing unit organized around a collection of state or instance variables that define the state of the object
What is software architecture?
The set of principal design decisions about the system
- Most decisions don’t affect the system (e.g. choosing a for loop instead of while loop). The principal decisions, however, do
- Sometimes, distinctions between these 2 types of decisions is clear. Other times, it’s fuzzy. Bottom line is that if you believe something is an important design decision, that becomes an architectural decision
- SWA is like a blueprint for a SW system. Encompasses every facet of the system:
- structure
- behavior
- interactions
- non-functional properties
Cohesion
measure of how strongly related the elements of a model are. We want modules to cooperate to provide a specific piece of functionality
Low coupling = high cohesion
REST
Representational State Transfer
- hybrid arch style for distributed hypermedia systems, that is derived from several other network-based architectural styles, and that is characterized by uniform connector interface
- Extremely well-known, very widely-used, because it is basically the architectural style that covers the world wide web
Software Design: how to analyze requirements with a client (AKA stakeholder)
- Have them write out the requirements (numbered list)
- Go through the req’s and underline the nouns, and write them as classes in a class diagram
- Then analyze the diagram you just created to see if you can eliminate/combine
- Then go back to the requirements list and look for things that may not have been obvious the first time
- Start adding attributes when it makes sense, and walk the client through what they mean
- Finally, work on operations (starting by underlining verbs in req’s)
- Verbs that clearly express an action
- Do all of this in UML
- At the end, when the diagram is done, encourage the client that they’re doing well, and ask them to think of anything they want to add or that needs to be changed. They should be able to do this now that the UML has been sketched out and they understand it.
- Debriefing: Ask what the client thought of it, whether they think it was useful, and if maybe they learned something about their own system (things they knew but never explicitly wrote down). This kind of analysis/exercise can help them figure out if there’s any kind of issues in their requirements.
Software design patterns
- It can be difficult to come up with an effective design for a system. Design patterns can help by providing general reusable solutions to common recurring design problems
- Similar to architectural designs, design patterns can help developers build better designed systems by refusing design systems that worked well in the past and building on those solutions