diff options
author | Anthony Wang | 2022-03-28 21:15:44 -0500 |
---|---|---|
committer | Anthony Wang | 2022-03-28 21:15:44 -0500 |
commit | 46c565b6195f5ef14fa4602c46fa0da1a43ad1bb (patch) | |
tree | bf632180406463a831057c5fd5d2c5fe207bb80e | |
parent | a6647501a6dd322a0f6b2c54d802e5ad76eff393 (diff) |
Add a usage section to README
-rw-r--r-- | README.md | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2,6 +2,14 @@ Very efficient flash cards app using Go and SQLite +## Usage + +Flash cards are stored in the `cards` table of a SQLite database. There are four columns: `idx INTEGER PRIMARY KEY, weight INTEGER, key STRING, val STRING`. The `idx` is a unique index for each card, starting at 0. The weight is how often the card should come up. The key and value are the front and reverse sides of the card. You can use the `sqlite3` CLI to create a card deck. + +Now build this project with `go build` and run `./sd` to enjoy a fast flash cards experience! + +If you're wondering where the name came from, I named this app after a common type of flash card. 😀 + ## Performance SD is designed to be extremely efficient in order to support a very large number of flash cards and should be able to handle several billion cards with ease. If `N` is the number of cards, initializing the program requires `O(N)` time and `O(N)` memory. Selecting a random card and adjusting its weight based on if the user got it correct requires `O(log N)` time. |