feed-generator icon indicating copy to clipboard operation
feed-generator copied to clipboard

Algo vs filter

Open eric-burel opened this issue 2 years ago • 3 comments

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?

eric-burel avatar Feb 12 '24 08:02 eric-burel

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

Rapti avatar Oct 23 '24 17:10 Rapti

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

himynameisdave avatar Nov 06 '24 23:11 himynameisdave

Oh so its not just me! 100% agree.

conor909 avatar Jan 06 '25 17:01 conor909