Syntaxtic | Final Project | CS50's Python

Syntaxtic | Final Project | CS50's Python

Description:

I believe that getting hands-on with new syntax can be a fun and effective way to learn. That's why I've put together SYNTAXTIC, an app where users can type out code snippets and get instant feedback. Just as example for now used some prewritten code from Python libraries like Pandas and TensorFlow and it can be expanded to other languages and libraries.

Features:

Real-time feedback: Right keystrokes turn green, wrong ones turn red.

Scoring system: Measures your WPM (Words Per Minute).

Expanding library: Starting with Pandas and TensorFlow, with plans to add more.

Technical Details:

The app is initially created in Python, making use of the curses library. While this isn't a complete graphical user interface, it serves as a provisional solution until the app can be re-engineered using a more robust framework. Object-Oriented Programming principles are employed both as a learning exercise and to simplify the addition of future features and extensions.

Code Example: How Keystroke Feedback Works


def display_text(self, stdscr):
    stdscr.addstr(self.target_text)
    stdscr.addstr(1, 0, f"[W][P][M]: {self.wpm}")

    for i, char in enumerate(self.current_text):
        correct_char = self.target_text[i]
        color = color_pair(1)
        if char != correct_char:
            color = color_pair(2)
        stdscr.addstr(0, i, char, color)

Future Enhancements:

Short-term: Address existing bugs and introduce an in-depth scoring system.

Medium-term: Roll out modular sections for detailed line-by-line code commentary and example code segments.

Long-term: Explore integration with machine learning models for enriched user interaction, possibly leveraging OpenAI's API or Hugging Face technologies.

Outstanding Tasks:

Items requiring attention:

  • Resolve backspace functionality issues
  • Incorporate a comprehensive score/penalty system
  • Enable new line insertion irrespective of character accuracy

Extend functionality to offer detailed explanations of specific code lines.

Add modular sections that showcase example code blocks relevant to the user's current task.

Introduce a selection menu at the start screen, enabling users to pick their preferred programming language or library.

Investigate the feasibility of implementing AI-powered responses, considering options like Hugging Face or other Transformer models.