Ideas for next time:
- List out the features of a debugger, and for the 'learning
the DB' exercise have them (1) do all three programs, and (2)
fill in a table with examples of where they used each feature
|
NUnit materials:
-
Starter project for the
lesson 08 PCEs
-
Watch
the online
videos for this
lesson and
demonstrate your
knowledge
You can
download
a .ZIP of all
the videos for this
lesson from
Microsoft's
OneDrive website
by
opening the
folder (click
this link to
open the folder),
then clicking on
the "Folder
Actions" menu,
then clicking on
the "Download
Folder" menu
item.
-
Slides (used in the NUnit videos)
-
VIDEO:
Unit
Testing Overview
-
VIDEO:
NUnit Intro
Note that this
video (at about
the 3 minute
mark) explains
what you need to
hand in - a .ZIP
file with
StudentAnswers.cs
(and any other
files you
need/want to
hand in).
-
Familiarize
yourself with
NUnit-based 'autograded'
exercises: Read this note:
Tests
to ignore
-
VIDEO:
Making the tests
pass (by
changing the
tests - only to
learn NUnit)
-
Exercise:
Make failing tests
pass (Required)
(You won't be
able to 'hand
in' this work
because it's not
in the
Student_Answers.cs
file)
-
VIDEO:
Running a
console app
(using Set as
Startup Project)
; How to hand-in
stuff
-
VIDEO:
Producing your
own gradesheet
-
VIDEO:
Basic Unit Test
-
Exercise:
Making a basic
unit test pass (Hand-In)
-
VIDEO:
Capturing Output
From Your Code
-
Exercise:
Fixing broken
output
-
Exercise:
Fahrenheit to
Celsius (tested
by NUnit) (Hand-In)
-
VIDEO:
Deciphering
tests that use
the [Values]
attribute
-
Exercise:
Practicing with
the [Values] Attribute
: Testing the
Dishwasher class
(Sect 4.9, Sect.
9.6) (Hand-In)
(This is a redo
of PCE 05,
Exercise #8 -
Constructors )
-
VIDEO:
Deciphering
tests that use
the [TestCase]
attribute
-
Exercise:
Practicing with
the
[TestCase] Attribute:
Passing arrays
to functions
(Sect. 8.7, 8.8)
(Hand-In)
(This
is a redo of PCE 04,
Exercise #11 -
Arrays as
parameters - you
may want to
double-check any
feedback you got
for that lesson
while working on
this exercise)
-
VIDEO:
Deciphering
tests that
implicitly use
the [SetUp]
attribute
-
PCE Feedback
(optional)
-
Web
Hand-In for pre-class exercises and homework: The
StudentTracker
web app StudentTracker
limits the size
of the files
that you upload
- this limt is
typically 1 MB.
The NUnit
support files
are much larger
than that.
Therefore,
starting with
this lesson, you
should .ZIP ONLY
the
Student_Answers.cs
file (along with
any other files
you wish to
include, such as
the feedback
file).
ALSO: You must
submit a .ZIP
file, and not a
.RAR, nor a .7z,
nor any other
compressed file
format.
The instructor's
auto-grading
script can't
open anything
other than a
.ZIP, so you
must submit your
work as a .ZIP.
Submitting any
other file
format may
result in a
point penalty.
Thanks!
Please submit a .ZIP (and ONLY a .ZIP - not a .RAR, .7z, etc)
that contains the Student_Answers.cs
file, the video outline/viewing quiz .DOCX (or .PDF), any other files you wish to include
(such as the feedback file), and leaves out every thing else (as
much as possible).
Add to
slides:
•If you get a base (raw) score of 6+ on the PCEs, then
you’ll get a 2 point ‘bonus’ • –You can’t go above 10 points – –This
is to avoid problems where your code is 90% working, but 1 or 2
tests fail because of a relatively minor issue
|
TODO:
- Fireworks (the class) is plural
- Need to add the 'Rocket' thing to the spec
- Spec: proofread the bit about how the game works (giving too
much away?)
Items:
|
REMOVE:
Implement the Rocket class
How to understand large code bases:
-
http://programmers.stackexchange.com/questions/6395/how-do-you-dive-into-large-code-bases
- Walk through code in the debugger
- Talk to the programmer
- Use commenting to (temporarily) remove code, instead of
deleting it
- "handle on what these are supposed to be and what they
are used for. Follow data through the application and see
where it goes and how it is changed. "
- "One of the problems I have with all this is motivation
- it can be a real slog. It helps me to think of the whole
business as a puzzle, and to celebrate the progress that I'm
making, no matter how small."
-
http://stackoverflow.com/questions/684251/understanding-a-large-undocumented-set-of-source-code
- Learn what the code is supposed to do
- Learn how it does them
- (crucially) Learn why it does them the way it does
-
- Using a debugger - basic skills establishment - COPY FROM
143!!!!
- Setting breakpoints
- Watch window / locals / auto
- There will be some variation here between Express &
Pro
- Stepping through code, into code, out of code, continue
|
Feedback / Improvements on exericses:
(Please ignore this - these are notes for myself for the
next iteration of this course) |
Preview Videos:
-
Viewing Quiz
REDO: BubbleSort
question #23 -
the handout does
not match the
values used in
the video
-
Bubble Sort
REDO: Copy and
paste of array
was difficult -
redo this one?
The PCE for
Fahreinheit to
Celsius does NOT
limit the output to
2 decimal places,
even though it's
supposed to
NUnit: Redo the
videos so they're
quicker. Also,
have
a series of
micro-videos about
how to debug a test
(showing step
by step how such a
thing is done)
|