Introduction
This week I got my third pull request for hacktoberfest merged. As far as projects go, this one interested me the most as it was a program made for a specific purpose. The program is designed to "cheat" at the game wordle, a game that makes the user guess a 5 letter word by inputting letters one at a time. It "cheats" at this game by asking the user for an input and searching through a dictionary of thousands of 5 letter words that contain the letters guessed so far. This project was interesting, and I wanted to contribute to it in a meaningful way.
The Issue
Here is the link to the issue:
https://github.com/bodonovan/wordle_cheat/issues/3
For the issue, I needed to find a better dictionary for the project to pull from. The project had a dictionary containing hundreds of thousands of English words to pull from. The problem is that the dictionary did not contain enough words, and sometimes the program would not be able to find the correct associated wordle word. My task was to go online and find a better dictionary somewhere online, then update the code accordingly.
I managed to find a text file in an online repository that contained around 300k English words. For comparison, the old dictionary had around 200k words. I simply replaced the file, then ran the file "extract.py" which takes every 5 letter word from the dictionary and puts them in a separate text file. This file ended up having noticeably more words in it as a result.
Completing the pull request
Once I added these changes, I created a pull request and informed the maintainer that I added the change. The same day, the maintainers merged the pull request. I did have to ask them to make the repo hacktoberfest accepted, as they actually didn't know what the event was prior to this. So I'm glad I was able to introduce them to it, maybe they'll partake in it next year.
https://github.com/bodonovan/wordle_cheat/pull/4
Conclusion
Overall I am thankful I was able to get another pull request approved. This pull request was more challenging than the last 2 as I had to understand how the program worked and do some research into finding a proper new dictionary. But luckily I managed to complete it, and I just have one more pull request to go!
Top comments (0)