[vc_row][vc_column][nz_btn text=”Innovation” link=”http://casthighlight.wpengine.com/category/product/indicators-methodology/innovation/” icon=”icon-office” color=”orange” shape=”rounded” hover_normal=”opacity”][nz_btn text=”Software Elegance” link=”http://casthighlight.wpengine.com/category/product/indicators-methodology/software-elegance” icon=”icon-dashboard” color=”black” size=”medium” shape=”rounded”][nz_btn text=”Code Complexity” link=”http://casthighlight.wpengine.com/category/product/indicators-methodology/software-elegance/code-complexity/” icon=”icon-code” color=”black” shape=”rounded” type=”ghost” hover_ghost=”screen”][vc_empty_space height=”12px”][vc_column_text]
Nested loops can slow down innovation
[/vc_column_text][vc_column_text]This code insight detects loops within a loop (for, do, while, foreach, etc.). Depending on thresholds observed in the benchmark of thousands of applications and billions lines of code, Highlight accounts penalty points to the given scanned files.[/vc_column_text][vc_empty_space height=”12px”][vc_empty_space][vc_single_image image=”5362″ img_size=”full”][vc_row_inner][vc_column_inner width=”1/2″][vc_column_text]
Why you should care
[/vc_column_text][vc_column_text]For code readability and performance, nested loops are frequently considered as a bad practice. In many cases, there’s a much faster and less wasteful way to accomplish the goal you’re trying to achieve.
[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/2″][vc_column_text]
Business Impacts
Complex code can slow down innovation
[/vc_column_text][nz_btn text=”Innovation” link=”http://casthighlight.wpengine.com/category/product/indicators-methodology/innovation/” icon=”icon-office” color=”orange” shape=”rounded” hover_normal=”opacity”][/vc_column_inner][/vc_row_inner][vc_row_inner][vc_column_inner width=”1/2″][vc_separator][vc_column_text]
CAST recommendations
Consider refactoring your code by avoiding the use of nested loops.[/vc_column_text][/vc_column_inner][vc_column_inner width=”1/2″][vc_separator][vc_column_text]
References
https://softwareengineering.stackexchange.com/questions/199196/why-are-nested-loops-considered-bad-practice[/vc_column_text][/vc_column_inner][/vc_row_inner][vc_row_inner][vc_column_inner][vc_single_image image=”5362″ img_size=”full”][vc_column_text]
About CAST and Highlight’s Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.
[/vc_column_text][vc_empty_space height=”16px”][nz_btn text=”See features” link=”http://casthighlight.wpengine.com/outputs-analytics/” icon=”icon-stats” color=”black” shape=”rounded”][nz_btn text=”How it works” link=”http://casthighlight.wpengine.com/how-it-works/” icon=”icon-cog” color=”black” shape=”rounded” type=”ghost”][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row]
Leave a Reply