How does it work?
Science and practice behind codebeat
At codebeat we're trying to combine hard computer science on the analysis layer with fairy dust in the presentation layer to help you improve your code and grow as a developer.
Science
We use static analysis to understand the structure of your code. Two initial steps of this process aren't different from what a compiler or an interpreter would do - first the code is broken into pieces, some of which (keywords) have special meaning for the programming language. This stage is performed by a program called lexer. This sliced code is then passed into another program called parser which understands the syntax of the programming language and turns a stream of tokens into a tree-like data structure called Abstract Syntax Tree.
Here is where we our technology really kicks in - instead of compiling or executing your code we look at it's structure and are able to calculate standard code quality metrics for your project. While we are building on top of an an extensive body of both academic and practical work in the field of static code analysis we don't use any of the existing libraries. Instead, we lovingly built our algorithms from scratch to maximize correctness, extensibility and performance.
Fairy dust
Once our algorithms finish running and generate a report for your project we process both current and historical data to help you make the most of your codebeat experience:
- we find Quick Wins by figuring out what are the most significant problems in your codebase;
- we generate annotated diffs for edits that cause significant code quality changes;
- we try to relate the current state to historical data to help you find that extra bit of inspiration to you need to solve quality problems;
Updated less than a minute ago