Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key


Play button


Play button




Click to flip

142 Cards in this Set

  • Front
  • Back
Lecture 1: What are the 3 core principles of Software Engineering
Specification: requirements, design, code, text plans, development cycles.

Translation: translating specification, abstraction, structure

Iteration: develop in incremental repetions
Lecture 2: What are the two main categories that Fred Brooks divides up software Engineering.
Essence - Difficulties inherent, or intrinsic in the nature of software development

Accidents - Difficulties related to the production of software
What are the 4 types that make up the essence of software engineering
Complexity, Conformity, Changeability, and Invisibility
Define and give examples of complexity.
No two parts are alike, huge # of states. An order of magnitude more than hardware. can't abstract away complexity. Unanticipated states
Define Conformity
Designing software to support existing software. Dealing with arbitrary change
Define Changeability
Software is asked to constantly change after it has been created.
Difficult to design graphical displays of software. UML contains 13 different types of diagram types
Examples of things that have attacked the accidents
High Level languages, Time Sharing, IDE, OO Analysis and Design
Does Brooks believe that nothing can attack the essence of programming?
No, he believed that no SINGLE technique could produce an order of magnitude of improvement by itself.
Examples of things that attack the essence of programming
Buy vs build, Rapid Prototyping, Incremental development, Great designers.
Lecture 2: Essence or Accident?
A bug in a financial system is discovered that came from a conflict in state/federal regulations on one type of transactions.
Lecture 2: Essence or Accident?
A program developed in two weeks using a whiz bang new application frame work is unable to handle multiple threads since the framework is not thread safe?
Lecture 2: A new version of compiler generates code that crashes on 32-bit architectures; the previous version did not
Essence - complexity - unforeseeable states.
Lecture 2: A fickle customer submits 10 change request per week after receiving the first usable version of software
Essence - conformity - arbitrary/unforeseeable changes
Lecture 2: What is software engineering?
Solving problems with software-based systems.
Lecture 2: What is an error?
Something made by a human
Lecture 2: What is a fault?
Is the manifestation of the error in a software artifact
Lecture 2: What is a failure?
Is something that is a departure from a system's expected behaviour.
Lecture 3: What are the biggest constraints on a project?
Time and money
Lecture 3: In software what takes longer: design or production
Design is "long" and difficult, production is instantaneous (It's trivial to create a new copy of the final system) and use can be "forever"
Lecture 3: Difference between validation and verification?
Validation is meeting the correct requirement. Verification is that the implementation of the requirements is correct.
Lecture 3: Name an anti life cycle
Code and Fix
Lecture 3: Name 5 Life cycle models
Waterfall, rapid prototyping, incremental, spiral model, and rational unified process
Lecture 3: What does code and fix not have?
versioning, configuration management, testing, etc.
Lecture 3: Advantages of the Waterfall model?
Measurable progress.

Experience applying steps in past projects can be used in estimating duration of steps in future projects.

Produces software artifacts that can be re-used in other projects.
Lecture 3: Disadvantages of the waterfall model?
Disallowed iteration.


Estimation is difficult,

Requirements CHANGE over time.

Maintenance not handled well.
Lecture 3: What problems does agile life cycles address?
Too many artifacts, too many documentation, inflexible plans, late, over budget, and buggy software
Lecture 3: How is progressed measured in the agile software model?
Progress is measured in delivery of working and deployed code.
Lecture 4: If you design a concurrent app then you can see x speed up with every new processor.
linear speed up....need to double check this.
Lecture 4: Is Ajax concurrent?
Lecture 4: If a machine only has 1 processor, can true parallelism occur?
No, for true parallelism, more than one core is required!
Lecture 4: Can you have a concurrent program on a single core system?
Yes, but it won't have true parallelism. See Lecture 4, slide 10
Lecture 4: Does concurrent programming mean having multiple threads share (data/code)
Lecture 4: Two reasons for using concurrency?
Makes applications more responsive and makes applications faster
Lecture 4: What is starvation?
All threads are active in the system but none of them are making progress.

Thread A is waiting for an input that takes a long time to arrive. It's not blocked but it's not making progress.

Generic solution:
Timeouts: have Thread A do soemthing else once a time out occurs
Lecture 4: What is Deadlock?
Thread A is waiting for B to give up resouce C.

Thread B is waiting or A to give up resource D.

Both are blocked and will never be unblocked?

Generic solution:

Have threads acquire resources in the same order.
Lecture 4: What is a race condition?
If two threads access the same resource, we may have a race condition.

In particular, if two threads have access to the same variable, they may attempt to change its value at the same time.

This can result in an inconsistent state.

You can also get into problems even when one thread is doing the writing and a second is doing the reading.
Lecture 4: What is the memory barrier?
Getting the most update variable state from memory and not just in the thread's cache.

Transferring values from main memory into working memory and back again.

Each thread has its own flow of execution and this means that is has its own program stack and its own set of values for the machines registers.

Each thread also shares access to the program's heap and static data.
Lecture 4: What does the volatile key word do?
The volatile key word tells the compiler not to perform any optimization that may affect the ordering of access to that variable. Each access to this variable should bypass cache and go all the way to the memory.
Lecture 4: Problems with using the volatile key word.
It slows down performance and doesn't help with atomicity when multiple fields are accessed, because the access to each variable is independent and could leave a wide opportunity for threads to see partial changes to some fields but not others.
Lecture 4: What does tagging methods that access the variable with the key word synchronized do?
It makes the calling threads cross the memory barrier both when they enter and when they exit the synchronized blocks.

I think it is better to think of it as mutually excluding other threads from accessing any other SYNCHRONIZED METHODS in the class. It doesn't prevent other threads from accessing other class methods NOT marked synchronized.
Java Thread Supplement: What is the method that needs to be implement in the Thread class
Java Thread Supplement: Does the run() return a value?
No, only the call() does.
Java Thread Supplement: What are the substates of an alive thread?
Lecture 5: Other names for software testing?
Quality control or quality assurance
Lecture 5: What does validation mean?
We are building the right project
Lecture 5: What does verification mean?
Does x meet its specification
Lecture 5: What are the 3 types of testing?
Black box, gray box, and white box testing.
Lecture 5: What is an error?
A mistake made by a person often caused by a misunderstanding of the requirement.
Lecture 5: What is a fault?
A manifestation of the error. We call this a bug.
Lecture 5: What is a failure?
This is an incorrect behavior that is caused by executing a fault.
Lecture 5: what does testing try to do?
It attempts to surface failures.

Deugging attempts to associate failures with faults so they can be removed from the system.
Lecture 5: Is completely testing a system possible?
No it is impossible.

We test for different behavior or outputs for each functional partition.
Lecture 5: What are the different types of test we can perform?
Unit tests, Integration tests, System tests, Acceptance tests.
Lecture 5: What do unit tests test for?
They test lower level aspects of a system.
Lecture 5: What do integration test check for?
test that modules work together
Lecture 5: What do system tests test for?
Test performed by the developer to ensure that all major functionality has been implemented. have all user stories been completed correctly.
Lecture 5: Acceptance testing test for?
Test performed by the user to check that the delivered system meets their needs.
Lecture 5: What is a black box testing?
A black box test passes input to system, records the actual output and compares it to the expected output. If you do not have a spec, then any behavior is correct.
Lecture 5: What is gray box testing?
Use knowledge of system's architecture to create a more complete set of black box tests. Verifying auditing and logging information. data destined for other systems. Looking for scraps. Is the system correctly cleaning up after itself.
Lecture 5: What is white box testing?
Complete knowledge of the code. We are looking at code coverage, proper error handling, working is documented. proper handling resources.
Lecture 5: What is statement coverage?
write tests until all statements have been executed. Each elementary state of P is executed at least once.
Lecture 5: What is branch coverage?
Write tests until each edge in a program's control flow graph has been executed at least once
Lecture 5: What is condition coverage?
Like branch coverage but with more attention paid to the conditionals (if compound conditional, ensure that ll combinations have been covered). Branch coverage can be short circuited and this deals with that scenario.
Lecture 5: What is path coverage?
Path coverage, covers all the path from the initial to the final node are covered at least once. This includes every iteration in a LOOP!
Lecture 6: What does the synchronized keyword on a METHOD ensure?
It ensures that only one thread can execute this synchronized method at a time and only THIS synchronized method can be executed at time. All other synchronized methods will not be executed by other threads.
Lecture 6: What does the synchronized key word on a block of code do?
It can be applied to an object and then allow a section of code to be run while blocking other threads from accessing the OBJECT's other synchronized methods or synchronized code blocks at the time.
Lecture 6: How can using the synchronized method keyword fail?
Thread A calls a synchronized method that reads a variable foo and Thread B calls a synchronized method that writes to variable foo. Thread B can change the value of variable foo after Thread A reads it but hasn't had a chance to update it.
Lecture 6: How can the synchronized code block fail?
It won't work if you try to synchronize on a local variable. It will only work on instance variables.
Problems the Agile Method addresses?
Too many documents created/maintained.

A focus on the need for consistency across all documentation

Inflexible plans

Process of being valued over people

Seeing the customer as an external to the software team development
Give an example of Agile Programming?
Extreme Programming soon to be featured in a mountain dew commercial.
What are some XP practices?
Customer Team Members.

User Stories - Requirements are captured in brief statements about the functionality discussed with the client.

Test Driven

Collective ownership.

Continuous integration
Acceptance Tests - user story is completed when the test cases passes

Short cycles
What is the highest priority in Agile Programming?
It meets the customer's needs and there are early and frequent delivery of working software.
What is the Master Story List?
It documents all requested features.
What is a user story?
A short description of the functionality requested by the user.
What is the team velocity?
A metric based on the amount of work performed on previous iterations.
What is reducing scope?
You have too much to do on an iteration so you do less.
When are you done?
A user story is done when the functionality it describes has been shipped.
What are the team Roles?
Analyst, Developer, Tester, UI designer / usability engineer, tool builder, database admin, language expert.
Lecture 6: Characteristics of an Agile team?
Self organizing

Accountable and Empowered

Lecture 6: Who is the agile customer?
Serves as the source of truth. set requirements, priorities.
Lecture 6: Who is the agile analyst
Is the team role that is oriented more towards the customer. Will help write user stories, elicit feedback from the customer.
Lecture 6: Who is the agile programmer?
Converts user stories into code.
Lecture 6: What does an agile tester do?
Ensuring quality control.
Lecture 6: Who is the Agile Project Manager?
Tracks how the team is doing. Works to remove obstacles for the team. Identify when the current plan isn't working and gets people back on track.
Lecture 6: Who is the Agile UX Designer
Visual aspect of the team.
Lecture 7: What is the difficulty for breaking up the division of labor in a sequential program?
Finding truly independent tasks.
Lecture 7: What are some problems you can find when trying to break up a sequential program?
Task B can't happen until Task A has finished.

Redundant work. Sometimes Tasks A and Task B must perform the same calculation because it would be inefficient or too complex to ensure that all shared calculations are performed only once and then shared with all tasks.

Third is shared data. Shared mutability.

Finding substantial tasks. The amount of computation in each task (its granularity) must be large enough to offset the overhead needed to manage tasks and threads

Goal: more tasks than threads
Lecture 7: What is performance tuning?
Identifying sources of contention on locks (synchronization)

Identifying work imbalance between threads

reducing overhead: create threads, create tasks, assign tasks to threads, gathers results from completed tasks
Lecture 7: What is the lower bound number of threads in i/o programs?
The number of cores
Lecture 7: What is the upper bound number of threads in computation programs
The number of cores.
Lecture 7: How much slower is reading from memory than reading from cache?
Two orders of magnitude or...100x
Lecture 7: What is a key feature of a task we need to determine?
If it takes constant or variable amount of time. I/O - constants .... deep computation could be variable such as prime number finder. the larger the number the longer it takes to figure out if it is prime or not.
Lecture 7: What is the overhead in concurrent programming that could make it slower than single threaded programming?
Time creating threads, creating tasks, allocating tasks to threads, and reallocating tasks to idle threads.
Lecture 7: How to determine how many tasks to create?
Create a shit load more than the number of threads!
Lecture 7: What does the final key word do in java and how to does it help optimization?
Compiler can make optimization knowing that certain values are read-only and final variables can be referenced by anonymous classes that are created within their scope.
Lecture 7: Does Future<T> foo.get() block?
Lecture 8: What are the 3 types of designs in concurrent systems
Shared Mutability, Isolated Mutability, Pure Immutability
Lecture 8: What is Isolated mutability?
For each mutable variable, you design a program such that only one thread has access to it.
Lecture 8: What is pure immutability?
A variable can be assigned at most one value and that value never changes.
Lecture 9: According to Fred Brooks says what is the hardest part of software engineering?
"The hardest single part of building a software system is deciding precisely what to build."
Lecture 9: What does cucumber let you do?
It enables a style development that builds on the principle of test driven development.

It makes acceptance test.
Lecture 9: Behavior driven development does what?
It formalizing best practices.

In particular the perspective of working from the outside-in

We start our work with failing customer acceptance tests

We write tests such that they serve as examples that anyone can read.

Both to understand a requirement and to understand how to generate more requirements.

We aim to develop a shared, ubiquitous language for talking about the system.
Lecture 9: How does cucumber unite customers and builders
It helps make sure that everyone talks about the requirements and implementation in the same way.
Lecture 9: What is the basic outline of the basic acceptance test?
Feature: Sign up

Scenario: Successful sign up

New users should get a confirmation e-mail and be greeted personally

Given: I have chosen to sign up

When: I sign up with valid details

Then: I should receive a confirmation email

And: I should see a personalized greeting message
Lecture 9: What do acceptance tests refer to?
Lecture 9: features are explained by what?
Lecture 9: Scenarios consist of what?
Lecture 9: In Cucumber, the spec is written in a plain file text. So what makes it so special?
It is executable!
Lecture 9: Cucumber is a what?
A command line tool that is used for Behavior Driven Development.
Lecture 9: What does each scenario have?
It has a pre-condition, actions, and post-conditions of each scenario; if each step executes without error, the scenario is marked as having passed
Lecture 9: In what language are the keywords features, scenarios, and steps used
Lecture 9: Which is better: Customers should be prevented from entering invalid credit card details.

If a customer enters a credit card number that isn't exactly 16 digits long, when they try to submit the form, it should be re-displayed with an error message advising them of the correct number of digits.
The latter is much better because it is more testable. We want to remove ambiguity.
Lecture 9: What are the key words in Gherkin
Feature, background, scenario, given, when, then, and, but
Lecture 9: What does feature keyword used for?
Is used to group a set of tests (scenarios)
Lecture 9: What does all the text between the initial line and a line that starts with Scenario, Background, or Scenario Outline is considered what?
It is considered part of a feature's description.
Lecture 9: What is the naming convention for Gherkin feature files
name .feature by taking the name of the feature to lowercase and replacing spaces with underlines.
Lecture 9: Gherkin provides what 3 keywords to describe contexts, actions, and outcomes?
Given: establish context

when: perform action

Then: check outcome


Scenario: Withdraw money from account

Given: I have $100 in my account

When: I request $20

Then: $20 should be dispensed.
Lecture 9: You can add additional steps to context, action, and outcome sections using the keywords?
and and but
Lecture 9: Regular expression starts with what
/ /
Lecture 9: What does this regular expression mean, "([^"]*)" in the following line.

