Be sure to look at the Blackboard Module for this week for various hand-in
Note: C18, C19, C21 updated on 9/29/2018.
HW #20 updated 10/6 for clarification.
This is a discussion group exercise. Discuss the following questions within
your group and come to the best concensus answers you can.
- Q1: Consider a situation in which you make three products: A, B, and C. All
three have different design teams. Each product has a new software release
every 6 months. All three products are 10 years old, so you have 20 releases
each for products A, B, and C, which must all be interoperable (20x20x20
combinations). Customers do not want to patch to update their products out of
fear of down time, and all products more than 3 years old are not patchable
because the hardware is under-resourced to the point it can't run new releases.
The product release cycle is 6 months primarily because it takes 5 months to
test all combinations of products A, B, and C in the lab. (Product testing
requires hardware testing of I/O, so it can't be done in the cloud.) How do you
speed up the test cycle?
- Q2: Keeping in mind the Toyota UA slides and other material you've seen, if
you had to use numeric metrics to evaluate code quality, what FIVE metrics
would be the ones you look at? These can be technical metrics, process metrics,
etc. You are NOT limited to metrics discussed in class. You can look up
candidate metrics on the web, you can make up your own metric, you can make up
your own combination of metrics, etc. There is no "right" answer; we
want you to think about pro/con process of selecting a metric that is useful
for a particular situation. (List only FIVE. Discussion for reducing the list
to only five is a primary point of this exercise.)
This is a group programming assignment that should be completed in class.
Assume that you are building a system that has a real time counter
installed. For reasons that are lost to history, the designers made the
decision to implement that counter as a 32-bit signed value that
counts in milliseconds (i.e., that counter increments once every 1 msec.)
last time someone did this they built a system an aircraft had to be rebooted
every three weeks to avoid a counter overflow bug. Two possible ways to
avoid the overflow bug are proposed:
- Option #1: Create a 64-bit unsigned software time counter that uses the
32-bit signed value as an input and produces a correct 64-bit unsigned time
every time it is called.
- Option #2: Create a function that returns a 32-bit time difference when
called with two 32-bit signed time values, and works correctly even when the
32-bit signed timer has a negative value.
If your group is an EVEN group number, do option #1. If your group is an ODD
group number do option #2.
(if you get done early, we suggest you talk through the solution strategy for
the other option within your group.)
Create C language functions for your option and a unit test strategy. DO NOT
fix any bugs after the hand-off to unit test. The point is to get an idea of
what aspects of these functions are tricky to implement. You can use any
development, build, run, and unit test environment you prefer.
Sequence of steps:
- Write code to avoid the overflow bug according to the assigned option
- Potentially in parallel, write unit tests that will exercise the counter
function (perhaps have some team members write code and others define unit
- Make hand-in slides
- To the extent you have time, compile, run, and unit test the code. Update
slides as you have time.
- One slide with C code for Option #1
- One slide with verbal description of most important unit test cases for
Option #1. (Did any unit tests fail?)
The goal of this homework is to give you time and some guidance in studying
for the mid-term exam.
20-1: (10 points). If you had ONE thing out of the entire first half
of the course that you want the professor to explain or explain again in class,
what would it be? Ask a clear and concise question on a specific point if at
all possible. Paste in a screen grab of the relevant slide from the web version
of the lectures (or other soruce) on the slide following your answer so it is
right there to talk about. We'll cover as many as possible of these in class,
so make your question count!
20-2. (6 points per lecture) For each lecture in Exam #1, produce a
summary of the following points. For this question, your hand-in should
have one slide per lecture (even if that leaves empty space on some
slides). Each slide should have both the lecture number and title (e.g.,
"7. Code Style/Language") at the top of the slide, and then contain
the bullets listed below on the rest of the slide:
- (1 point per bullet=5 points) Five most important take-away points from the
lecture, in your own words (ideally 5 one-line bullets). While it might be
tempting to paraphrase from the first/last lecture slides, we instead encourage
you to dig a little deeper and really make sure you understand the material as
you prepare for the mid-term test. Ask yourself "if I were studying for a
test" (which you are), "what would be the most important points to
remember from this lecture?" (You can put in 6 or 7 if you really want to,
but only first 5 will be graded.)
- (1 point) List the one biggest open question you have about the material at
this point, taking into account other lectures and project work. (To be clear:
we know that sometimes concepts might have been fuzzy during a particular
lecture, such as exactly how to create effective statecharts. What we're
looking for is what remaining uncertainty or doubts remain now that you've done
all the other course activities leading up to the mid-term exam.) If there are
two concepts that you really feel are fuzzy it's OK to list more than one, but
try to keep it high level. We'd expect that one of these should be what you
promote to the One Big Question slide for the first question in this
Note: Only material from numbered lectures, in-class
exercises, and project is eligible to be on the test, and the test will heavily
emphasize numbered lectures. Also, you can skip optional material without a
lecture number, such as in-class presentations from industry that did not get a
lecture number on the course scheduling grid and supplemental material not
discussed in class that appears in HW assignments. A number of topics in the
Toyota UA lecture are not testable if they are covered in the second half of
our course (e.g., SIL, MISRA Guidelines, Faults, FCRs, concurrency, use of
redundant processors, single points of failure).
21-1. For the topic assigned below, find an example of a failure or
potential failure involving time or counter overflows, or other topics as
described. Some categories are finding a good example of a particular failure
mode (e.g., leap second), while other are finding a good example of any
time-related failure in a particular domain. Many of these will be discussed in
class, so if you see multiple examples on searches please try to look past the
first hit and pick one that you think is the most interesting to talk about in
class. Please make sure that your slides will be easily readable when displayed
in class, and be ready to give a 2 or 3 minute discussion of your topic in
class. Topics are assigned based on your sign-in number as below.
- 21-1a. First homework slide: a summary of the incident or mishap
- (2 points) A title that indicates the name of the system or a generic
description of the defect
- (10 points) A two to five bullet summary of the failure scenario. Briefly
explain the technical source of the problem as best you can. (This might
require a bit more searching than whatever the easiest to find article is. Use
multiple references if you have to.)
- (4 points) What is the economic impact and/or safety impact of the failure?
- (4 points) What could the designers have done to avoid the problem?
- (4 points) A picture that illustrates either the application or the result
of the problem. A good illustration from a news article is fine, with a URL
- 20-1b. (5 points) For the second homework slide: a screen shot of
important pieces of an on-line description of the problem, including and
attribution URL. Don't include the whole article if it is so long that the
fonts are too tiny to read in a slide format. The headline and lead paragraphs
describing the overall situation are sufficient.
Topic assignments for this question are as below, based on the last digit of
your student sign-in number. (For example, if your sign-in sheet number is 17
you are a "7".) If you have a strong preference not to do a
particular topic such as a personal experience with a failure of this type,
just let the instructor know and do either the topic before or the topic after.
- 1: Apple iOS DST alarm/reminder bug (pick your favorite; there are several
to choose from)
- 2: Leap second Linux crash
- 3: Daylight savings time cell phone glitch
- 4: NASA Deep Impact NASA timer overflow
- 5: Windows mobile 2010 bug
- 6: 512K day (8/12/2014)
- 7: GPS week rollover
- 8: Windows 95 timer rollover
- 9: Excel 1900 bug
- 0: Leap year Azure cloud
21-2: (3 points total) Watch the Computerphile video on time and time
(about 10 minutes long). List the three most interesting facts you learned from
watching this video, some of which might overlap items discussed in our course
lecture (1 point each). (NOTE: This is one of the best technical rants
21-3: (3 points total) Watch the Computerphile video on
internationalization.https://youtu.be/0j74jcxSunY (about 8
minutes long). List the three most interesting facts you learned from watching
this video (1 point each).
Other interesting time-related problems and bugs:
- Dec. 2, 2017 iOS bug (version 11.1.2)
- Mar. 7, 2017 European clocks lose time due to electricity grid disruption
- Jan. 2016 GPS timing melt-down (link)
- Nov. 2018 Hospital record keeping and DST (link)
- Oct. 2018 Hong Kong metro signalling crash (link)
- Apr. 2019 NYCWiN and GPS rollover
- Apr. 2019 Honeywell aircraft GPS rollover
- Jun. 2019 Collins GPS leap second
- Jul. 2019 Airbus A350 reboots