Modern Software Development Techniques | Lecture Notes
@lecture notes @software development
Lecture 1
Three W's
1) Ways of Modeling - Informal problem description, abstract, high-level - Formal: well-defined programming language, basic concrete instructions - Software Engineering is the intersection between these points: a model.
Topics: - Requirement Analysis - Waterfall model - Prototyping - Agile - Object Orientation - Software Patterns
2) Way of working - How to cooperate, community, document, distribute responsibilities, work ethics, copyright issues etc.
3) Way of controlling / supporting - Modelling tools - Software quality check - Documentation tools - Blame allocation - Bug tracking - Unit tests - Acceptance / System testing
Lecture 2
Focus of today: ways of modeling
Well engineered software has/is:
- Required functionality
- Maintainable
- Reliable
- Efficient
- User-friendly
- Cost-effective
How do you determine formal requirements, such as maintainability?
Cf. the 'financial total loss' of a car: it is cheaper to buy a new one rather than repairing it. Same for code: if rewriting the whole program is cheaper than fixing it,
Resources are limited, so software engineering is a "Balancing Act" between:
- Goals (due to money/time)
- Trade-offs between goals
Take into account law of diminishing return. Or 80/20 rule.
Project activities
- Project management
- Requirement Engineering
- Design
- Coding
- Testing
- Software Quality Assurance
- Software Configuration Management
- Software Integration
- etc.
N.B. coding only takes up 13-14% of the time.
"3 expert rule" of cost estimation : ask three experts about the expected time/cost and add them up for a realistic expectation
Generic project flow
Waterfall model (sequential):
1) Requirements 2) Design 3) Coding 4) Test
No cycles allowed, you want to go down the stream. A mild version allows one-step cycles.
Lecture 3
Answer example exam question: Describe law of diminishing return and why it complicates balancing conflicting software requirements.
There are more aspects to the software that you want to optimize (e.g. UI, speed, reliability) to which the law of diminishing returns apply, which makes distributing time and money over them complicated. This distribution would be easier in case of a linear relation between time/money and result.
To what extent is LOC an indication of the complexity of software? According to Franc: a pretty good one.
Dividing and structuring work
Real software development used both strategies combined.
Top down methods limit complexity. Bottom up methods create reusable bits but require clear APIs to be used as such.
Top down
Refine general abstract tasks into fine smaller tasks. Based on decomposition.
Weakness: - Process is very sequential: the foundations need to be laid before the walls can be built. Obstructs parallellism.
Bottom up
Identify reusable bits of software that can be the 'building blocks' of the software. Composition strategy. Rely heavily on useful tool utilities (functions/methods). Object Orientation is a good example.
Advantage: - Software components can often be reused in different projects.
Decomposition requirements
A good decomposition ensures that: 1) subtasks are now easier to solve 2) That relations between components are minimal.
If two components require each other heavily, the decomposition is likely poorly chosen. Components should function relatively independent.
Object Orientation is an answer to this issue.
In a software description, verbs are potential methods/functions, nouns are potential objects. Reuse of classes (bottom-up style) is done through inheritance. APIs (interfaces) shield implementations. (What does this phrase mean?)
Requirement analysis
- What to build?
- Needs and conditions of all stakeholders (including potential users)
- Financial implications (e.g. contracts, legal issues)
If requirements are not clear initially in a contract, you may end up putting way more hours in because the client keeps adjusting their needs. Requirements must be understandable by everyone involved, and offer clarity in case of legal conflicts.
Documentation includes: - Natural language documents - Use cases - User stories - Process specifications - Simple diagrams - Screen dumps (mockups)
Require insights into: - Needed resources (FTEs) - Duration of project - Costs - Go/No go
More modern: - Prototyping includes client in the loop.
Who pays for the requirements analysis?
Various forms of requirements
See slides for details
- Contract style requirement list
- Prototypes
- List measurable goals instead of needs
... I stopped typing.
Lecture 5 (4 skipped)
1) Rank
App for selection procedure for AI, for reading motivation letters. Group of 6 people read them: how to prevent bias in the procedure? Binary ranking tool: present motivation letters pairwise to a judge, and ask which one of the two is better. The app thus keeps proposing pairs in such a way that the end result is non-biased but accurate. The result must be a stable ranking. Involves some academic research.
2) CLIDE
Collect code in file and mark errors. Potentially: make it as an Eclipse plugin, so all Eclipse functionality can be used. It also possible to build it from scratch.
3) Cognac app
Continuation project of last year.
4) Basiscript
Freetext database of scans. Build server app.
5) Apegotchi (iOS and Android)
Stichting AAP: make app where you can nurture a monkey. Collecting inc cartridges / recycling feeds the monkey. Stichting AAP is supervisor.
6) Exotic (iOS and Android)
Also from AAP. App for custom officers to identify rare animals. Determination app, with binary questions for non-experts (customs officers).
7) BCI games
Jason Farquhar. Implement additional games, in particular space invaders. Goal is extending. For BCI stuff, libraries can be used.
8) EEG Signal Viewer
Visualize EEG signals for demo purposes on a phone or tablet. Do not underestimate these projects, can be very complex.
9) WebJava
Frank is afraid no one will choose this project. Software to program Java in a web browser. This is possible, cf. coding bat. Libraries (esp. JavaScript) available for this type of stuff. You don't have to make a Java compiler. Pretty printing, code completion, error detection etc. Intention is to use it in a first year exam.
10) Escape room puzzle
Did Frank say this is ez? To be used on website, recruitment, interviews. Company in Den Bosch.
11) SOS app
Save Our Souls. For multiple-device platform. App for writing down personal info: blood type, allergies, etc. Privacy issues involved. Small company gave assignment intended for market.
12) Trivia App
From one-person company.
General info:
Focus is on native apps (but there are platforms to develop device-independent apps). So choose between Android and iOS.
Preferences so far:
- Rank: nice that it involves some research, and is useful.
Licences and IP
Software, freeware, vaporware (first promote software, only build when interest is enough. Software that doesn't exist yet), postcardware.
Authorship: owning software Licensing: allowing others to use it
- GNU Public Licence (FSF)
You can use GPL software in your products freely. However, the same right propagate to the users of your software. You have to open source your modification/extension if asked for. E.g. Linksys routers used Linux. The company sold these routers, but were afterwards forced to open up their software. Will be exam question.
- BSD licence
BSD software can be used, with mention of the original authors, and without any guarantee that it won't break i.e. no liability for problems caused by using BSD-licensed software.
We will use the BSD license.
Who owns what?
Intro to scrum
Rugby metaphor: JUST HUG AND SCORE.
Jeff Sutherland, Ken Schaber, Mike nogwat.
Every serious software company uses scrum nowadays.
Scrum is an agile process that focuses on highest business value in shortest time.
- Rapidly and repeatedly inspect actual working software (2 to 4 weeks, sprint).
- Product should be (potentially) releasable. Goal of sprint is never intermediate project.
Agile Manifesto
- Individuals and interactions over processes and tools
- Working software over comprehensive documentation
- Customer collaboration over contract negotiation
- Responding to change over following a plan (flexible between sprints, inflexible within sprint)
Project noise level: complexity of project is determined both by requirements, and the technology. It is preferred therefore to keep requirements small, with a clear perspective on the technology to solve it.
Evaluating items in sprint log: use card voting system to estimate time per user story simultaneously, without influencing each other. Determine if there are enough or too much tasks for the sprint goal.
Anchoring (Exam question): in evaluation when someone says "ooh that's easy, I can do that in 4 hours". Disturbs the estimation process by biasing others. Prevents realistic estimations.
Daily stand-up: discuss what they did yesterday, and are planning to do tomorrow, and what will block you. People that stand up are faster to get to the point, this meeting is intended to be short.
Consistent effort and duration leads to a better rhythm.
If there is a radical insight that makes you see the sprint goal is completely wrong, stop the sprint. Other than that, no changes in a sprint.
Lecture 6
Log in to gitlab on https://gitlab.socsci.ru.nl . Frank will create the repo, don't make it yourself.
Jira, for agile/scrum support.
Timeline: 14 weeks (including holidays), so on average 8 hours per week.
HubSpot: Git 101, Git and GitHub for Beginners.
Lecture 7
Design patterns applications:
1) Problem domain requiring a flexible solution
See various examples in slides.
No further notes: Paul Kamsteeg.
Lecture XXX (2)
Lecture X | Decorator Pattern & Template Pattern
Localized sequential control, create overall control flow by local control sequences between decorators.
Two implementations: the one is more complex but safer.
1) ? REVIEW: The abstract class links parents and daughter classes. They cannot directly call each other. 2) Concrete decorator classes directly call parent classes, which are protected - Minus: derived daughter classes can interfere, less safe - Minus: Introduces coupling: daughter must know name of parent. - Plus: Easy implementation,
Chaining of decorators is a layering, not a sequence.
Function sequence is not completely free: not all orders are possible, due to one decorator wrapping around the other. You can only reorder decorators.
Potential use:
Wrap decorator around objects whose behavior you don't trust.
Template
No common code parts, but common backbone (difference with strategy pattern).
Old fashioned OO.
So instead: "families" of variations.
E.g. you want to have query logic, but for various SQL-databases that have a whole different code there are thus families of variations (for databases /database-styles as a whole).
Strange pattern because it is entirely based on parent-daughter structure, based on inheritance instead of "plugins".
Template: Coupling between inheritance structures.
Strategy: independent variation of parts.