Posts

Showing posts from April, 2015

Useful MVA Courses for you on laas

  Please find some useful MVA course below.   Microsoft Iaas Series I: IaaS Fundamentals Microsoft Iaas Series II:  Dive Deep into Networking Storage and Disaster Recovery Scenarios Microsoft Iaas Series III:  Embrace Open Source Technologies to Accelerate and Scale Solutions

Clean Code Practices : Conditions

  It is said “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” so that we have to make sure the code we write should be easily read and understood by the other developers. This post I will be discussing practices we can follow to make our conditional statements clean. In this post I will mention code dirty and clean to you to understand the difference Principles:- Clear Intent Use the right tool Bite-size logic Sometimes code isn’t the answer   1.Use Positive Conditionals When you write conditions always try to use positive conditionals rather using negative because humans are more comfortable in grabbing positive things. Dirty if (!isNotlogggedIn)              {              } see above example it is bit confusing to understand the meaning in first time. Clean if (logggedIn)              {              }   2.Use Ternary operator see the following example first. Dirty int book