/^the input "([^"]*)"$/ do |arg1|
match a " mark, then match zero or more characters that are not quotation marks, then match another quotation mark; the parentheses mean "remember what you matched!
Lecture 9: what does do |arg1| mean?
is the beginning of the ruby block; arg1 equals what we matched in the expression; for our specific example.
Lecture 9: what does pending mean in cucumber?
It is cucumber specific statement that tells cucumber that the step is currently undefined.
Lecture 10: List the challenges getting a project started?
What is the purpose of the system?

What is it core functionality?

What functionality is out-of-scope?

What does success look like?
Lecture 10: What kills must projects?
"The assumption of consensus where non exists is what kills most projects."
Lecture 10: How do you achieve consensus?
Need to communicate the goals, purpose, and context of the proposed project to the team
Lecture 10: What are some the important questions to ask before you commit to a new project?
Can you assemble a team wit the necessary skills?

How much money is available to fun the project?

Who's the customer?

Who's our competition.
Lecture 10: What is the inception desk?
It is a collection of questions to ask of yourself and your stakeholders when booting up a project?
Lecture 10: Who are the stakeholders?
Anyone who can materially contribute to the execution of the project. Customers, developers, testers, managers, CFOs, CIOs, and etc
Lecture 10: What are the whys of an inception desk?
Ask why we are here?

