Codecademy Portfolio Project: Recommendation Software

John Kingham - Feb 21 - - Dev Community

This project was part of Codecademy's Computer Science "career path", and it comes at the end of a number of lessons on linked lists, queues, stacks, hash maps, trees, graphs, plus various searches like breadth-first and depth-first.

The point of this project was to bring some of that together into a slightly larger project, where you can put your recently acquired knowledge to the test and build some coding muscle.

As requested by Codecademy, my version uses a command line interface, and here it is in all its glory:

Music recommendation engine screenshot

We were asked to use some of the data structures we'd recently learned, so I choose hash map and linked list.

Here's a very brief summary of my design:

  • It's a music recommendation engine.
  • It's written in Python 3.
  • The data is stored in a csv file, which I populated with fictional data provided by GitHub's Copilot.
  • A MusicDatabase class loads that csv data into a HashMap, where each key is a category name and each value is a LinkedList.
  • Each Node in the LinkedList points to an Album dataclass object. The data in the csv file is used to create those Album objects.
  • I also ended up using type annotations, which proved to be more hassle to write but also more closely aligned with statically-typed languages I've worked with before, such as Java, C# and IBM RPG.

Functionally, it works like this:

  • The user can enter a full or partial category name as a search string.
  • If there's an exact match with one category then that's their chosen category.
  • If their search matches several categories, they're shown a list of the matching categories and asked to choose one.
  • Once the user has chosen a category, they're shown a list of album data for that category and asked if they want to search again or quit.

The code is available here on GitHub.

In conclusion, this was a useful project because it helped to grease my coding wheels, which are very rusty.

.