Power Poker odds calculator UI

The first "professional" project I created was a poker probability calculator (specifically, for Five Card Draw). It would take in a poker-hand, tell you the odds of various outcomes, and even suggest an optimal strategy - however:

  1. Its UI was hideous.
  2. Its back-end was hideous.
  3. And the connection between them was sticky at best.

Even though it was 100% accurate, it got an amazing 2 sales. I suspect the amateur design left potential buyers underwhelmed (and actual buyers weren't about to give it a 5-star review based on its lack of speed).

I've published the source code so you can see all of Power Poker's flaws for yourself...

And yet I'm still considering bringing it back to life! Why? First of all, so you can avoid my mistakes. But there's more, so read on and you'll see.

Why revive the Poker Calculator?

Implementation of this single program was messed up in so many places, that without ever changing projects we can use it to teach you how to:

  • Compare and contrast good and bad code in general.
  • Write clean-code. Everything from naming conventions, to architectural decisions.
  • Connect up an MVVM design, avoiding a clunky UI.
  • Use threading to speed up execution and un-stick your UI.
  • Take advantage of approximations over brute force.
  • Avoid no-nos, like overusing new concepts (I abused Generators having just learned about them).

I stumbled onto it's source code in a backup repo, and it made me realize how much I had learned since creating it. For example, I now know how bad this is:

Bad poker probability calculator code

If you can't spot the flaws there, the course I want to build from this might be for you. I'd like to use Power Poker's corpse to share as much of what I've learned as possible. Let me know in the comments if you're interested in a course like this, what you'd like to get out of it, or if you'd just like to see more snippets of how not to code (like that lovely nested loop).