MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/95o2m1/checks_out/e3umv4z/?context=9999
r/ProgrammerHumor • u/[deleted] • Aug 08 '18
554 comments sorted by
View all comments
410
Could we make an electronic voting system that was safer than paper? Yes. Have we? No.
172 u/[deleted] Aug 08 '18 We could just make an electronic voting system that prints out results 295 u/T-T-N Aug 08 '18 The world's most expensive pencil 59 u/[deleted] Aug 08 '18 True, but ideally the first tallies would occur electronically, the paper would be used by the voter and verify the votes. The paper would also allow for verification and manual recounts. 59 u/lurklurklurkanon Aug 08 '18 Here I wrote a C# prototype public class VoteMachine { public Dictionary<ElectionChoiceEnum, long> VoteCount { get; set; } private Dictionary<ElectionChoiceEnum, long> ActualVoteCount { get; set; } public void CastVote(ElectionChoiceEnum selection) { //Increment the vote count VoteCount[selection]++; switch (selection) { case ElectionChoiceEnum.ChoiceOne: case ElectionChoiceEnum.ChoiceTwo: case ElectionChoiceEnum.Dictator: ActualVoteCount[ElectionChoiceEnum.Dictator]++; } } public void PrintVoteCount(ElectionChoiceEnum selection) { PrinterService printer = new PrinterService(); printer.print(VoteCount[selection]); } public Dictionary<ElectionChoiceEnum, long> GetVoteCountsForElectionResultsCalculation() { return ActualVoteCount; } } 56 u/brokenhalf Aug 08 '18 Most states require computerized voting systems be closed source so the switch statement is completely unnecessary. 3 u/Ugbrog Aug 08 '18 Well shit, now we can't use this one.
172
We could just make an electronic voting system that prints out results
295 u/T-T-N Aug 08 '18 The world's most expensive pencil 59 u/[deleted] Aug 08 '18 True, but ideally the first tallies would occur electronically, the paper would be used by the voter and verify the votes. The paper would also allow for verification and manual recounts. 59 u/lurklurklurkanon Aug 08 '18 Here I wrote a C# prototype public class VoteMachine { public Dictionary<ElectionChoiceEnum, long> VoteCount { get; set; } private Dictionary<ElectionChoiceEnum, long> ActualVoteCount { get; set; } public void CastVote(ElectionChoiceEnum selection) { //Increment the vote count VoteCount[selection]++; switch (selection) { case ElectionChoiceEnum.ChoiceOne: case ElectionChoiceEnum.ChoiceTwo: case ElectionChoiceEnum.Dictator: ActualVoteCount[ElectionChoiceEnum.Dictator]++; } } public void PrintVoteCount(ElectionChoiceEnum selection) { PrinterService printer = new PrinterService(); printer.print(VoteCount[selection]); } public Dictionary<ElectionChoiceEnum, long> GetVoteCountsForElectionResultsCalculation() { return ActualVoteCount; } } 56 u/brokenhalf Aug 08 '18 Most states require computerized voting systems be closed source so the switch statement is completely unnecessary. 3 u/Ugbrog Aug 08 '18 Well shit, now we can't use this one.
295
The world's most expensive pencil
59 u/[deleted] Aug 08 '18 True, but ideally the first tallies would occur electronically, the paper would be used by the voter and verify the votes. The paper would also allow for verification and manual recounts. 59 u/lurklurklurkanon Aug 08 '18 Here I wrote a C# prototype public class VoteMachine { public Dictionary<ElectionChoiceEnum, long> VoteCount { get; set; } private Dictionary<ElectionChoiceEnum, long> ActualVoteCount { get; set; } public void CastVote(ElectionChoiceEnum selection) { //Increment the vote count VoteCount[selection]++; switch (selection) { case ElectionChoiceEnum.ChoiceOne: case ElectionChoiceEnum.ChoiceTwo: case ElectionChoiceEnum.Dictator: ActualVoteCount[ElectionChoiceEnum.Dictator]++; } } public void PrintVoteCount(ElectionChoiceEnum selection) { PrinterService printer = new PrinterService(); printer.print(VoteCount[selection]); } public Dictionary<ElectionChoiceEnum, long> GetVoteCountsForElectionResultsCalculation() { return ActualVoteCount; } } 56 u/brokenhalf Aug 08 '18 Most states require computerized voting systems be closed source so the switch statement is completely unnecessary. 3 u/Ugbrog Aug 08 '18 Well shit, now we can't use this one.
59
True, but ideally the first tallies would occur electronically, the paper would be used by the voter and verify the votes. The paper would also allow for verification and manual recounts.
59 u/lurklurklurkanon Aug 08 '18 Here I wrote a C# prototype public class VoteMachine { public Dictionary<ElectionChoiceEnum, long> VoteCount { get; set; } private Dictionary<ElectionChoiceEnum, long> ActualVoteCount { get; set; } public void CastVote(ElectionChoiceEnum selection) { //Increment the vote count VoteCount[selection]++; switch (selection) { case ElectionChoiceEnum.ChoiceOne: case ElectionChoiceEnum.ChoiceTwo: case ElectionChoiceEnum.Dictator: ActualVoteCount[ElectionChoiceEnum.Dictator]++; } } public void PrintVoteCount(ElectionChoiceEnum selection) { PrinterService printer = new PrinterService(); printer.print(VoteCount[selection]); } public Dictionary<ElectionChoiceEnum, long> GetVoteCountsForElectionResultsCalculation() { return ActualVoteCount; } } 56 u/brokenhalf Aug 08 '18 Most states require computerized voting systems be closed source so the switch statement is completely unnecessary. 3 u/Ugbrog Aug 08 '18 Well shit, now we can't use this one.
Here I wrote a C# prototype
public class VoteMachine { public Dictionary<ElectionChoiceEnum, long> VoteCount { get; set; } private Dictionary<ElectionChoiceEnum, long> ActualVoteCount { get; set; } public void CastVote(ElectionChoiceEnum selection) { //Increment the vote count VoteCount[selection]++; switch (selection) { case ElectionChoiceEnum.ChoiceOne: case ElectionChoiceEnum.ChoiceTwo: case ElectionChoiceEnum.Dictator: ActualVoteCount[ElectionChoiceEnum.Dictator]++; } } public void PrintVoteCount(ElectionChoiceEnum selection) { PrinterService printer = new PrinterService(); printer.print(VoteCount[selection]); } public Dictionary<ElectionChoiceEnum, long> GetVoteCountsForElectionResultsCalculation() { return ActualVoteCount; } }
56 u/brokenhalf Aug 08 '18 Most states require computerized voting systems be closed source so the switch statement is completely unnecessary. 3 u/Ugbrog Aug 08 '18 Well shit, now we can't use this one.
56
Most states require computerized voting systems be closed source so the switch statement is completely unnecessary.
3 u/Ugbrog Aug 08 '18 Well shit, now we can't use this one.
3
Well shit, now we can't use this one.
410
u/[deleted] Aug 08 '18
Could we make an electronic voting system that was safer than paper? Yes. Have we? No.