Good afternoon. The lecture that I'm going to be
giving this afternoon is a follow-on to an earlier lecture
that I'd given about the RE reference model developed by
Michael Jackson and Pamela Zave,
which is a way to validate a system, is with this formula, D
and S entails R. D is domain knowledge, S is the
specification of the system that you're building, and R are the requirements
that that system is supposed to meet. The specification
describes the behavior of a system that is intended to realize
the requirement. And the domain assumptions are needed to
argue that any system that meets the specifications, such as software,
and manipulates the interface phenomena as specified, will
satisfy the requirement. So the way you read this, as I said
is... if the main assumptions hold and the specifications
hold, that entails the holding of the requirements.
Okay, so let's now switch to today's topic. I'm gonna be
describing my self administered haircut during the COVID-19
lockdown of the summer of 2020. This describes the haircut that
I did during the lockdown when it was not possible to get a haircut,
and people were letting their hair grow sort of like Rip Van
Winkle. Except that we weren't sleeping. Okay, now so by the
second month of the 2020 COVID-19 lockdown, I, like a
whole lot of other people, needed a haircut. In fact, I
mean, the problem was that I hadn't gotten one just as the
lockdown came, so I already had three months of hair growth. Now
my normal haircut is a simple all around cut done with a
clipper with a one inch riser, making every hair exactly one
inch long and not trying to hide my growing baldness by letting
some hairs be longer than one inch, so that they would cover
the bald area. I'm not one of those. I do have the barber trim
the edge of the hair to clean lines causing the hairs near the
edge to be shorter than one inch. But for the most part
everything is exactly one inch long. Now, I thought of this as
an engineering problem. I got to thinking, maybe I could give
myself a haircut using a purchased clipper with a one
inch riser. So being a nerd, a geeky engineer at heart, I
decided to approach the problem of cutting my own hair as an
engineering problem. And I'm not- I'm not joking. Really.
Okay, now, first I determine the statement of the requirements R
that is applicable to me in normal times, prior to the
lockdown, and they are... okay, the two part-requirement: A,
every hair on my head, except near the edge of the hair is cut
to exactly one inch, 25 millimeters. And B, every hair
hanging over the edge of the hair is clipped to form a clean
edge line. Now, now, these are written in natural language,
obviously ambiguous, however, I think we all understand what
they mean and we're going to be operating on that understood
meaning. As will happen in real life when you don't require
specifying things formally
with mathematics. So, first, I determined the specification S,
a statement that is applicable to me in normal times, that is,
before the lockdown. Okay, so S consists of two clauses and
sequentially... the barber cuts every hair on my head using the
clipper with a one inch riser, and then, the barber clips
every hair hanging over with the edge of the hair
to form a clean edge line using a clipper without a riser. Now,
does S entail R? Yes! I mean, if a barber does what S specifies
then these requirements are going to hold. Now, does it
require a domain assumption? Not really, other than the fact that
the clipper must continue to function during this thing,
power to the clipper must function... okay, but that, I
mean with every computer based system the assumption is that
the computer continues to run. That every hair on my head is at
least one inch long, so if you cut it, it can be exactly and you
have nothing less than one inch that doesn't get cut. And of
course, all the usual tacit assumptions that are true for
every haircut. But nothing really special for this thing.
Now, during the lockdown I couldn't go to a barber and I
was living with no one else who might play the role of barber in
my bubble. So I needed to see achieved the same R with a new S
prime in which the one who's doing the cutting and clipping
is I. Okay, and that is, the S prime is, I cut every hair on my
head to exactly one inch long and, and maybe not in the same
order, I clip every hair hanging over the edge of the hair to
form a clean edge line, as before. Hmm, this points out a
hidden domain assumption, a conjunct of D, a tacit one that
I overlooked, and that is whoever operates the clipper can
see what he or she is doing, so as to cut everything that should
be cut and to not cut anything that should not be cut. Now.
Believe it or not, I cannot see what I'm doing behind my head. I
know every teenager thinks parents have eyes in the back of
their head but I do not. So D does not hold when I operate the
clipper. So, is there a way to achieve R, with an S prime that
works even if the clipper operator cannot see what he or
she is doing? Now I've seen some sorry results of self-haircuts.
I mean, there were places where he or she cut too short,
including bald spots. There were places that he or she cut too
long. And I wanted to avoid this, quote, "new look", no
matter how "in" and "cool" it is these days. Okay, so, I began to
think more along engineering and of course, there are the
concepts of recall and precision. Recall is the
percentage of the right stuff that's found by any software
tool. And precision is the percentage of the found stuff
that is right stuff. Now, clipping has 100% precision if
no hair on the head is cut shorter than one inch, in my
case, and a clipping has 100% recall if no hair on the head is
left longer than one inch. So what I need is 100% recall and 100% precision.
Now, the presence of a one inch riser guarantees, on the clipper
that is, guarantees 100% precision. With the one inch
riser, there's no way to cut any hair shorter than an inch long.
Okay, I mean, the riser keeps the clipper one inch away, so
okay. But of course. So any hair originally longer than one inch,
that misses meeting the clipper, because the clipper operator
cannot see what he or she is doing and misses some spots with
the clipper, or the hair is bent or something, will be left
longer than one inch. So 100% recall cannot be guaranteed in
any clipping even though 100% precision can be. Now.
So, engineering thinking again. Maybe an iterative approach
would work, that is, you have a loop until a condition is met.
Okay, the body of the loop is: attempt to cut every hair with multiple sweeps
over the hair-covered part of my head, using a clipper with a one
inch riser. And you keep doing this until what falls to the
floor indicates that no new hair got clipped in the just finished
attempt. Now, with each iteration, the recall should get
closer to 100%, and we can decide to accept that after
three consecutive times, that no new hair gets clipped in a
sufficiently covering iteration, the recall IS accepted as at 100%.
Now the improvement to the recall of any iteration can be
increased by fluffing up my hair with a comb at the beginning of
the iteration to reduce the number of hairs that are not
sticking up straight and are missed by the clipper.
So, this leaves an iterative S prime, uh, X prime and then Y prime.
Okay, X prime is this loop: after fluffing up my hair with a
comb, attempt to cut every hair with multiple sweeps with the hair clipper,
covered part of my body, using a clipper with a one inch riser,
until, for a third consecutive time, what falls to the floor
indicates that no new hair gets clipped in the just
finished attempt. Okay,
that should work. Now, this X prime, of course, takes care of
the requirement A. I mean if I follow this procedure, then I
don't need to have the person seeing, or operating the clipper
can see everything, the iteration takes care of that.
So, X prime should entail R without any domain assumption.
Now what about the requirement B, of trimming the edges? I
don't see any way to guarantee that I will cut every hair that
should be cut. And more importantly, I don't see any way
to guarantee that I won't cut off too much. I really need to
see what I'm doing. And there's no way to have something that
allows me to safely do what I have seen and be sure that I'm
gonna get it. So, I decided that I will abandon B as not
achievable if I'm cutting my own hair. So I'm weakening the
requirement in order to obtain something that is achievable
with the proposed iteration.
And this is an example of weakening the requirement in
order to make the existing S strong enough to entail the new
weakened requirement. Now, so the final S prime entails R
prime. R prime is every hair on my head is cut to exactly one
inch long, even the edge stuff. And then the specification is
this loop: so after fluffing up my hair with a comb attempt to
cut every hair with multiple sweeps of the hair-covered part
using a clipper with a one inch riser, until for a third
consecutive time what falls to the floor indicates that no new
hair gets clipped in the just finished attempt. Okay. So, now,
so the key lemma of the validation is-- okay. Now, coming
from that recall and precision analysis, this analysis proves
that the assumption, whoever operates the clipper can see
what he or she is doing, so it's to cut everything that should be
cut, and not to cut anything that should not be cut, does not need
to hold because the iteration guarantees that everything that
should be cut is cut and the one inch riser guarantees that
nothing is cut that should not be cut. Okay. So, we now have a
validation: S entails R. Now, observe how a thorough analysis
of the D, S and R before implementation started assured me
that the implementation would proceed as expected. Okay. This
is what every requirement engineer should do, and that is,
thoroughly analyze it before giving the S to be implemented. But of course,
more was needed, guess what. I had to do an inspection. I ended
up showing what I have done to other geeks. I showed my analysis
to all my kids who are geeks, and to my- some geeky friends,
in an attempt for them to find flaws in my reasoning. None
could find any, but each warned me of a lousy outcome
nevertheless, like good engineers who understood
Murphy's Law. Now, these showings to other geeks were
none other than inspections of my requirements analysis. Now,
it worked! Okay, now, the first time I gave the lecture, I mean,
I captured a video of me showing people that it had worked. Okay,
so the self-administered haircut itself required 14 iterations
and took about a half hour altogether including the time to
sweep up the fallen hair. Now, I'm going to show you
photographs taken during the haircut and a videotape from
three weeks later, to show you that the haircut achieved what
was finally required... no less and no more.
Okay, so here's me with the overgrown hair.
You can see that it's longer than what I have now.
I got a hair cut now... four weeks ago, yeah. Okay, this is
me actually doing it. And you see that we've got me having
fluffed up the hair with a comb.
Okay, now here's the final result. From the front. From one
side. A selfie from the back. Here's the hair on the floor,
there's the clipper with the blue one inch riser there.
Okay, now I'm gonna end the share of these slides and show
you the video. So hang on, don't go away.
Okay.
Well, I'm looking at my hair about three weeks after the haircut that I
administered to myself. You can see that, from the front and the
top, it's what it should be. Even from the side, it's what it
should be. Now, my head to me is like the moon: I've never
seen the other side, the side that's always facing away from
my eyes. So I'm gonna turn around so that you can see the
back, and in particular, you can see the edge, the bottom edge of
the hair on my neck, you should be able to see that it was not
done too properly, which is what I planned, not to even try to do
that. So I'm gonna turn around now. So I believe that you can
see, right now, I can't tell that it's working correctly, but
I'm assuming that I didn't move too much in my chair, so I
should be visible. Now, I'm going to stop the recording.
Okay, so that completes this lecture. I hope you enjoyed it.
Thank you for listening.