Soft Dev Flashcards
Purpose of SDL
-Represents the development of software as phases or sets of activities
- Is driven by the desire to define a predictable process to improve quality
- Involves creating processes that can be effectively managed
Types of Software Development
-Waterfall
-Prototyping
-Rapid Application Development
-Agile
The selection is dependent on the project type and resources available
Describe the waterfall approach
It breaks the SDLC into distinct sequential phases. Each phase needs to be signed off before moving on. Projects are well-documented, but errors propagate through if not spotted, which is very expensive
Why are iterative or incremental designe processes often used
-It allows you to build on an existing platform, that you have confidence in
-It reduces the amount of time and resources required to develop a new product
-It reduces the risk of failure, or issues that could delay release
Why might incremntal changes not be enough
-The potential capacity of the design has been reached
-The new spec is beyond the capabilities of the previous design
-The previous design is not compatible with the new assembly it needs to integrate with
-The requirements priorities have changed and the previous design is not efficiently suited
On a V diagram what phases match with each other
Requirement analysis - System in use report
Requirement specification - System test
Functional design specification - Integration test
Detailed design - Unit test
Implementation
Explain Rapid application Development
-Heavy focus on tool use to reduce development time and costs (IDEs, GUI builders, database management systems)
-Planning and software implementation are interleaved
-Business need paramount
-Often development deadline prioritised over requirements
What is agile development
Development based on short iterative sprints. Examples include scrum and pair programming
Explain scrum
-Based on short fixed-length sprints
-Typically 2-4 weeks long
-Aim to produce deployable software in each sprint
-Sprint planning meeting
-Daily scrum meeting
-Sprint review meeting
Explain pair programming
-Two people working on a single task - one programs and the other is responsible for direction
-Roles are reversed periodically
-Better productivity than working independently
-Promotes dissemination of project knowledge among the team
-Good for transferring skill to junior developers
Advantages of agile development
-User engagement
-Rapid development of usable product
-Early testing catches bugs and results in high quality product
-Small incremental changes mitigate the potential risk of introducing a large change to a system
Examples of design documents
-Software architecture
-Data flow diagram
-State transition diagram
-Flowchart
-Commented code
What are the two types of nested classes
-Static nested (doesnt have access to instance members)
-Inner (has access to intance members)
What modifers can a nested class be declared with
-Public
-Private
-Protected
-Package private
How are the nested classes accessed
-static nested: using the enclosing name
-inner: using an instance of the enclosing name
-all nested classes can be accessed externally through either the containing class or object
What are local classes
Classes that are defined and exist in a block/method. They cannot contain public, protected, private or static access modifiers. They cannot access local variables unless they are declared as final. They can access all the members of the outer class instance like inner class members.
What are anonymous classes
They are declared without any name at all. They can be defined in a method or in an argument to a method
What are enums
They are used for creating variables with specifc ranges. They can be declared as a separate class, or as a class member, but not internally in a method
What are threads
-Treated as a lightweight process
-Every process has at least one thread
-Threading allows for shared memory space
How does the OS handle threads on a single and multicore processor
-Single - virtually in parallel
-Multi - actually ran in parallel
What is liveness
The issue of the code not performing correctly in time
How are threads created in Java
-Extending thread class
-Implementing runnable interface
What is a race condition
Two threads trying to access/change data at the same time
How do you use synchronise
Synchronise can be used on a method or a few statements
What is an atomic action
It happens or it doesnt
What is the volatile keyword
It is used on variables to make read and writes atomic for them
What is Deadlock
When two threads need a resource from each other but neither can continue until they have it
What is Starvation
When a thread cant gain regular access to shared resources because another thread is frequently calling the object’s method
What is Livelock
Like deadlock, except the two threads are too busy repsonding to one another to do work
What is wait()
Waits for a condition to occur, must call from synchronised method/block
What is notify()
Notifies a waiting thread a condition has occurred, must call from synchronied method/block, allows for thread communication
What is sleep()
Similar to wait(), does not need to occur in synchronised block, retains lock when called and sacrifices the remainder of its time slice, can only be woken by interruption
What is yield()
Changes running thread to runnable, allows other threads to execute, if no threads of same prority need to execute, execution continues, identifies current thread as not doing anything important
What is join()
Allows one thread to wait for the completion of another, responds to an interrupt
What is explicit locking
Locks can be created, moved and destroyed through the Lock object. They can be managed using the Lock interface.
Can multiple objects share a lock
Yes
Can an object have more than one lock
Yes
What is version control
Records changes over time, and specific versions can be recalled later
What are the 4 version control systems
-Git
-Mercurial
-Concurrent Versions System
-Subversion
What are the 4 web-based repositories
-Github
-Bitbucket
-Google code
-Subversion
Properties of version control
-Gives a project-wide undo button
-Allows multiple devs to work on the same code base in a controlled manner, with code not being lost through overwrites
-Keeps a record of changes and who did it, with reasoning
-Can support multiple releases at the same time - development doesnt need to freeze before release
-Can look at old versions, which is useful if customers have an issue with an old version
-Has a repository to store all project files/documents/directories
-Repository acts a server, usually based on a safe, secure and reliable machine
What are the similarities and differences between centralised and distributed repositories
Similarities: There may be multiple workstations
Differences: Centralised only has one repository and others can see changes made as soon as they are committed, distributed repositories have devs pushing changes and pulling requests
What is the trunk
The main code base that developers are working on
What is a potential problem that may arise with the trunk
At the time of a new release some team devs may be fixing bugs and evaluating quality. The devs will need stability, but freezing development will waste resources
What is branching
It is like having two separate repositories. Each branch has its own history and tracks its changes independently. Changes can be merged back into the main trunk
What is forking
Historically means a schism in the dev tem or a new dev team working on a new code derived from the old
What is the concept of operations
-Provides a statement of goals and objectives of the system
-Includes strategies, policies and constraints affecting the system - therefore contextualises the system
-Clear system of responsibilities and authorites to the various participants invlove in the system
-Specifies the process for initiating, developing, maintaining and retiring the system
What is requirement analysis
-Requirements gathering
-Clear and complete requirements
-Formal documentation of requirements
What is high level design
Will describe the platforms, systems, products, services that the developed system will depend on, will typically include an architecture diagram showing the interface, components and networks to be developed
What is detailed design
Specifies how the system will be constructed such as functions, objects, and method details
What is unit testing
-Testing individual blocks of code in terms of correctness
-In procedural programming this will at function level
-In OOP this is at the object/class/method level
-The most widely used testing type
What is integration testing
Integrating all individual components to form the final system - unexpected behaviour may arise
What is system testing
Testing the system as a whole, ensuring it doesnt impair performance on the wider environment such as the OS or other applications.