McCabe complexity

Pierre Abbat phma at
Tue Jan 5 06:36:36 PST 2016

I've been working on a land surveying program for over eight years. According 
to pmccabe, the most complicated functions are pointlist::maketin (62), which 
creates a triangulated irregular network, and triangle::subdivide (58/65), 
which subdivides a triangle into monotonic regions. The TIN uses a tangledly 
hierarchical data structure called "winged edge", in which points, edges, and 
triangles all point to each other. It took me years to make it work right.

I checked HAMMER source code with pmccabe. The most complex function is 
hammer_vfs_mount, at 51. In hammer2, the most complex is 
hammer2_cluster_resolve, at 79/90. In the hammer utility, the main program is 
93/144, and in hammer2 68/78.

Whoever said McCabe complexity should be at most 10 never worked on such 
complex data structures as a winged edge or a filesystem.


ve ka'a ro klaji la .romas. se jmaji

More information about the Users mailing list