Git Product home page Git Product logo

wednesday-world-cup's People

Contributors

jackonelli avatar

Watchers

 avatar  avatar

wednesday-world-cup's Issues

Wrong order of db migrations

The current migrations create table games before table teams, forcing the removal on foreign keys dependencies of games to teams.

I think the easiest way to do this is to remove all migrations and re-add them in correct order.

Preds are added not updated

When saving preds, the preds coming from the UI is the official version of the truth. Any conflicting pred in the database should be updated. Currently we just keep adding predictions.

Static order of all games

UI currently lists first played, then unplayed games. It would be nice to group them together, sorted on date or whatever.

Benchmark

Learn how to benchmark, did it a bit for AOC but learn properly.

Diesel conventions

Follow diesel conventions for table names and keys, foreign keys. Make life simpler.

  • group_game_map --> group_game_maps
  • random foreign key names: id for prim. key, table name for foreign key (but singular.), e.g. foreign key id in table games should be game_id

License

Reminder to properly set up a license. I would like it to have GPL, but that seems scary.

Playoff data structure

Implementation of playoff logic.

  • Populate first round from groups, nb. must be able to handle partially finished groups. No, the order is strict even with no games played. In practice, we will always have a group order, although it may be random (Fifa rules) or deterministic, indep. of played games (Uefa ranking).
  • Playoff representation (List of lists? Tree? Linked list?)
  • Play/unplay games.
  • Propagate result, i.e. populate the next round with the winners from the previous.

Group updates on every input

Not a bug technically, the group order can be random. But it is a bit flickery when the list shifts as you enter scores.

The `UnaryStat` team map calcs can possible be more effiicent?

Really any function that pre-allocates a team struct could be made this way instead.

Original source code comment for this trait.

This could perhaps be more efficient with the cool group by
https://docs.rs/itertools/0.10.0/itertools/trait.Itertools.html#method.into_grouping_map
i.e. don't fold but map all games to (team_id, stat), then eff. fold to team stats map.

Beware though:

  • All team id's must be present in the final map. If no played games involve a team it will not appear in the map. This extra check might negate the perf. increase.
  • Must benchmark.

Fuzzing

This type of application is ideal for fuzzing since we have so many invariants that we (believe) are correctly encoded in the type system.
This blog post:
https://tiemoko.com/blog/diff-fuzz/
is a nice introduction to fuzzing and I would like to try it out, as a learning exercise.

More spicy prediction score type

In the module core/src/pred_score.rs I have defined a simple version of the prediction score.
This module is pedagogically commented to explain all the rust quirks that go in to creating another score,
with the intent of making this a good first issue if someone else wants a crack at it.

It's mostly for this intro purpose that a new score should be created; it's not necessary for a first working app but it's simple, isolated and well documented.
In the end, it's still useful since one of the motivations for doing this is to have more control over the scoring process.

No panic

Remove all panics except the non-reachable ones, which instead should be documented.

OPTIONS before POST

When doing a POST command (save_preds) in the UI the server first routes to a OPTIONS route, fails that and then does the post. Doesn't seem to have any impact but it is annoying.

Hacky input format

The input basically follows a regex: "\d+-\d+" which evaluates greedily.
Having written "9-", if the next character is a digit, the page is uploaded with the score.
Basically, you cannot give the away team a two-digit goal count. You can work around it by adding a dummy non-digit and the prepend with the correct score. Silly, but it works.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.