Note: I do all my examples using Chrome and have not tested them on other
browsers. Feel free to use whatever browser you prefer and count porting
my Chrome code to your browser as part of the task time when that is necessary.
- 1 PortToMyBrowser
doesn't work on your browser of convenience, fixing it so that it does is
- 2 NoFutureEvals
- Right now peereval doesn't check to see if you are handing in an
have a Date object, so finding out the current time is no problem.
Fix verify so that it checks and rejects attempts to hand in an eval for
time in the future.
- 3 TheFutureIsNotAnOption
- Fix the time selection options so that the user of peereval is
not even given the option of using a time in the future. This will
hardcoding them in the html.
- 4 TicTacToeMessages
- Right now, tictactoe3.html and tictactoe3.js don't tell you that you
lost or drew until you try and move after the game is over. Fix this so
that as soon as you lose or draw, it prints a message.
- 5 TicTacToeLastSquare
- Right now, tictactoe3.html and tictactoe3.js doesn't let you actually
fill in the last square. Fix this so that the final board on a drawn
game is has every square taken.
- 6 TicTacToeHint
- Sometimes figuring out a Tic Tac Toe move is just too hard for me.
Give me a button that I can press that will cause the computer to give
me a hint as to what the best move is in the current situation.
- 7 TicTacToeGameTime
- Add a note to the game over (win or loss) indicating the total
amount of time that passed since the page loaded til end. (note: there
is a page loaded event).
- 8 TicTacToeReset
- Rather than having to reload the page to play a new game, it would
be nice if there was a reset button that would reinitialize the web
page as well as restart the game timer.
- 9 PeerEvalDisplayDataPage
- Right now, when DisplayData is chosen on the PeerEval page, the
data is displayed as part of that page. Inevitably, this means some
people will grab non-data items when they cut and paste from that page.
Since at that point in the processing, there is nothing much left to
do anyway, why not just wipe the whole page and display only the data
people would want to cut and paste? The following stackoverflow note
should help with that
what does document.write do?.
- 10 PeerEvalEndNow
- Often when people are doing a peer eval, they want to evaluate up to
and including the current time. Although we don't know when the start of
the evaluation should be, we do know when the end should be (as we can find
out the current time). Add to peer eval a button by ENDING that lets you
just click it and have the ENDING WEEK and DAY set to the most recent
time before now.
- 11 PeerEvalStartNow
- Hmmm, actually, if the web page keeps track of the end of your last
peer evaluation, then it could use that information to figure out when the
start of the next peer evaluation should be. Another button for this
would be at STARTING and perhaps a button for REMEMBER to be added to
ENDING? Of course that leaves the question of how it would remember
this information. I think the following two StackOverflow entries
How do I create and read a value from cookie? and
- 12 YoutubeVideoAPI
- The tutorial
seems to tell you everything you need to include a youtube video on a
resource on clarifying some parts. To test this out, use the video
IN LIMBO (Clip A)
whose URL is https://www.youtube.com/watch?v=LaSRU5m_7og .
It is less than a minute long, from Canada's National Film Board.
(rather than just as an embedded youtube object) and the user should
be able to control it with typical youtube controls.
- 13 PlayOnLoad
- Following up on the YoutubeVideoAPI task, set things up so that the
video plays as soon as the page loads (i.e., the user doesn't have to
press the play button).
- 14 PlayBackToBack
After the first video has completed from PlayOnLoad, a second video should
start up. Once it is done, we should cycle back to the first video and
A good second video would be
IN LIMBO (Clip B)
whose URL is https://www.youtube.com/watch?v=pbMO7uwu-ok
which is also less than a minute long.
- 15 ChangeablePlayNext
Lets get a few more videos in the sequence:
IN LIMBO (Clip C)
IN LIMBO (Clip D)
While the video sequence is playing, there should be a selector to let
the user pick which video to play next (skipping ahead in the cyclic
- 16 NodeJsConvert
- Convert the version of peereval.html that you have developed into
one that can be served up as by a Nodejs web server. To see my approach
to designing a Nodejs web server, see the posting of the 10 Mar 2016 mindmaps
tar file note on the course Annuocements page.
- 17 PrintFormValues
- Modify peereval.html so that it sends all its id value pairs to
nodejs which simply prints them to the screen. Note that there is
ids in the document and gathering their values as it is used after
a verify to allow people to cut and paste this material from the
- 18 SaveFormValues Read Warning Message
- Warning Message: It turns out there is no good way to secure
a web server if it is running on a machine connected to the web. The most
obvious attack on a server implementing the functionality of this task is
to dump a ton of data on you to fill up your disk. The most obvious way
to avoid that is to count the size of the data you send to disk. The data
values here should never be larger than 32 kilobytes, so you can simply
stop writing to disk if more data than that is to be written to disk.
The other attack is to overwrite your existing data which might be
annoying. The simplest solution is to make a backup of your last saved
file before launching the webserver. In general, when not using the
webserver code, there is no reason to leave it running -- saver to
kill it and restart it when you need it later. Also, stay alert as
no amount of cleverness can secure the transaction if there is a bug
in the nodejs system that can be exploited by a hostile net entity.
- Implementing the countermeasures indicated above, write the
information sent by PrintFormValues to a file rather than to the screen.
You probably want to add a button to the html file to all you to force
a save. Hardwire into the server which file it writes the data to so
any damage is limited to that one file (do not let the incoming connection
specify where to write to).
- 19 SendBackFormValues
- Maintaining the security established in 18, add a button to peer
eval that causes the web server to send the saved information back to
the client, which should just dump it to the console so that you can see
that the transaction worked.
- 20 RestoreFormValues
- Continuing on 19, instead of dumping the data to the console, use
it to reset the form values to those that were last saved.