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

Algo vs filter #84

Open
eric-burel opened this issue Feb 12, 2024 · 2 comments
Open

Algo vs filter #84

eric-burel opened this issue Feb 12, 2024 · 2 comments

Comments

@eric-burel
Copy link

Hi,
I feel like naming the example algorithm whats-alf can be confusing as well as the following part of the readme:

1. Implement indexing logic in `src/subscription.ts`. 
   
   This will subscribe to the repo subscription stream on startup, parse events and index them according to your provided logic.

2. Implement feed generation logic in `src/algos`

   For inspiration, we've provided a very simple feed algorithm (`whats-alf`) that returns all posts related to the titular character of the TV show ALF. 

When you look at it, it's actually an algorithm that show the latest posts. The logic that filters ALF related posts is actually living in the subscription, when messages are indexed.

This makes sense because for simple feeds, you'll probably want to index as little as possible, so most of the filtering will happen there.

The change I would propose would be:

  • renamed the algorithm whats-alf to latest
  • explaining that the subscription is a first level of filtering to get the post that have great chances to be relevant, and that optionally a second level of finer-grained filtering can be implemented in the algorithm

What do you think?

@Rapti
Copy link

Rapti commented Oct 23, 2024

I was confused by this as well when looking through the example code and would welcome the proposed changes.

@himynameisdave
Copy link

Thought I was going crazy... algos/whats-alf doesn't contain any of the good stuff! It's confusingly over here.

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

No branches or pull requests

3 participants