Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(work-in-progress) Classes, user-defined filters, cards can block other cards #108

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

cashpw
Copy link
Contributor

@cashpw cashpw commented Apr 11, 2023

This pull request contains changes addressing:

  • Adding classes org-fc-card, org-fc-position, org-fc-review-session, and org-fc-review-session-rating
  • Allows users to define custom filters to reduce the set of positions for review
  • Allow cards to block other cards

I've included everything in one pull request as it's become a hassle to maintain separate pull requests here and a merged branch for my own local config. I'm happy to split it up when the time comes to merge things in. This pull request can serve as a center for review in the meantime.

Regarding #106 (comment): I think my changes to how cards/positions are shuffled should resolve this concern.

TODO:

  • Add tests
  • Integrate custom filters in with context objects

Adds and integrates `org-fc-card`, `org-fc-position`,
`org-fc-review-session`, and `org-fc-review-session-rating` classes.
Adds `org-fc-review-position-filters` which users can configure to
customize the positions that appear in their review.

Example use cases:

- Limit the number of new positions per review
- Only include one position with a specific tag
- Only include one position per file
Use a box value of -1 to indicate a new (never been reviewed) position.
Consider three cards:

1. card-A with an ID of `card-a-id`
1. card-B with an ID of `card-b-id`
1. card-C with an ID of `card-c-id`

The user can set card-B as blocking card-A and card-C by setting the
`FC_BLOCKED_BY` property on cards A and B to `card-b-id`.

Alternatively, the user could set card-A and card-B as blocking card-C
by setting the `FC_BLOCKED_BY` property on card-C to `card-a-id,card-b-id`.
@cashpw cashpw changed the title Classes, user-defined filters, cards can block other cards (work-in-progress) Classes, user-defined filters, cards can block other cards Apr 11, 2023
@l3kn
Copy link
Owner

l3kn commented May 25, 2023

Thanks for all this work!

I'll go over what I think are the main components of this and review each.

Classes

I like the idea and implementation of the classes.
Instead of using one file for each class, we could e.g. card and position to org-fc-core.el and the review related ones to org-fc-review.el. As org-fc is already split into many larger files I'm fine with either way.

In case different spacing algorithms (with different parameters to track) are supported at some time,
we might need to either add a "spacing parameters" field to each position or subclass them for each algorithm,
but that can wait.

Blocking Cards

Because I can't see how I would use this in my learning workflow, I don't have an opinion on this.
Using IDs to identify blocking cards seems like a good choice and restricting blocking cards to the same file is a reasonable restriction based on the current cache implementation.

Identifying New Cards

What if instead of adding a new -1 box, we used box 0 only for new cards?

Currently when a review fails, the card back to box 0 (with an interval of 0),
but I'm not sure that's reasonable.

Here is a nice explanation of the algorithm / scheduling used by Anki:
https://www.juliensobczak.com/inspect/2022/05/30/anki-srs.html
There are a number of differences to the org-fc algorithm but
one thing stands out to me is that failing a review moves a card to the org-fc equivalent of box 1 instead of box 0.

Doing the same in org-fc seems like a very small change that would solve a few problems at once.

@l3kn
Copy link
Owner

l3kn commented Jun 20, 2023

I think I'd like to get started integrating the classes for cards and positions but I'm not sure how to best do so,
maybe combining the relevant commit with the changes currently on the develop branch.

As these are significant changes, do you want an "Author:" line in the affected files?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants