Inspiration
The inspiration came from the idea that coding often feels like a lonely endeavor. Why not add some "social validation"? Just as a great restaurant deserves a 5-star review, a well-written function should be celebrated—and a messy one, well, it might get a roast. We wanted to add a layer of humor and personality to the daily development routine.
What it does
- Dynamic Reviews: Scans for function patterns and displays a star rating and comment using VS Code CodeLens.
- Tone Modes: Choose between
funny(default),roast(for the thick-skinned), orserious(for actual engineering feedback). - Review History: Click on any review to see previous critiques for that function.
- Custom Reviews: Feeling inspired? Add your own custom reviews to any function.
How I built it
I built this using TypeScript and the VS Code Extension API.
- CodeLensProvider: Used the
vscode.CodeLensProviderto inject reviews directly above functions without modifying the source code. - Regex Matching: Implemented a robust regular expression to detect standard
functiondeclarations and modern arrow functions. - State Management: Used simple in-memory
Mapstructures to track review history and the current active review per function. - Randomization: Implemented a template system where the probability of a "meme" review appearing is $P(\text{meme}) = 0.02$.
Challenges I ran into
The biggest challenge was crafting a regex that accurately captured various function styles (async, exports, arrow functions) without false positives. Another hurdle was ensuring the CodeLens would refresh correctly when a user selected a review from the history or changed the configuration.
Accomplishments that I'm proud of
I'm particularly proud of the "roast" mode—it's genuinely funny to see your complex logic compared to "spaghetti." Achieving a seamless integration that feels like a native part of the editor was also a major win.
What I learned
I gained a deep understanding of the VS Code Extensibility model, particularly how to use CodeLens to provide non-intrusive metadata. I also learned a lot about the nuances of JavaScript/TypeScript syntax trees vs. regex-based parsing.
What's next for it
- LLM Integration: Use Gemini or another LLM to provide context-aware reviews that actually understand what the code is doing.
- Multi-language Support: Expand beyond JS/TS to Python, Go, and Rust.
- Team Reviews: Allow team members to share and vote on function reviews in a collaborative workspace.
Log in or sign up for Devpost to join the conversation.