DEV Community

CornSnek
CornSnek

Posted on

Creating Recommendation Software Portfolio Project

Recommended Language Project

This project is to create a terminal program on python for https://www.codecademy.com as part of my Portfolio Project: Creating Recommendation Software project. This project is about getting recommendations of languages based on the categories the user chose.

To start the program, type in the shell python script.py

The project page: https://github.com/CornSnek/computer_language_recommendation

I have used the wikipedia page https://en.wikipedia.org/wiki/List_of_programming_languages_by_type as data for my project. The data was parsed by reading each header file, creating an enum number from that header, and extracting the hyperlinks from each header. There were some trial-and-error to extract the language names correctly without Python throwing exceptions due to "Out of bounds" errors or logical errors.

I have used 3 algorithms I have learned from Codecademy that are used to parse and output data. One algorithm was the binary search, which was used to get the category enum number from each language (A language can have more than one category, and the category enum numbers are sorted from lowest to highest). The second algorithm was the Knuth–Morris–Pratt algorithm (KMP algorithm). This was used to search each languages/categories if they match. The last algorithm were heaps and heapsort. Heapsort was used to order each language from the Wikipedia in alphabetical order. Out of the 3, Heap/heapsort was the trickiest to implement and unit test to get passing tests.

Top comments (0)