Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

adding odds without incorrect math#53

Open
chrisbellande wants to merge 1 commit into
joshpelkey:devfrom
chrisbellande:feature/odds
Open

adding odds without incorrect math#53
chrisbellande wants to merge 1 commit into
joshpelkey:devfrom
chrisbellande:feature/odds

Conversation

@chrisbellande

Copy link
Copy Markdown

I'm bored, so doing this again. The user experience could probably use a little work since this is pretty backend-friendly (I'm also very backend-friendly, if you catch my drift)...maybe could build out like a little helper so that they can pick the odds visually and then use that to calculate the decimal value or something. Or just assume that people using this aren't dumb and know what odds are

Concerns:

  • floating point calculations (e.g. will it think that an odds value is != 1 when it should be one and change the transaction amount). Probably not, and even if so the change would be negligible since money is only relevant to two decimal places
  • John's golf swing and lack of distance
  • Trump

@joshpelkey

Copy link
Copy Markdown
Owner

My main concern here is also John’s golf swing and lack of distance. Also that the data model stores current balance and overall winnings as integers. I see you gitignored vscode but LOL’d tests. Did you try this out? Overall it looks pretty solid. Id like to make it more UI friendly but we can try it in dev without that. Ill let you know if it goes up (thats what he said).

@chrisbellande

Copy link
Copy Markdown
Author

Should be pretty straightforward to migrate the winnings to a decimal field though right? That is probably better in general for a currency field anyway. I didn't try it out bc I didn't feel like going digging around with the steps to get it running locally...would i just need to grab the stuff in requirements.txt? Might be able to setup with a package manager at some point to make dev process easier

@joshpelkey

Copy link
Copy Markdown
Owner

Yeah should be easy, but not as easy as just pulling your changes lawl. You can get setup by:

  1. mkvirtualenv to create dev environment
  2. pip install -r requirements.txt to install all reqs
  3. Set up mysql db (i can send you an export if you wanted more data)
  4. Create local_settings.py with db info, etc (i can send example)

I could probably put this all ina container somehow and make it much easier, but have never done before. GCP might even do it for me....might look into it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants