Programming Tools: Code Complexity Metrics
A number of commercial tools are out there, as well as some open-source ones. None seem to give you the ability to define your own metrics, however, or to use extended versions of existing metrics. Also, of the open-source tools I found, most were outdated or no longer maintained. The one exception is the Eclipse Metrics Plugin.
For the rest of us, I decided to write an open-source program to produce metrics that end users can compute and modify. The program is written in Python and currently is limited to analyzing Python--thus the name PyMetrics--but the principles can be extended to any language. By writing the code in Python, you should be able to understand the program better than if I had written it in almost any other language. The major advantage of this approach is the output format. It lets you work with the raw numbers to produce your own reports and metrics.
The PyMetrics project is hosted on SourceForge.net, and the files can be downloaded from the project page. Please note that due to the short time I had to produce the program, it is not as polished as I would have liked. The things I would have liked to do include but are not limited to:
Showing what are considered industry standard metric values as a point of comparison for your metrics.
Simplifying some of the modules, including tokenize and the main module, PyMetrics.
Providing better modularization to allow others to extend this program more easily.
Defining a set of test suites.
As always, offering better documentation.
Metrics are numbers representing the complexity of a given program. Although some accepted standard measures exist, you need to decide what works for you and the acceptable thresholds.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
|Working with Command Arguments||May 28, 2016|
|Secure Desktops with Qubes: Installation||May 28, 2016|
|CentOS 6.8 Released||May 27, 2016|
|Secure Desktops with Qubes: Introduction||May 27, 2016|
|Chris Birchall's Re-Engineering Legacy Software (Manning Publications)||May 26, 2016|
|ServersCheck's Thermal Imaging Camera Sensor||May 25, 2016|
- Secure Desktops with Qubes: Introduction
- Secure Desktops with Qubes: Installation
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- CentOS 6.8 Released
- Working with Command Arguments
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- ServersCheck's Thermal Imaging Camera Sensor
- Chris Birchall's Re-Engineering Legacy Software (Manning Publications)
- Petros Koutoupis' RapidDisk
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide