Midterm Flashcards
CLASS --- memberVaribles --- \+ \_\_\_\_\_\_ # \_\_\_\_\_\_ - \_\_\_\_\_\_
+ public
# protected
- private
Empty Triangle
Derived from
Empty Diamond
Aggregation - the diamond has the line as a part. The part may be shared with other wholes.
Solid Diamond
Composition - the diamond has the line as a part. Lifetime of part controlled by whole.
Simple line with line arrow
Navigation. Can reach arrow from line.
Open Close Principle
Open for extension, closed for modification. That is, we can extend behavior without modifying existing code.
Single Responsibility Principle
Every module should have responsibility over a single part, and that responsibility should be entirely encapsulated by the class.
Consider: who is likely to ask for changes in the code?
Interface Segregation Principle
Many client specific interfaces are better than one general purpose interface.
Interfaces should belong to clients, not to libraries or hierarchies.
Git: Working Directory
Where code resides, even after saving.
Git: Staging Area
Where you put code before committing. Can pool only some of the many files in your working directory, or all.
Git: Local Repository
Where committed code is stored - code that is tested and believed to be valid.
Git: Shared/Remote Repository
Where code is stored after pushing - code that should be integrated with team’s code for sharing.
Git: Master
Trunk from which all branches derive. Only merged into master in larger chunks (ie a release).
Git: Release
Ready or getting ready to ship to customers.
Git: Develop
Where teams check in tested, working code, but not enough changes or improvement to release.
Git: Features
Where features can be isolated and focused on, thus reducing opportunity for meddling up unrelated code.
Git: Hotfixes
Fix shit quick. Added to development and shipped products.
Git: Origin
Remote, shared repository.
Git: HEAD
Where a branch thinks the next code merge or checkin should occur.
Git: Origin/Master
Remote branch where the source code of HEAD always reflects a production-ready state.
Git: Origin/Develop
Remote branch where the source code of HEAD always reflects a state of latest delivered development changes for the next release.
Where automatic nightly builds are from.
Specification
Defining the system. What should it do? How should it behave? What high-level data does it use? What should it look like (reqs)?
Development
Define organization of system (architecture), implementing and building.
Validation
Does it meet the customer’s needs? Are they motivated to buy the product?
Verification
Does it meet the specifications? Are its fruits accurate?
Evolution
Change to meet customer’s needs.
Waterfall
Output of one stage is input of next stage. Plan-driven. Tends to generate a lot of documentation.
Main drawback: difficulty of accommodating changes. Time is money!
Agile
Focus on code over design. An iterative approach that delivers working software quickly, and allows rapid evolution.
individuals > processes
working software > documentation
customer collab > contract negotiation
change > plan
Agile Scrum Steps
1) Plan objectives and features of products.
2) Spring cycles.
3) Closure. Documentation and demos.
Agile: Product Planning
Done by product owner. Long-range activity.
Agile: Release Planning
Usually done by product owner, team, and other stakeholders. Done before any sprints.
Agile: Spring Planning
Team commits to highest ranked product/release backlog items. Facilitated by scrummaster.
Agile: Product Backlog
Ranked list of feature requests. Ideally broken down into user stories.
Agile: Release Backlog
Subset of product backlog features that will go into next release.
Agile: Sprint Backlog
List of user stories and their tasks to complete during a sprint.
Liskov Substitution Principle
Subtypes must be substitutable for their base types.
Dependency Inversion Principle
Abstractions should not depend on details.
Cars and Mustangs can depend on vehicles. Professors and students can depend on users.
3 Injected Dependency Methods
1) Constructor Injected. Constructor parameter takes object.
2) Setter Injected. Specific member function (setService) takes object.
3) Interface injected: simply implements some interface’s method.
Dependency Injection
One object supplies the dependencies of another object.
Dependency
Object that can be used (i.e. a service).
Injection
Passing of a dependency (service-providing object) to a dependent object (client).
Circular object references make dependency injection ______.
impossible
Planning Poker
An estimation and planning technique using cards to allow a team to reach a consensus.
Required: In-Depth Review
Circular Logic
Required: In-Depth Review
Dependency Injection
T/F: Abstract classes allow fully-coded default methods, whereas interfaces do not.
T
Abstract classes can be instantiated.
F - Unlike interfaces, they allow hardcoded methods, but like interfaces, they cannot be instantiated. They require subclasses to extend and instantiate.
Abstract classes allow subclass to share common methods and members.
T
Interface
A description of all the members/methods a subclass must have in order to exist as that interface idea.
Facade Design Pattern
Easy to use and understand “face” of a larger series of modules. Simplifies and hides the complexity of software body.
Decorator Pattern
Allows you to modify the behavior of a single OBJECT, rather than the whole CLASS. This leaves the other object instances unmodified.
Continuous Integration
The art of merging small units of code into the main branch frequently, as opposed to larger units of code infrequently.
What 2 main types of input should unit tests test for within a program?
Normal input, abnormal input.
What are Apache Ant and Gradle?
Software tools to automate the build process. Similar to Make tool in Unix, but implemented in Java and requires the Java platform.
What are Chocolatey and Homebrew?
Tools to manage the installation and update of software. Primarily executed via command line, though GUIs are available.
Name the points of the development triangle.
Cheap, fast, good.
What commands show the hidden GIT directory?
Go to repository. On unix type:
ls -a
cd .git
ls -lt
Git Directory - Description
Text entered in description when repository was created.
Git Directory - config
Main git config file; keeps options for project, such as remotes, push configs, tracking branches and more.
Git Directory - COMMIT_EDITMSG
Message in last commit.
Git Directory - HEAD
Holds reference to current branch. Tells git what to use as parent for next commit.
Git Directory - FETCH_HEAD
Short-lived reference to track what was just fetched from remote repository.
Git Directory - Index File
Staging area between working directory and repository. When you create a commit, what is committed is what is in the index file, NOT the working directory.
Prolly moved to index file after “git add.”
Binary file.
Git Directory - Objects Folder
Where the data of your git objects are stored - all contents of the files you have ever checked in, commits, trees, tag objects.
Git Directory - Hooks Folder
Contains shell scripts for invoking git commands.
Git Directory - Log Folder
Stores changes made in repository.