CodeCorrect finds solutions to common errors in your code

Today at the TechCrunch Disrupt Hackathon, one hacker came up with a project that might have come in handy for all the other developers in the room. CodeCorrect was presented as a way to fix errors developers run into while they’re writing code.

The project was developed by Pat Needham, a solo hacker at the event. He plugged into the StackOverflow API to more quickly and efficiently find solutions to common errors in a developer’s code. Needham, a full-stack developer, has been coding since high school, but is still learning and wanted to solve one of his own problems.

The hack works by inserting a piece of JavaScript in your web code that reroutes uncaught exceptions to a local node.js web server. From there, the code sends a request to StackOverflow’s API to search for error messages and return the highest-ranked solutions to user-submitted questions. Answers are extracted from the StackOverflow, and if they can automatically be converted into instructions, changes will be made to the original code.

The goal is to reduce the amount of time and energy developers — especially junior developers — spend troubleshooting errors in their code.

“This is for aspiring developers or junior developers that face errors more senior developers would know the answers to off the top of their head,” Needham told me backstage. “It’s for people who lack mentors or might not know the proper ways to search most effectively.”

But really, it could probably be helpful for every developer.