6 ms·
Iowa Caucus App Error
- akersten 7y agoHoly shit. Not only is that one of the worst-performing SQL queries I've ever seen, the fact that it's being emitted as part of an error message, and clearly not parameterized, is absolutely shocking. Did a little digging. This[0] is the website of the author of the app allegedly used in the caucusing. And oh boy: * HTTP * Copyright 2014 * Half of the showcased examples are broken links * Weird obsession with assuring that their development is not done by "non-English speakers" * I'm pretty sure it's just one guy (the VoterClick training videos[1] are done out of his house?) * I won't even comment on the quality of everything else I'm seeing, my confidence that a functionally sound app could be produced by this firm is already at zero Someone tell me the caucus administrators were not actually using this? This feels like a fever dream. [0] http://cerenimbus.com/ http://cerenimbus.com/ [1] http://cerenimbus.com/voterclick.html http://cerenimbus.com/voterclick.html Edit: The author of the Twitter thread replied and said they weren't confident it's the same app. That makes me feel a little(?) better - I'll leave my critique of this website for posterity...
- deleted 7y ago[deleted]
- tareqak 7y agoThe makers of the Iowa Caucus app are: https://shadowinc.io/ https://shadowinc.io/ . They received money from the Iowa State Democratic Party, the Nevada State Democratic Party, and Pete Buttigieg for America: https://mobile.twitter.com/lhfang/status/1224572119549267968 https://mobile.twitter.com/lhfang/status/1224572119549267968 . I’ve been following along https://www.twitch.tv/hasanabi https://www.twitch.tv/hasanabi in getting this news.
- CapricornNoble 7y agoAlso, apparently the CEO of Shadow Inc. spent a year promoting for Hillary for America in 2016 (aka Bernie's chief opponent in the DNC). The CEO's husband also works for Buttigieg. https://twitter.com/elainelayabout/status/1224581259533438976 https://twitter.com/elainelayabout/status/122458125953343897... https://www.zerohedge.com/political/thousands-furious-supporters-claim-iowa-caucus-rigged-against-bernie https://www.zerohedge.com/political/thousands-furious-suppor...
- MoronInAHurry 7y agoWhat exactly makes that "one of the worst-performing SQL queries you've ever seen"? It has two left joins on foreign/primary keys, and 4 trivially-indexed where conditions. That's all it has, and none of that is even slightly complex.
- akersten 7y agoMaybe my SQL's a little rusty, but isn't a left (outer) join between voters+precincts and (that)+party going to create a massive table with a bunch of nulls inserted? (And, how do you know they're primary keys, and that any of it is indexed? That's not evident from the query) Maybe "worst I've ever seen" is hyperbolic. My main point was, it's a sloppy query, could probably be done with a few WHERE clauses and an inner join instead, and is more evidence of shoddy coding practices.
- maweki 7y agoThe query planner might rewrite it to exactly what you're proposing. Just from looking at it you usually can't identify a bad query. If you have subqueries the story is a bit different but for this one, it's really anyone's guess.
- MoronInAHurry 7y agoNo, that's not how a left join works. You really shouldn't act so condescending when you clearly don't even have a solid understanding of the basics yourself. That's a perfectly reasonable query that would run in less than a millisecond on a large database as long as it's been indexed correctly. There's nothing sloppy about it at all.
- maweki 7y ago> No, that's not how a left join works. It's how a naive implementation would work. Nobody actually knows "how" this left join works since we don't know what the query planner will do. Manifesting a whole outer join is not totally unreasonable in all cases. I think you come off as very aggressive and there's no need for that tone. But I do agree with the sentiment that the query might not be bad.
- trhway 7y ago>one of the worst-performing SQL queries I've ever seen voter left join precinct left join party where filter(voter) would work just fine even if precinct and party aren't primary indexed as the number of precincts is just too low (1700) to cause any issues - an optimizer like Oracle would drive the query from the voter while applying filter to it (indexes on the first/last name and/or address would speed the filtering obviously) and looking up precincts by index (in case of precincts not having the index it would just scan the precincts in case of a small filtered voter set or hash the precincts and do hash lookup in case of a larger filtered voter set). For party it is the same, just for 2 parties it doesn't matter - index, scan or hash, etc. The main issue is as always at business logic and data quality level - it seems that there are supposedly voters without precincts, and precincts without parties :)
- tareqak 7y agoIt is getting much worse. The PIN to report the results is on the caucus math worksheet: https://mobile.twitter.com/wycats/status/1224558210222186496 https://mobile.twitter.com/wycats/status/1224558210222186496 , and many people are posting pictures of these worksheets. In one case, the person posting picture is Ben Halle, the Iowa Comms director for Pete Buttigieg: https://mobile.twitter.com/bhalle87/status/1224550111725916160 https://mobile.twitter.com/bhalle87/status/12245501117259161...
- nl 7y agoThe PIN is clearly visible in the top right corner of the pic posts as a reply to that.
- tareqak 7y agoYes, the picture in the reply is of a Caucus Math worksheet, and this is not the only picture on Twitter of such a sheet.
- deathanatos 7y agoIs the math on that sheet even correct? E.g., rounding 3.47826 to 4, when the directions seem to indicate that it should round to 3? Edit: So, if you believe a Medium post with lots of animated GIFs[1], in the case that the total is short, the extra delegate is awarded to the closest to round up. So, given that additional rule, the math checks out, but it's oddly not stated on the worksheet. The multiplication at the top, likewise, is incorrect. Again, wrong inputs (the total present seems to be 69, not 70); the answer is right given corrected inputs. The votes? at the bottom also appear to have had someone vote twice. Not clear which candidate got the extra, but I don't think it matters. [1]: https://medium.com/@IowaDems/caucus-math-in-3-minutes-1b9a496bbec2 https://medium.com/@IowaDems/caucus-math-in-3-minutes-1b9a49... Edit edit: Ah, here's a better source, maybe? Four years out of date, and the filename looks to be a letter short: https://www.iowaaflcio.org/system/files/cauus_handbook_dems.pdf https://www.iowaaflcio.org/system/files/cauus_handbook_dems....
- tareqak 7y ago
- mzs 7y ago>I should point out that I do not think the terrible incompetent app in my screenshot is being used in Iowa. I doubt it, since the developer’s other apps contain Utah counties and specifically mention the REPUBLICAN caucus. https://twitter.com/farmerchris/status/1224572430066311168 https://twitter.com/farmerchris/status/1224572430066311168
- Psyonic 7y agowhy'd he delete this? Should we assume he was wrong?
- mzs 7y agoI don't know, now the account has this > Bobby Tables 4 Tweets Joined January 2007 259 Following 279 Followers These Tweets are protected Only approved followers can see @farmerchris’s Tweets. To request access, click Follow.
- nl 7y agoI submitted this, but it may not be the app used by the Democratic Caucus. The Twitter user said "the app" but later clarified that it's the Republican Utah app (or something?). https://twitter.com/farmerchris/status/1224572430066311168 https://twitter.com/farmerchris/status/1224572430066311168 Apologies for any misinformation. Hopefully if it is the Republican app they have time to fix it.
- slenk 7y agoThe connections to the real app are much worse... https://mobile.twitter.com/wycats/status/1224558210222186496 https://mobile.twitter.com/wycats/status/1224558210222186496 https://mobile.twitter.com/WalkerBragman/status/1224573131731369994 https://mobile.twitter.com/WalkerBragman/status/122457313173... https://mobile.twitter.com/leondeba/status/1224573648939507718 https://mobile.twitter.com/leondeba/status/12245736489395077...
- gdubs 7y agoSo, at this point, how would they be able to verify the authenticity? If the phone system was the backup, but pins have been compromised...
- birdyrooster 7y agoEven more interesting is that the company who created the caucus voting app has been doing business with two of the contestants https://www.opensecrets.org/campaign-expenditures/vendor?cycle=2020&vendor=Shadow+Inc https://www.opensecrets.org/campaign-expenditures/vendor?cyc...
- JMTQp8lwXL 7y agoPresuming that the Democratic Party of Nevada paid for the app (given none of the other payments to Shadow seem reasonably related), I suppose this is what you get for $58k. No actual load testing, a buggy app, and authentication tokens being posted online. Clearly, the company picked to implement this app was not picked for their known ability to deliver enterprise-grade software, but rather, a who's who among the party.
- jakeogh 7y agoTom Scott: Why Electronic voting is a BAD idea: https://www.youtube.com/watch?v=w3_0x6oaDmI https://www.youtube.com/watch?v=w3_0x6oaDmI
- tareqak 7y agoThis is not electronic voting. This is relaying the results of the caucuses electronically, or by telephone as a backup.
- Lycake 7y agoThis was 2014. You might think with newer technologies this isn't a problem anymore. He also made "Why Electronic Voting Is Still A Bad Idea" last month: https://www.youtube.com/watch?v=LkH2r-sNjQs https://www.youtube.com/watch?v=LkH2r-sNjQs
- idlewords 7y agoI'd like to head off conspiracy theorizing by reminding everyone that unlike a secret ballot, caucus results are public (everyone at the event sees the count, and remembers it after). This is a flaw with the app that was supposed to aggregate these results, but it does not affect the integrity of the election. The results are being tabulated by phone, and can be verified by an auditable paper trail. Even without the paper trail, they could be reconstituted (or verified) by asking the people who attended the ~1700 caucus events. This was a disaster, but the caucus results are not suspect because of it.
- Double_a_92 7y agoAre caucus and primaries even legally obliged to have any strict formal standards? It's just party-interal business, right? They could toss a coin, or let anyone vote via mobile app from home...
- taejo 7y agoDon't organizations have a civil obligation towards their members to follow their own rules, though?
- solarkraft 7y agoTheoretically. I'm not convinced the DNC practically has to do that (have there been real punishments?).
- contravariant 7y agoThey could, but they would deservedly face criticism, just like now (except more severe).
- aptwebapps 7y agoIt's not totally up to the parties. Each state has different laws about how their primary or caucus should be conducted.
- 7y ago
- cwkoss 7y agoThis google spreadsheet is attempting to gather all of the publicly posted election math worksheets to crowdsource figuring out the results. https://docs.google.com/spreadsheets/d/1VpPjgfoH-n7Ie8OmIa2eHoP88IvIkBR9wwkUL7bO1Y4/edit#gid=0 https://docs.google.com/spreadsheets/d/1VpPjgfoH-n7Ie8OmIa2e...
- eappleby 7y agoYou can see an early breakdown of the results from the small percentage of precincts reporting: https://www.kcci.com/article/kcci-iowa-caucus-results/30599739# https://www.kcci.com/article/kcci-iowa-caucus-results/305997...
- sschueller 7y agoDoes anyone have the APK? I would love to decompile it and take a look.
- jefurii 7y agoThe tweet has since been deleted. Anybody save the image?
- mikeortman 7y agoMirror of tweet. Account permissions changed: https://web.archive.org/web/20200204054257/https:/twitter.com/farmerchris/status/1224550710836113408 https://web.archive.org/web/20200204054257/https:/twitter.co...