wednesday-world-cup's People
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.
Draft Better (/Player/User)
- Struct in core
- Db table
- CLI for add/remove
- UI reads default better's bet and updates on input.
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.
Group game -> group mapping incorrect
Benchmark
Learn how to benchmark, did it a bit for AOC but learn properly.
Follow api guidelines
Follow the set of rules proposed here: https://rust-lang.github.io/api-guidelines/
Especially for core
Low hanging fruit are sections documentation and naming.
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 keyid
in tablegames
should begame_id
License
Reminder to properly set up a license. I would like it to have GPL, but that seems scary.
Unplay (group) game
Pretty CSS
Port this (or some other stuff to the seed code)
Fairplay ordering not working
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.
Use seed for frontend
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.
Unecc.(?!) alloc in `wwc_ui::get_groups_as_unplayed`
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.
Authentication
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.