Inspiration
We realized many developers, especially beginners, struggle to get engaging, constructive feedback on their code. Traditional code reviews can feel slow, intimidating, or boring. The idea for RoastMyCode came from the desire to combine learning with humor — letting coders see their mistakes in a fun, memorable way while still receiving valuable improvement tips.
What it does
RoastMyCode allows users to paste a code snippet and receive a light-hearted AI-generated “roast” along with a short improvement suggestion. It provides immediate, witty feedback that helps developers understand errors, bad practices, or inefficiencies in their code, all in a fun, gamified experience.
How we built it
I built RoastMyCode using:
- Python 3.10+ for the backend logic.
- Gradio UI to create an interactive interface for code submission.
- Hugging Face Transformers with the mistralai/Mistral-7B-Instruct-v0.2 model for generating roasts and improvement tips.
- Pygments for syntax highlighting of the submitted code.
- The system works by taking the user’s code, sending it to the AI model to generate a roast and tip, and then displaying it with syntax highlighting.
Challenges we ran into
- Crafting AI responses that are funny but not offensive.
- Handling multiple programming languages and diverse code structures.
- Optimizing performance to generate quick responses from large code snippets.
- Designing a UI that feels playful yet intuitive for users.
Accomplishments that we're proud of
- Successfully integrated Hugging Face inference for real-time AI feedback.
- Built a multi-language friendly, syntax-highlighted code interface.
- Delivered both educational and entertaining value in one tool.
- Created a fully deployable demo without requiring API keys.
What we learned
- How to use Hugging Face models effectively for interactive applications.
- Techniques for parsing and highlighting code dynamically.
- Balancing humor and constructive feedback in AI outputs.
- The importance of simplicity and engagement in UI/UX design.
What's next for RoastMyCode — AI Code Roaster
- Expand support for more programming languages and frameworks.
- Add a scoring or gamification system to track coding improvement.
- Integrate with GitHub or VS Code for real-time roasting during development.
- Enhance AI suggestions with optimization tips, best practices, and educational resources.

Log in or sign up for Devpost to join the conversation.