We’re pleased to announce that there’s a new version of the CodeScene Developer Edition available.
Version 1.1.1 of CodeScene Developer brings support for analyzing PHP code. That means the power of software evolution techniques are now available to help you make better decisions around your PHP codebase too. Follow along and we’ll see some examples on the kind of information the CodeScene Developer Edition provides.
All analyses in CodeScene's tool suite are language-neutral. This feature is really key in modern codebases because:
- We want to be able to find patterns in how our systems evolve independent of programming language.
So instead of focusing on specific programming languages, CodeScene’s tools analyze content. You’ll see an example on that in the analysis overview from CodeScene Developer Edition below.
The analysis overview to the left shows the content we’ve analyzed in the Laravel Repository (a well-known PHP web framework). You see that this Laravel repository is quite small, consisting of just 48 PHP files with a total of 902 Lines of Code. But, and this is interesting, the repository also contains JSON, XML, etc. Since CodeScene analyses all content, you’ll be able to find potential maintenance problems anywhere no matter the programming language.
The main reason we’re able to bring you the power of language-neutral analyses is because our main data source is version-control data and not necessarily the code.
This means that we’ll present an evolutionary view of your codebase so that you’ll know how to prioritize improvements based on how you actually work with the system.
Hotspots Guide Your Expertise
CodeScene Developer Edition lets you run a Hotspot analysis on your repository. Hotspots are the workhorse of software analyses and our recommended starting point as you explore your codebase. You see an example on a Hotspot analysis in the picture to the left.
Hotspots are complicated code that you have to work with often. The analysis lets you narrow down a large system with million lines of code to a much smaller area. A much smaller area where you can now focus your human expertise and still be pretty certain that the improvements you make will have a real impact on both your productivity and the quality of the system.
A Hotspot Map, like the one you see here, has several use cases. The map also serves multiple audiences like developers and testers:
- Developers use hotspots to identify maintenance problems. Complicated code that we have to work with often is no fun. The hotspots give you information on where those parts are. Use that information to prioritize re-designs.
- Hotspots points to code review candidates. At CodeScene we’re big fans of code reviews. Code reviews are also an expensive and manual process so we want to make sure it’s time well invested. In this case, use the hotspots map to identify your code review candidates.
- Hotspots are input to exploratory tests. A Hotspot Map is an excellent way for a skilled tester to identify parts of the codebase that seem unstable with lots of development activity. Use that information to select your starting points and focus areas for exploratory tests.
Dig Deeper With Complexity Trends
Once you’ve identified a Hotspot you want to know how bad it is. Does the code in your Hotspots get more and more complicated over time? Or is it more a question of minor changes to a stable code structure? Complexity Trends help you answer those questions.
A Complexity Trend is calculated by fetching each historic version of a Hotspot and calculating the code complexity of those historic versions. The algorithm allows us to plot a trend over time.
You’d typically use Complexity Trends to detect code that decays over time. But we’ve found it equally important to use Complexity Trends to supervise the improvements we make. A larger refactoring or re-design is an investment. You want to ensure you get the expected pay-off. Unfortunately, we often see that the complexity tends to creep back over time. By using Complexity Trends to track your improvements you’ll notice such issues early and can react.
There’s More: Temporal Dependencies In Code
CodeScene Developer Edition presents one more analysis in addition to Hotspots and Complexity Trends. This analysis is called Temporal Coupling. It’s the kind of analysis that’s likely to give you surprising insights into how your code evolves.
Temporal Coupling means that two (or more) modules change together over time. We’ve a write-up of one of our case studies here. In that article you’ll see how we use Temporal Coupling to uncover real problems in a real codebase.
Get CodeScene Developer
We hope you find these analyses just as exciting as we do. You can get your own copy of CodeScene Developer here. May the code be with you!