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

Abstract out the matching algorithm architecture to allow other types of comparisons #685

Open
geekygirlsarah opened this issue Oct 2, 2023 · 2 comments
Labels
Experience: Backend hacktoberfest Good issue for someone to work on for Hacktoberfest help wanted We'd love to have help working on this issue python Pull requests that update Python code Type: Enhancement

Comments

@geekygirlsarah
Copy link
Member

geekygirlsarah commented Oct 2, 2023

Description

While comparing programming languages was the original purpose of Code Thesaurus, the goal was to enable other types of searches for things. This could include things like:

  • SQL (compare MySQL SQL vs PostgreSQL SQL vs SQL Server T-SQL, SQLite, etc. but also those compared to NoSQL (like MongoDB, Cosmos DB, etc.))
  • Algorithms (how to implement linked lists, Dijkstra's, breadth- or depth-first traversals but in each programming language)
  • Testing frameworks (how to do asserts in common testing libraries for various languages)
  • REST frameworks (like comparing how to do REST methods or other things in Django, Rails, Symfony, MVC, etc.)
  • Package managers (both language based ones like npm, pip, composer, cargo, etc. as well as system ones like apk, apt, rpm, homebrew, chocolatey, winget, etc.)
  • And more!

Right now the main matching algorithm is hard-coded for languages. It is also heavily tied into the reference and compare page views. This work would need to refactor the algorithms out of the views and into their own class, and also refactor the variables to be more generic for any types of comparisons. The end result would be something that's easy to add a new comparison type to the home page and with new views and thesaurus files, we have an easy way to scale this concept to multiple comparison types.

Requirements

  • First, it may require a discussion here on how to do this before the work happens.
  • Second, it should result in the code refactoring and/or abstraction. (Pull it out in a class/library?)
  • Third, ensure the view code is rewritten using the new method.
  • Finally, check that any unit tests, the language validation command, and the meta file validation command reflects the new abstracted system.

Additional Notes

I haven't thought too much on this yet but will probably start looking into it during October 2023 (Hacktoberfest). I welcome anyone that wants to join in on this!

@geekygirlsarah geekygirlsarah added Type: Enhancement help wanted We'd love to have help working on this issue hacktoberfest Good issue for someone to work on for Hacktoberfest Experience: Backend python Pull requests that update Python code labels Oct 2, 2023
@geekygirlsarah geekygirlsarah added this to To do in CodeThesaur.us Website via automation Oct 2, 2023
@seabeePraveen
Copy link

hello @geekygirlsarah i have gone through the above mentioned detail but im not able to figure out whats the issue is.
could u please explain the issue?

@geekygirlsarah
Copy link
Member Author

geekygirlsarah commented Oct 26, 2023

@seabeePraveen sorry, I meant to write back and lost the tab I opened in a sea of other tabs!

The algorithm right now is heavily tied to the specific language compare and language reference view code. They are also written very specific to language lookups. Those algorithms need to be refactored out into their own class or something so that other types of lookups could happen (by their own views and thesaurus files) but also so the algorithm is written more generically in how it compares things.

I updated the issue's wording a bit too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experience: Backend hacktoberfest Good issue for someone to work on for Hacktoberfest help wanted We'd love to have help working on this issue python Pull requests that update Python code Type: Enhancement
Development

No branches or pull requests

2 participants