Inspiration

The inspiration for our project, SnippetSeeker, emerged from a deep commitment to supporting first-generation low-income students in their coding journeys. Recognizing the challenges that these students often face, including limited access to learning resources, we wanted to create a tool that could empower them to excel in the coding realm.

Many first-gen students are driven to learn coding as a means of securing better opportunities, yet they often lack the financial means to invest in expensive coding courses or attend coding boot camps. We were inspired to bridge this gap by providing them with a tool that facilitates their learning. Our aim was to level the playing field and enable these students to thrive despite their financial limitations.

What it does

SnippetSeeker is a Python application designed to enhance developers' productivity. The library leverages web scraping techniques to extract code snippets from W3Schools. When users enter a keyword related to their coding challenge, the program finds all code snippets in its database directly relevant to the keyword. It then presents these code snippets to the user through Gradio, saving them precious time and effort in searching for and adapting code examples from online resources.

How we built it

We built SnippetSeeker using a combination of Python and web scraping libraries. We chose to focus on W3Schools due to its extensive collection of tutorials and code examples. We used libraries such as BeautifulSoup for parsing HTML content and Requests for fetching web pages. Our project workflow included:

  1. Web Scraping: The library sends a request to w3schools' search page, retrieves the HTML content, and extracts relevant code examples by analyzing the HTML structure.

  2. Keyword Processing: When a user provides a keyword, the library sanitizes and formats the keyword for search.

  3. Code Extraction: We applied simple keyword matching to identify and extract code snippets associated with the provided keyword.

  4. Gradio Presentation: The library then presents these extracted code snippets to the user through Gradio, allowing them to choose the most appropriate one for their needs.

Challenges we ran into

During the development of SnippetSeeker, we encountered several challenges:

  1. Web Scraping Complexity: We had no prior experience with web scraping and had to refine our scraping methods to ensure accurate and consistent results.

  2. Code Relevance: Determining the relevance of extracted code snippets was challenging. We had to implement algorithms that could accurately filter out irrelevant examples.

  3. Presentation: It was challenging to find the best way to present this project to a user within a short timeframe. Gradio offered a convenient and reliable implementation of a UI prototype.

What we learned

Developing SnippetSeeker was a tremendous learning experience for our team. We gained insights into:

  • Simple web scraping techniques and their challenges.
  • Algorithms for determining search keyword relevance.

What's next for SnippetSeeker

We have exciting plans for the future of SnippetSeeker:

  1. Expanded Platform Support: We aim to extend our library's compatibility with other reputable coding tutorial websites, broadening the range of available code examples.

  2. User Customization: We want to empower users by allowing them to customize their code searches based on programming languages, frameworks, and specific use cases.

  3. Integration of ChatGPT API: We're planning to integrate the ChatGPT API to enhance the search experience by allowing the user to prompt the program with natural language.

SnippetSeeker has the potential to evolve into an indispensable tool for programmers, aiding them in learning and implementing code more efficiently.

Members

Andy Yu

I’m a Canadian high school student with three years of programming experience, starting with Python and currently exploring PyTorch and SwiftUI. Passionate about creative writing, making games on itch.io, and jazz saxophone.

Estella Tang

I’m a high school student with four years of programming experience, starting with Python, and currently working on exploring data science and learning to use large language models/fine-tuning them. Passionate about debating, figure skating, and anime.

Share this project:

Updates