Inspiration
At first, I wanted to make a developer tool that has a senior developer judging your code so I thought it would be a good idea to implement Jason Wilder's coding standards sheet as a layout for senior developers. Then I realized as I was coding that not all senior devs code like Jason, so I pivoted the idea to have Jason to check your code instead
What it does
It's a web app and a cli tool that reviews code against Jason's coding standards and scores it out of 100
scoring system is Python-side and only the AI finds mistakes and assigns it small to Critical. Python applies a return formula making the same code usually get the same score regardless of the randomness of AI
Java code gets extra scrutiny since a lot of the coding standards apply only to Java
Website Usage
Step 1 --paste code into box
Step 2 -- select a language (optional)
Step 3 -- select intensity on Jason judging your code
Step 4 -- see your results (some small mistakes will matter a lot more than you think especially putting final in params"
CLI Usage
Requirements: Python 3, pip
Step 1 — Clone the repo git clone link cd Wilder-Score/am-i-wilder-yet
Step 2 — Install dependencies pip3 install -r requirements.txt
Step 3 — Add your Groq API key Get a free key at link then run: echo "GROQ_API_KEY=your_key_here" > .env free key has limited use so you probably only have 10-30 requests to make per day (uses slightly less tokens than the website) 100k token daily limit.
Step 4 — Run it on your file python3 cli.py path/to/your/file.java
Examples: python3 cli.py Author.java python3 cli.py Author.java --intensity savage python3 cli.py script.py --language python --intensity gentle python3 cli.py queries.sql --language sql
How I built it
Backend: Python + Flask AI: Groq API running Llama 3.3 70B CLI: Python argparse - pass any code file directly Deployment: Railway
Challenges I ran into
Not realizing I ran out of tokens for my API While I was debugging and testing I made too many requests thinking I had unlimited requests at the time. I spent a couple hours trying to find the problem in my code, then when I went back on the website where I got my api key from and realized that I used up all my tokens for the day. So I had to revert all the changes I made the past couple of hours back. This exhausted me for quite a while.
Making sure I don't use too many tokens for my API Created lots of python functions to help out in this case, so one request is 5,000 tokens on average depending on how many lines of code there are $$lessCode < averageTokens, \quad moreCode > averageTokens$$. This could've been well over 10,000 if i didnt add functions for autodetecting languages, implementing score system (json + python), limitting amount of characters and lines typed, limitting how much code one of the outputs would write, catching empty outputs, etc.
Getting Llama AI to listen to me Tried making ai flag mistakes like missing final parameters and including magic numbers as a critical mistake ,but it only flags them as small mistakes. I tried to add Python-side filtering, but still didn't work, but it detected those problems more frequently.
Accomplishments that I'm proud of
I'm proud that I built a working web app and CLI tool in a day. I'm also proud that I got to implement AI in my project in one day since my Projects teacher from last term told me it was too hard for me to do.
What I learned
How to use the Groq API for fast interference
How to deploy a Python app to Railway
-How to write effective AI prompts for consistent output
-How to use Flask and how there's different frameworks for different uses
-How to somewhat design a deterministic scoring system from a non-deterministic AI
-Realizing AI can't do everything for you especially if it's free with limits
-A good amount of Python most of it derrives from my existing knowledge of Java and C
What's next for PocketJ.Wilder (Am I Wilder Yet?)
If I were ever to work on the project more I would add more support for language-specific standards other than Java, add a logo for my app, support for uploading entire projects not just single files via CLI app, or I can have anyone else expand on PocketJ.Wilder since my repo is public on Github, excluding my Groq API key of course.
Log in or sign up for Devpost to join the conversation.