Archive

Code Readability

  • Avoid nested try-catch blocks

    Although this is sometimes unavailable, nesting try/catch blocks severely impacts the readability of the source code as it makes it difficult to understand which…

  • Avoid long case statements

    The switch statement should be used only to clearly define some new branches in the control flow. As soon as a case clause contains…

  • The code contains non-wrapped immediate function calls

    When a function is to be invoked immediately, the entire invocation expression should be wrapped in parents. Wrapping an immediate function invocation in parentheses…

  • The code contains too many var statements declaring several variables in it

    Although JavaScript allows to declare multiple variables in a single chain, it is recommended to declare each variable separately as it is easier to…

  • Avoid small switch/Case

    SWITCH statements are useful when there are many different cases depending on the value of the same expression. However, code will me more readable…

  • The code contains too many negative comparisons

    This pattern verifies the presence in source code of negative comparisons. Depending on the frequency, CAST Highlight will trigger this code insight.

  • , , , ,

    Spaces between function name and opening parenthesis cause bugs

    [vc_row][vc_column][nz_btn text=”Software Agility” link=”http://casthighlight.wpengine.com/software-agility/” target=”_self” animate=”false” animation_type=”ghost” color=”black” size=”small” shape=”rounded” type=”normal” hover_normal=”fill” hover_ghost=”fill” icon=”icon-dashboard”][nz_btn text=”Code Readability” target=”_self” animate=”false” animation_type=”ghost” color=”black” size=”small” shape=”rounded” type=”ghost” hover_normal=”fill”…

  • , , ,

    Pure JSP Comments can decrease Costs

    [vc_row][vc_column][nz_btn text=”Cost” link=”http://casthighlight.wpengine.com/category/product/indicators-methodology/cost/” target=”_self” icon=”icon-office” animate=”false” animation_type=”ghost” color=”green” size=”small” shape=”rounded” type=”normal” hover_normal=”opacity” hover_ghost=”fill”][nz_btn text=”Software Agility” link=”http://casthighlight.wpengine.com/software-resiliency/” target=”_self” animate=”false” animation_type=”ghost” color=”black” size=”medium” shape=”rounded” type=”normal” hover_normal=”fill”…

  • , , ,

    Long Lines can decrease Readability

    [vc_row][vc_column][nz_btn text=”Production Risk” link=”http://casthighlight.wpengine.com/category/product/indicators-methodology/risk/” target=”_self” icon=”icon-office” animate=”false” animation_type=”ghost” color=”pink” size=”small” shape=”rounded” type=”normal” hover_normal=”opacity” hover_ghost=”fill”][nz_btn text=”Software Resiliency” link=”http://casthighlight.wpengine.com/software-resiliency/” target=”_self” animate=”false” animation_type=”ghost” color=”black” size=”medium” shape=”rounded” type=”normal”…

  • , , ,

    Good declaration Order in JSP can reduce costs

    [vc_row][vc_column][nz_btn text=”Production Risk” link=”http://casthighlight.wpengine.com/category/product/indicators-methodology/risk/” target=”_self” icon=”icon-office” animate=”false” animation_type=”ghost” color=”pink” size=”small” shape=”rounded” type=”normal” hover_normal=”opacity” hover_ghost=”fill”][nz_btn text=”Software Resiliency” link=”http://casthighlight.wpengine.com/software-resiliency/” target=”_self” animate=”false” animation_type=”ghost” color=”black” size=”medium” shape=”rounded” type=”normal”…