Software Engineering - Exam #1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Know how to implement URLS for standard Create, Read, Update, and Delete Operations using REST.

•GET -> Read •POST -> Create •PUT/PATCH -> Update •DELETE -> Destroy

Know where to find models, views, and controllers in the Rails directory structure.

•Models go in /app/models •Controllers go in /app/controllers •Views go in /app/views •Routes go in config/routes.rb

Know which file to find the routes in a Rails project

•Routes go in config/routes.rb

What is the difference between an HTTP route and a URL/URI?

A HTTP Route (ex. http://localhost:3000/movies/2) while a URL/URI (ex. ftp:://192.168.1.1) The route is the one that specifies a IP and a port for a certain REST action, while a URL/URL is the beginning string that specifies the communication scheme like HTTP, FTP, etc.

Why is a port number necessary?

A port number is necessary because it clarifies which program the client is trying to communicate with, as other programs could be running on that same IP address.

What is an IP address?

An address number (ex. 10.12.134.22) that is needed for a client program to communicate with programs running on internet

What are common examples of HTTP clients?

Browsers, apps, etc.

What does a client need in order to be able to contact a webserver?

Client Browser

What is legacy code?

Code that continues to meet customer needs, but is difficult to evolve due to design inelegance or antiquated technology.

What is beautiful code?

Code that meets customers' needs, and is easy to evolve.

What is a controller?

Controllers mediate the interaction in both directions: when a user interacts with a view (e.g. by clicking something on a Web page), a specific controller action corresponding to that user activity is invoked.

What is ActiveRecord and what power does it give Rails models

Design pattern that allows models to know how to CRUD (Create, Read, Update, Destroy) in the database withouth the dev knowing the SQL commands, AR uses convention over configuration to infer database table names from the names of model classes, and infer the names and types of the columns (attributes) associated with the given model, also provides the ability to query and filter entries form the database using only Ruby.

What does validation mean?

Did you build the RIGHT thing? Is this what the customer wants, is the specification correct?

What does verification mean?

Did you build the thing RIGHT? Did you meet the specification?

What is the approach that makes exhaustive testing feasible? Divide and ?

Divide and Conquer: We do high level testing followed by lower level tests that don't repeat the higher level tests.

What is the system that makes it possible to contact web servers via friendly names instead of IP addresses?

Domain Name System (DNS) protocol that allows you to map names (Domain Names) to IP addresses.

How often in Agile do you get feedback from the customer / boss ?

Every 1 to 2 weeks, each based on each iteration.

Which type of variables are accessible to views?

Instance variables, which are set by controller actions.

Does Extreme Programming (XP) advocate shorter or longer iterations?

It advocates for shorter iterations.

Does XP advocate working alone or working in pairs?

It advocates for working in pairs.

Does XP advocate writing tests before code or tests after code?

It advocates for writing the test just before writing the code to be tested.

What is the bad part of Spiral?

It never ends technically, expensive, complex and uses up a lot of time, since we don't have a concrete goal in mind we just keep going.

Who created the concept of Extreme Programming?

Kent Beck, as a version of Agile.

Why is it important to learn to deal with legacy code?

Legacy code can be beautiful code, agile techniques are useful for managing legacy code, natural extension to managing legacy code: it's just change over longer time scales.

What is a model?

Models are concerned with the data manipulated by the application: how to store it, how to operate on it, and how to change it.

REST thinks about things in terms of [blank] and operations on those [blank].

Operations, resources.

What is quality assurance?

Processes/standards that result in high quality products & improve the manufacturing process, while improving quality over time.

What does REST stand for?

Representational State Transfer

The [blank] subsystem is responsible for mapping incoming HTTP requests to [blank] [blank] and extracting any required or optional parameters

Routing, Rails, Controllers

Who was REST invented by?

Roy Fielding

What are cookies and why are they useful?

Small piece of data sent from a website and stored on the user's computer by the user's web browser while the user is browsing, they were designed to be a reliable mechanism for websites to remember stateful information or record browsing activity.

What is quality software?

Software that meets the customer's needs and is easy to evolve. (Fitness for use, easy to use, does not crash, easy for devs to debug and enchance)

What was a model that tried to fix it by using prototypes? (Spiral)

Spiral Model (LIfecycle) •Use prototypes to get customer feedback until "final" version built -Each "iteration" delivers a new prototype -Iterations may be far apart in time •Rational Unified Process -Overlaps planning & execution stages of multiple iterations

Make sure you have read the Agile Manifesto.

Summarized... Individuals and interactions over processes and tools. Working Software over comprehensive documentation. Customer Collaboration over contract negotiation. Responding to change over following a plan.

What are the different types of tests: unit, ....

System/Acceptance Test: Integrated program meets its specifications. Integration Test: Interfaces between units have consistent assumptions, communicate correctly. Module/Functional Test: Across individual units. Unit Test: Single method does what was expected.

What does Agile emphasize to reduce mistakes?

Test Driven Development (TDD) to reduce mistakes

What do we do to assure software quality?

Testing!

The concept behind the Plan-and-Document models.

The concept behind these models is one that tries to prevent as many issues as they can before they start coding the software, but they will arise, and since Plan and Document is rigid changes are hard to make, and these changes might solve the issues that arise.

Where does Rails keep the description of the structure of your database?

The description of the databse is stored in /config/ folder and the file is named "database.yml"

Know about MVC architecture and what it aims to do.

The goal of MVC (Model View Controller) is to separate organization of resources (models) from UI & presentation (view) by introducing a controller.

If you generate a scaffold for a resource Movie, what is the name of the model and which file is it located at?

The name of the controller will be "movie.rb" and it would be located in /app/models/

If you generate a scaffold for a resource Movie, what is the name of the controller and which file is it located at?

The name of the controller will be "movie_controller.rb" and it would be located in /app/controllers/

If you generate a scaffold for a resource Movie, what is the name of the database table created?

The name of the database table is "schema.rb"

What is test coverage?

The percentage of lines of code that were run by the test suite, we ideally want 100%, but because we have 100% does not mean we don't have bugs, and just because you don't have 100% does not mean you have bugs.

What does regression testing mean?

The process of automatically rerunning old tests so new changes don't break what used to work.

What is Continuous Integration testing?

The process of regression testing every time new code is checked in. (Basically continuous regression testing)

How software engineering originated.

The term was coined by Margaret Hamilton who led the NASA software team that landed astronauts on the moon. She wanted to legitimize software engineering so that the people building it would be given their due respect and be distinguished from hardware and other kinds of engineering.

Why don't Plan-and-Document models work well?

They take too much time, money, changes are hard to make, etc.

What does a scaffold do?

This generates the files needed for the basic structure of a Rails project, which include a controller, mode, views, routes, etc. (These are then migrate to prepare the database)

What does Agile emphasize to validate customer requirements?

User Stories to validate customer requirements

What does Agile emphasize to measure progress?

Velocity to measure progress

What is a view?

Views are presented to the user and contain information about the models with which users can interact (user interface)

What does Plan-and-Document mean?

Why can't building software be like building a bridge? Safe, predictable cost & quality To build software via set predictable planned and document methods, set up via talking with a customer, setting up plan, etc. •Before coding, project manager makes plan •Write detailed documentation all phases of plan •Progress measured against the plan •Changes to project must be reflected in documentation and possibly to plan

Is Agile an accepted practice?

Yes, back in 2001 it was seen as controversial but in recent years it has gone mainstream.

Does Agile emphasize refining a working but incomplete prototype?

Yes, developers continue to refine these prototypes until customers are happy.


Kaugnay na mga set ng pag-aaral

Lesson 9 Sentences 2 颜色 衣服 上衣 裤子 鞋子

View Set

health challenges glucose chapter questions

View Set