(no title)
echoradio | 3 years ago
I used to teach web programming. One of the exercises I had for students was to create a ballot box.
The first step was making it work as expected — accept votes and only display a count when “Election Day” has ended.
Then, I suggested constraints — code it so your preferred choice always wins; make it so the vote totals check out (don’t just add an arbitrary to the preferred total); make sure the margin of victory never triggers an automatic recount, etc.
That opened a lot of eyes, especially for beginning programmers. If they could do it…
No comments yet.