what's the purpose of the project?

Create an elevator pitch

Design a product box

create a NOT list

Meet their neighbors (project community)
Lecture 10: what are the hows of the inception desk?
show the solution UML-based

Ask what the biggest risks?

Size it up (how long will it last)

Be clear on what's going to give when time and/or money has run out?

Show what it's going to take to be successful?
Lecture 11: Advantage of using AtomicInteger?
It allows for atomic operations to occur without using the synchronized keyword
Lecture 11: What is the difference between a Callable<T> and a Runnable?
Callable return something, while a Runnable doesn't
Lecture 11: What does a Callabe return?
A future object
Lecture 11: What future function get the results?
Lecture 11: What does blocked actually mean?
A thread waiting for a response so it can finish it's task
Lecture 11: How does a CountDownLatch avoid shared mutability?
It is a synchronized aid to help coordinate threads. CountDownlatch(n) - creates the latch with a specific count, await(), block the calling thread until the latch's count == 0,

countDown() -- decrement the count of the lactch. Have the threads first line call await()
Lecture 11: What is a datastructure used to pass information between threads?
queue - as long as their space in the queue, producers will not block

as long as their are items on the queue, consumers will not block.

contention will only occur when the queue is full (producers) or when it is empty (consumers)
Lecture 11: what is the difference between lock vs synchronized?
different types of locks are provided by various concrete implementations
Lecture 11: What are the Lock methods?
lock() -- acquires the lock
tryLock() -- acquires lock only if its free
tryLock() -- will time out if the lock is not available
unlock() -- release the lock
Lecture 11: What is a reentrant lock?
If thread A acquires Lock B, if thread C tries to acquire Lock B, it blocks

But if thread A tries to Acquire Lock B again, it does so and continues
Lecture 11: ReadWriteLock able to do?
allows a resource to be accessed by lots of readers and writers

writers will block until all readers are done

readers will block if there is a writer updating their resource

otherwise multiple readers can acquire a read lock at the same time