Logo

dev-resources.site

for different kinds of informations.

Release 0.4 Release

Published at
12/7/2024
Categories
rails
github
opensource
Author
aamfahim
Categories
3 categories in total
rails
open
github
open
opensource
open
Author
8 person written this
aamfahim
open
Release 0.4 Release

For this week I was once able to work on one more issue, despite my reservations about having enough time to work on a issue with couple final exams on the calendar this week.

Investigation

When I was looking for issues I found this issue interesting. The problem is when searching on the search bar the recommendations were the oldest talks, instead it would make more sense to just show newer talks. There was a recent PR that implemented a global search. I thought this issue was addressed since it uses spotlight search. But after some investigation I found the issue was still present. So I dove into the code base seeing that new global search uses something called spotlight search that uses turbo. So after some digging I found the talk controller under spotlight. After reading the code I realized I can just sort it by date attribute and since it shows the first 5 it'd be the right fix.

Aftermath

So, I made my PR, one of the maintainer thanked me for the catch and recommended that I do the same for events since it shows the oldest events as well. So after the change I was waiting for further feedback. The owner mentioned that talks implementation for spotlight search can be made better. There is a scope called ranked that uses the keyword presence in title and description to create ranking. It also made sense to show relevant results(ranked) rather than the first 5 of the newest talks. He also gave me suggestions on updating the implementation as well. They use BM25 algorithm to create the ranking. We could also include how old the talk is to update ranking. For example, we can penalize newer records using a scale. Another suggestion was to use talk date as tie breaker when ranking(bm25 score) is the same.

I tried the first recommended scope and I still got the newest records in all cases, while the second recommendation had a mix of newer and older records in some cases. I played around with the given multiplier for the first recommendation, but I didn't see any significant changes. So I informed the owner about my finding. He made a new PR to show me how the bm25 ranking works and updated the multiplier as well. In my testing I went as far as 0.000001 but in the PR I noticed he used 0.000000001. And I did notice better results. After the update, and some waiting my PR was merged.

Finish Line

This was a great experience. Working in production ready codebase lends to a great learning opportunity. Knowing Git and GitHub made my life a lot easier. I'm proud of what I was able to accomplish in just 4 months. I got to interact with a lot of new codebase and was genuinely surprised how nice everyone was. Although sometimes waiting for the response was a bit boring but it was really nice. Looking at previous PRs is also a great help on how the code base in handled and how the code is written. Overall, it was pretty good.

rails Article's
30 articles in total
Favicon
Rails Self-Join Tables - Parent-Child Magic
Favicon
Ruby on Rails 8 API not allowing mobile phone connection
Favicon
Unable to find Ruby class that definitely exists
Favicon
Ruby on Rails: Your Service Layer is a Lie
Favicon
Devise not accepting JSON Token
Favicon
Ruby on Rails - Calculating pricing based user's purchasing power parity
Favicon
Ruby on Rails 8 - Frontend Rápido Usando Tailwind como um Frameworks CSS Classless
Favicon
Use cases for Turbo's Custom Events
Favicon
Docker in development: Episode 4
Favicon
[Part 1] Rails 8 Authentication but with JWT
Favicon
Easy Custom Pagination: Paginator Fancinator!
Favicon
Just committed to learning ruby for sonic pi and rails https://dev.to/highcenburg/2025-roadmap-mastering-ruby-for-sonic-pi-and-rails-696 wish me luck!
Favicon
Best Tech Learnings of 2024
Favicon
Rails 8 CRUD: Modern Development Guide 2025
Favicon
When Controllers Take on Too Much Responsibility
Favicon
Ruby on Rails 8 - Frontend Rápido com Frameworks CSS Classless ou Class-Light sem CDN
Favicon
Docker in development: Episode 3
Favicon
Brakeman LSP Support
Favicon
Release 0.4 Release
Favicon
Ruby on Rails for AI Chatbot Development: Why it is Ideal Choice in 2025?
Favicon
A Deep Dive into append_view_path and prepend_view_path in Ruby on Rails
Favicon
Rails Testing for Financial Operations
Favicon
Docker in development: Episode 2
Favicon
Rails transactional callbacks beyond models
Favicon
Deploying Rails 8 Applications: A Complete Guide with Docker, Kamal, and Cloudflare
Favicon
Add Invite to Rails 8 Authentication
Favicon
Vaga Desenvolvedor Jr - Ruby on Rails - Híbrido
Favicon
Kamal 2 Quick Start - the missing tutorial
Favicon
How to order attributes on HTML elements
Favicon
Release 0.4 Progress

Featured ones: