Publishing the Same App Once Every 4 Years: the Electoral College Calculator

5 min read Original article ↗

mankins

Votetastic 2024, updated (almost) every election in the smart phone era.

Roughly every 4 years I’ve been releasing an electoral college calculator called Votetastic. It’s time for the 2024 version, now available on the App Store. Go get it, it’s free election fun.

Press enter or click to view image in full size

https://apps.apple.com/us/app/votetastic-2024/id1530432802

A Quick Electoral College Primer

For those of you outside of the US (or who need a refresher), the Electoral College is a system established by the United States Constitution to elect the president and vice president of the United States. It meets every four years solely for this purpose.

The Electoral College consists of 538 electors. To win the presidential election, a candidate must receive an absolute majority of at least 270 electoral votes.

On presidential election day, which is the Tuesday after the first Monday in November, each state counts its popular votes according to state laws to determine its electors. In 48 states and the District of Columbia, the candidate who wins the majority of the statewide vote receives all of that state’s electors. In Maine and Nebraska, two electors are allocated based on the statewide vote, and the remaining electors are distributed based on the vote in each congressional district.

Each state’s number of electors equals the number of its representatives in the House plus two electors for its senators. The number of representatives is determined by the state’s population, which is measured every ten years by the U.S. Census. As of the 2020 Census, each representative represented an average of about 740,000 people.

And why would you need an Electoral College Calculator?

Electoral College calculators like Votetastic help you simulate different electoral scenarios. You can click on the map to change the winner for a given state. Clicking again will switch the winning party.

Because of the “winner take all” of many of the states, and with each state having a different population, it can be easier to have software, like the Votetastic app, help with the math (as well as complications like the split electors possible in some states like Maine and Nebraska).

Votetastic also allows you to load in historical data, such as the 2020 or 2000 elections, to have a starting point for your calculations. You can play with the data and ask questions such as “What if everything was the same as in 2016, only Trump won California?” (answer: the outcome would be the same, but the Republicans would win by 92 electoral votes using the most current counts).

You might also want to look at current polling trends which Votetastic allows. If a race is tight (within 1%) we’ll leave it at undecided and you can fill it in with your best guess.

Press enter or click to view image in full size

Developing Every Four Years

This version marks the first time that I was able to substantially re-use code from an earlier version. Normally I’d write something for one election, and then by the time four years comes by it won’t build, a library is no longer maintained, or Xcode spits out too many errors to make it worth the effort of fixing the build error. This would mean that I’d basically start from scratch every four years, re-using graphics at the most:

original Votetastic logo

React Native and NPM to the Rescue

Luckily in 2024 the ecosystem has stabilized and after upgrading React Native to version 64.4 everything started to build. NPM found modern updates to the libraries used, and for the most part the core app built–a real miracle for software that gets picked up once every four years.

I was then able to update the electoral counts and the candidates, adding Harris/Walz for the Democrats and changing the VP for the Republicans to Vance. For the most part it was an easy upgrade.

No Android Support

I’m not sure what happened in 2020, but I did quite a bit of work to support Android builds. Unfortunately that platform saw minimal downloads and revenue, so I discontinued it for 2024.

Maintaining for the long run: We need a new monetization model

I’m amazed at the number of hours it takes to maintain open source code. Even for a small app like this there are tens of libraries involved and hundreds of developers who have contributed their time. From just this small experiment I can see how much I depend on others and how we all need a way to get more people into open source coding.

If you’re interested in supporting open source maintainers and the libraries you depend on, check out my work at Semicolons.com which aims to move money towards those maintainers.

Try it out, Let me know what you think…and VOTE!

For those of you who have purchased in the past this will be a free re-download. For new users Votetastic is free to download (at least at the time of this writing) and has an upgrade for premium data.

And remember to Vote!