1 | Page
CSE 3901 Midterm 2 Questions and Correct
Answers
static site generation Ans: A program to produce HTML pages
First advantage of ssg Ans: Code reuse and single-point-of-control
over change
Second advantage of ssg Ans: Authoring of content in a language
that is more human-friendly
Third advantage of ssg Ans: Parameterized generation of markup
and content
Partial Ans: A document fragment included in other documents.
Filename begins with '_'
Scriplet Ans: <% code %>
Expression to display Ans: <%= expr %>
:locals Ans: Content of partial can be customized
with arguments in call. In call: pass a hash called
lorem Ans: placeholder method to generate random text
© 2025 All rights reserved
, 2 | Page
Helper functions Ans: Used to generate common HTML snippets
Testing Ans: A process whereby we increase our
confidence in an implementation by
observing its behavior
Idea Ans: 3 levels of abstraction in
functionality: want
Implementation Ans: 3 levels of abstraction in
functionality: have
Specification Ans: 3 levels of abstraction in
functionality: Defines desired mapping from input to output
Better Ans: Better or worse: Have someone else test your code
Working backwards Ans: Best way to create expected output
Spurious Ans: Test failure: passes when shouldn't
False positive Ans: Test failure: fails when it shouldn't
Unit Tests Ans: Individual components tested in isolation
© 2025 All rights reserved
CSE 3901 Midterm 2 Questions and Correct
Answers
static site generation Ans: A program to produce HTML pages
First advantage of ssg Ans: Code reuse and single-point-of-control
over change
Second advantage of ssg Ans: Authoring of content in a language
that is more human-friendly
Third advantage of ssg Ans: Parameterized generation of markup
and content
Partial Ans: A document fragment included in other documents.
Filename begins with '_'
Scriplet Ans: <% code %>
Expression to display Ans: <%= expr %>
:locals Ans: Content of partial can be customized
with arguments in call. In call: pass a hash called
lorem Ans: placeholder method to generate random text
© 2025 All rights reserved
, 2 | Page
Helper functions Ans: Used to generate common HTML snippets
Testing Ans: A process whereby we increase our
confidence in an implementation by
observing its behavior
Idea Ans: 3 levels of abstraction in
functionality: want
Implementation Ans: 3 levels of abstraction in
functionality: have
Specification Ans: 3 levels of abstraction in
functionality: Defines desired mapping from input to output
Better Ans: Better or worse: Have someone else test your code
Working backwards Ans: Best way to create expected output
Spurious Ans: Test failure: passes when shouldn't
False positive Ans: Test failure: fails when it shouldn't
Unit Tests Ans: Individual components tested in isolation
© 2025 All rights reserved