<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pravin Uttarwar</title>
    <description>The latest articles on DEV Community by Pravin Uttarwar (@pravin).</description>
    <link>https://dev.to/pravin</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F330553%2Ff9985773-3791-46d4-b814-2868071f7114.jpg</url>
      <title>DEV Community: Pravin Uttarwar</title>
      <link>https://dev.to/pravin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pravin"/>
    <language>en</language>
    <item>
      <title>What is an Open Source License (OSL)?</title>
      <dc:creator>Pravin Uttarwar</dc:creator>
      <pubDate>Thu, 27 Feb 2020 06:41:31 +0000</pubDate>
      <link>https://dev.to/pravin/what-is-an-open-source-license-osl-42kc</link>
      <guid>https://dev.to/pravin/what-is-an-open-source-license-osl-42kc</guid>
      <description>&lt;p&gt;An open-source license is issued in the USA for software and other products that allow the source code to be modified or shared under pre-defined terms. This means that the end-user or companies can review and modify the source code to suit their needs. Softwares under these licenses are normally free of cost except those that are non-commercial in nature. These licenses are subject to certain restrictions with respect to expression of the origin of software like; the name of the authors cannot be modified or preserving the copyright statement within the Code, etc. &lt;/p&gt;

&lt;p&gt;The popular set of open-source licenses are the ones identified and approved by the Open Source Initiative (OSI) under their Open Source Definition (OSD). This OSD is nothing but a document published by OSI to determine if a license can be categorized with open source certification. The birth of this definition is based on the &lt;a href="https://www.debian.org/social_contract#guidelines"&gt;Debian Free Software Guidelines&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;The second is the official definition of free software by the Free Software Foundation (FSF) which focuses on the availability of the source code plus the ability to modify and share it. Other software licenses focus on the freedom of the user to use the program.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What are the types of OSL?&lt;/strong&gt; &lt;br&gt;
These licenses can be broadly divided into two categories: Copyleft and Permissive, these are basically based on restrictions and requirements it charges the users with. &lt;/p&gt;

&lt;p&gt;When a copyleft license is issued by the author, he claims copyright over the work and makes a statement that the work can be used or modified and shared by other people as long as they follow reciprocity. &lt;/p&gt;

&lt;p&gt;A permissive license is a non-copyleft license as it not only permits the freedom of usage, modification, and sharing but also permits proprietary derivative works. This places very minimum restrictions on how people use open source components and do not depend on reciprocity. &lt;/p&gt;

&lt;p&gt;We have picked the top 7 most widely used open-source licenses from the OSI approved list to give you a basic idea about them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. GNU General Public License (GPL)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Richard Stallman is said to have invented the GPL in order to protect the GNU software from getting into the clutches of proprietary. It’s a copyleft license and also the most popular one. On account of the nature of copyleft license, any software which is created based on any GPL component has to be released to open source. Thus any software that uses any of the GPL open source components is to be released in full source code and all other rights.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Apache License&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developed by Apache Software Foundation (ASF), this license lets users use the software for any purpose or to distribute it, modify it and also to distribute the modified versions of the software. No royalties are required for such usage. The best quality of apache is that the same license is applied to even all the unmodified parts and every licensed file that is modified or changed has to have a notification that changes have been made to that file. No contents of modifications change the terms of the license.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. The Microsoft Public Licenses (Ms-PL)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a free open source software license by Microsoft. You can reproduce and distribute original or modified works licensed under Ms-PL. This license protects the authors since it does not have any express guarantee or warranty so if it does not work well in some cases, the author is not responsible. The best part is that you are not required to give out the source code. However, if you distribute any portion of the software in source code format, it can be done only under this license by including a complete copy with the distribution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Berkeley Software Distribution (BSD)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;There are two versions of this license; Modified BSD and Simplified BSD License. These licenses let you freely modify and distribute the software’s code in either source or binary language and also mandate you to retain a copy of the copyright notice, disclaimer and list of conditions.  The main difference between these two versions is that the Modified BSD does not have an advertising and non-endorsement clause which is included in the Simplified BSD.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Common Development and Distribution License (CDDL)&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;This is a license published by Sun Microsystems which replaced the Sun Public License (SPL).  This is also said to be a cleaned-up version of Mozilla Public License which now facilitates reusability. With this, you can reproduce and distribute any original or derived versions of any software that is licensed under CDDL. But there is a prohibition for making any changes to patent, copyright or trademark notices that are present in the software.  Making source code available is also the liability upon the executor under CDDL. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Eclipse Public License (EPL)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This license is developed by Eclipse Foundation and derived from the Common Public License (CPL). If any EPL component is distributed in source code format, it becomes mandatory to disclose the modified code too. If such distribution is done under object code format, then it has to be made known that source code can be disclosed upon request. Protection to the author is also provided if his component is used as a commercial product by any firm.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. MIT License&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Once you add a copy of the original MIT license and copyright notice with the software, the license does not pose any kind of restrictions per se. It is regarded as one of the freest and liberal open source license.&lt;/p&gt;

&lt;p&gt;The Legal Side of OSL&lt;/p&gt;

&lt;p&gt;The world is open but not only to good things. Sharing your work with the world is definitely going to bring with it some legal implications. Open source is a unique exception to the concept of copyrights. But then why do we need these licenses?&lt;/p&gt;

&lt;p&gt;1)Legal default is still exclusive copyright and licenses are explicit permissions to state the exclusive copyright&lt;/p&gt;

&lt;p&gt;2)If no open source license is there, any person who modifies or distributes your work will hold exclusive copyright over it&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open Source License&lt;/strong&gt; is not only one of the most exciting but also one of the most complicated forms of copyrights. Make sure that you are well versed in these before opting to go for open source!   &lt;/p&gt;

</description>
      <category>opensourcelicense</category>
      <category>sourcecode</category>
      <category>software</category>
      <category>codegrip</category>
    </item>
    <item>
      <title> How to create good names, good functions, good objects, and good classes?</title>
      <dc:creator>Pravin Uttarwar</dc:creator>
      <pubDate>Thu, 20 Feb 2020 09:07:14 +0000</pubDate>
      <link>https://dev.to/pravin/how-to-create-good-names-good-functions-good-objects-and-good-classes-2nge</link>
      <guid>https://dev.to/pravin/how-to-create-good-names-good-functions-good-objects-and-good-classes-2nge</guid>
      <description>&lt;p&gt;Coding practices that are done right results into good code, which is infact, a combination of various parts of the code being individually excellent. These parts are none other than the names, functions, objects, and classes. We tried to figure out how one can write good code by creating good names, good functions, good objects, and good classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Naming Conventions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Naming classes and methods seem like an easier job so you neglect it, comes back to haunt you and your code in the future. If you are building software for someone else, you approach to code in such a way that customer does not come back with an issue in future. The worst-case issue is that customer comes back to ask you what do you mean by the name of a function. That is the technical debt you added into the system by doing a small but yet heavy mistake.&lt;/p&gt;

&lt;p&gt;An average coder spends 75% of the time understanding code, 20% of the time modifying existing code and only 5% writing new. It is important to follow a naming convention that makes it easy and meaningful to &lt;a href="https://www.codegrip.tech/productivity/how-to-format-code-for-maximum-code-readability/?utm_source=dev&amp;amp;utm_medium=pravin-dev-blog&amp;amp;utm_campaign=how_to_create_good_names_functions_objects_%26_classes"&gt;read your code&lt;/a&gt;. The names should be clear, without ambiguity ad should define what the function or class does. A self-explanatory name will help us to avoid looking into the code or comments for greater detail and know what the developer aimed to do with that function. Follow the steps below to write good names:&lt;/p&gt;

&lt;p&gt;● Follow lower camel case: Example: httpsServer, removeItem(), todayDate()&lt;br&gt;
It helps to differentiate between words without introducing any symbol and is thus easy to understand. Some people follow the camel case, which is RemoveItem() or every word is capitalized but as the code is written in lower case in continuity, it’s advised to start name by lower case as well.&lt;/p&gt;

&lt;p&gt;● When you are naming a function, remember to add a verb to it as every function is an action. Like getTime() stands for getting time of the event, resetInputs() stands for resetting the input fields.&lt;/p&gt;

&lt;p&gt;● Clarity is more important than shortness. Short names are easy to read but compromising it with what they mean is not acceptable. But this also doesn’t mean that you can write names that are irritatingly long. Rather you should use a shorter replacement.&lt;/p&gt;

&lt;p&gt;● Avoid names that don’t have meanings like func1(), work(). We understand that the machine does not really care whatever name we put as it does not know the meaning, but it still doesn’t mean we can put gibberish. It may not be a problem for you but if any developer in the future tries to understand, it would be near impossible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Effective Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Besides learning the language, developers need to learn how to write good functions. While &lt;a href="https://www.codegrip.tech/productivity/what-is-code-quality-how-to-measure-and-improve-it/?utm_source=dev&amp;amp;utm_medium=pravin-dev-blog&amp;amp;utm_campaign=how_to_create_good_names_functions_objects_%26_classes"&gt;code quality&lt;/a&gt; depends on various factors of functions, the one we talk about here is writing effective functions. The points needed to be taken care while writing a good function are:&lt;/p&gt;

&lt;p&gt;● Avoid &lt;a href="https://www.codegrip.tech/productivity/what-is-duplicate-code/?utm_source=dev&amp;amp;utm_medium=pravin-dev-blog&amp;amp;utm_campaign=how_to_create_good_names_functions_objects_%26_classes"&gt;duplication&lt;/a&gt; of lines. If a line seems to appear more than once, it's better to make it a function and then calling it whenever you require.&lt;/p&gt;

&lt;p&gt;● Always follow the single responsibility principle while creating functions. Good functions should do only one and a definite job. Each action and job should have separate functions.&lt;/p&gt;

&lt;p&gt;● If it feels like your function is becoming too long and lengthy to read or having too many elements that make it complicated and difficult to understand, it is better to split them. Create sub-functions under a larger function so that editing and reading become easier.&lt;/p&gt;

&lt;p&gt;● Always have a well-defined set of inputs and outputs. Your function input must be recognizable and differentiable by the code and output should be sorted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using OOP Principles&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;OOP or Object-Oriented programming is easy to follow. The principles are important because it helps you write good objects and good classes. Also, almost 90% of programming is done using this practice. We won’t tell you what your textbooks do but rather mention some important pointers to write &lt;a href="https://www.codegrip.tech/productivity/difference-between-good-and-bad-code/?utm_source=dev&amp;amp;utm_medium=pravin-dev-blog&amp;amp;utm_campaign=how_to_create_good_names_functions_objects_%26_classes"&gt;good code&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;● Law of Demeter i.e. one never calls a method on an object you got from another call nor on a global object. Will save lots of time while refactoring.&lt;/p&gt;

&lt;p&gt;● Methods that have many arguments are just hard to read. Rather use an object that represents the set of arguments required.&lt;/p&gt;

&lt;p&gt;● Use the design principle, Inversion of Control (IoC) that is reversing different controls in object-oriented programming with the main aim to achieve loose coupling.&lt;br&gt;
● Use recursion for components that have the same environment. Good code is a compact and good object is when work can be done without breaking a code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Write Clean Classes&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Clean classes don’t just mean functionality but also the manageability of code. Creating good classes take efforts that are mentioned below:&lt;/p&gt;

&lt;p&gt;● Use proper order for classes: Always begin with a variable list and keep a public variable (unless you need it to be protected).&lt;/p&gt;

&lt;p&gt;● Write smaller classes: Smaller is good, but we don’t really object to the number of lines. What we object to is a class having multiple dependencies and responsibilities. Always try not to have any dependencies and also only one responsibility.&lt;/p&gt;

&lt;p&gt;● Always write reversible classes so that you can bring easy changes to it after testing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
You can use the above pointers to write good code or you can always use an automated code quality tool like &lt;a href="https://www.codegrip.tech/?utm_source=dev&amp;amp;utm_medium=pravin-dev-blog&amp;amp;utm_campaign=how_to_create_good_names_functions_objects_%26_classes"&gt;CodeGrip&lt;/a&gt; for this task. The only difference is that CodeGrip is easier, quicker and more efficient to implement. All you need to do is just connect your repositories from GitHub or BitBucket and let CodeGrip do all the magic.&lt;br&gt;&lt;br&gt;
CodeGrip will analyze your code and bring out key metrics like issues, duplications, and technical debt. You can refine your functions and classes using duplication detection. It also suggests you solutions if you write something wrong or &lt;a href="https://www.codegrip.tech/productivity/everything-you-need-to-know-about-code-smells/?utm_source=dev&amp;amp;utm_medium=pravin-dev-blog&amp;amp;utm_campaign=how_to_create_good_names_functions_objects_%26_classes"&gt;smelly&lt;/a&gt; in your code. CodeGrip takes a minute to all that, saving you time, money and effort.&lt;/p&gt;

</description>
      <category>qualitycode</category>
      <category>codegrip</category>
      <category>testing</category>
      <category>oop</category>
    </item>
    <item>
      <title>‎Intellectual property rights and Code Review</title>
      <dc:creator>Pravin Uttarwar</dc:creator>
      <pubDate>Wed, 12 Feb 2020 12:15:46 +0000</pubDate>
      <link>https://dev.to/pravin/intellectual-property-rights-and-code-review-55ed</link>
      <guid>https://dev.to/pravin/intellectual-property-rights-and-code-review-55ed</guid>
      <description>&lt;p&gt;The computers are taking over the world. All these digital tools also have legal sanctions and are protected under the Patents, Copyrights, Warranty-Liability and Open Source Software Licenses in US. Any bright ideas, original invention, artistic work, designs, and symbols are all protected under Intellectual property rights.&lt;/p&gt;

&lt;p&gt;If we go by this definition, the source code of any program also becomes subject to protection under ‎Intellectual property rights and any infringement of the same would attract Patent or Copyright Litigation. With the extensive variety in programming languages and code execution, &lt;a href="https://www.codegrip.tech/productivity/best-practices-for-reviewing-code/"&gt;reviewing codes&lt;/a&gt; take a place of high importance. There are a lot of tools in the market that helps in accurate code reviews to detect issues, and &lt;a href="https://www.codegrip.tech/"&gt;Codegrip&lt;/a&gt; is one such tool that provides you with an automated code review.&lt;/p&gt;

&lt;p&gt;In today’s blog let us try to see how code review acts as an asset when you go into IP Litigation:&lt;/p&gt;

&lt;p&gt;1) The relation between Code and Patent or Copyright Litigation:&lt;br&gt;
The relationship between Code and IP is horizontal because it cuts through both lines of Patent (software) and Copyrights (licensing). Coding is something that the programmers do and it’s a detailed plan for the software, while the actual software is the end product. Patent law allows companies to claim temporary exclusive rights to technologies that are independent of their software implementations.&lt;/p&gt;

&lt;p&gt;This Copyright law is applied to unauthorized redistribution or use of software; compiled or otherwise. The source code of any program is protected just like books as this code is considered a piece on a non-complied version of the software.&lt;/p&gt;

&lt;p&gt;Thus when you enter into litigation for a patent or copyright, you need a code review to understand where the infringement or plagiarism has taken place. This means that you will review both the original and the infringed code to locate what is similar or the same issues or peculiarities.&lt;/p&gt;

&lt;p&gt;The cases for IP Litigation especially where the question of patent and copyright law is the issue in question, a source code review becomes the most important tool to locate similarities. Pieces of evidence from these reviews are a strong argument for infringement of any product. Your trade secrets are also a part of this protection.&lt;/p&gt;

&lt;p&gt;2) How to tell if your Source Code is infringed:&lt;br&gt;
With all the technical issues, it does get hard to check if your source code is infringed. Most of these cases involve a violation of the owner’s exclusive right to make copies.&lt;/p&gt;

&lt;p&gt;The first two main things you need to check are:&lt;/p&gt;

&lt;p&gt;a) That the said infringer had access to your work.&lt;/p&gt;

&lt;p&gt;b) The work that is infringed is substantially similar to your work.&lt;/p&gt;

&lt;p&gt;Normally a source code is never shown publicly unless it is covered under Open Source Software licenses. It is the object code that actually controls the program when it is being executed. Even if these two are distinct, they are considered to form the same code just in different formats and are thus safeguarded under the same copyright.&lt;/p&gt;

&lt;p&gt;If the software is infringed, it is known as ‘Software Piracy’. It occurs when there is a reproduction, use or distribution without the express permission of its author. If any such form is noticed by you then there is a high possibility that the source code was also stolen or duplicated.&lt;/p&gt;

&lt;p&gt;Normally the copyright law protects the form of expression of the idea and not the idea itself. In software, this means that computer programs, in both source code and object codes are eligible for copyright protection. With proper source code review, critical evidence can be collected while facing litigation.&lt;/p&gt;

&lt;p&gt;You need a good analyst to check the code without much access to the code. Source code analysis requires different skill sets and the use of particular tools like &lt;a href="https://www.codegrip.tech/"&gt;Codegrip&lt;/a&gt; to prepare a comprehensive report and convey the findings to you. Like we said above, this report can be used in the Court of law to show the substantial similarities between two separate codes.&lt;/p&gt;

&lt;p&gt;3) What to do in case of a Source Code Infringement:&lt;br&gt;
When you have a suspicion about a possible code infringement, there are several steps that you can undertake in order to make the Copyrights law grants you the necessary protection and remedy.&lt;/p&gt;

&lt;p&gt;For this, you will firstly need to get copyright registration for your source code. You can register your code by creating an account and submitting an online application.&lt;/p&gt;

&lt;p&gt;It contains three main elements:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;A Completed Application form.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A nonrefundable filing fee.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A nonrefundable deposit – a copy or copies of work.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Registration can happen to be done through eCO or by filing physical forms according to category.&lt;/p&gt;

&lt;p&gt;After that, you will need to do the following.&lt;/p&gt;

&lt;p&gt;a) Perform a proper code review and scan for &lt;a href="https://www.codegrip.tech/productivity/what-is-duplicate-code/"&gt;duplication&lt;/a&gt; with Codegrip. This means you need to scan both codes separately and then locate substantial similarities.&lt;/p&gt;

&lt;p&gt;b) If it is possible for you, try getting the code used for the infringed content from the infringer for comparing it with the original code.&lt;/p&gt;

&lt;p&gt;After the due process of filing a case in the Court, the Court would compare the substantial similarity between both the works and decide the merit of the claim accordingly. An experienced ‎Intellectual property rights attorney will be the right path to proceed ahead with Patent or Copyright litigation.&lt;/p&gt;

&lt;p&gt;4) What are the points that you need to keep a close eye on while venturing for IP litigation?&lt;br&gt;
Having said this, let’s quickly look at what points you need to keep in mind once you decide to go ahead with litigation.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Proof of ownership of the code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pieces of evidence from code review.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Portions of substantial similarities between both the works.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Check if your code falls under the Open Source Software Licenses.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Final Takeaways&lt;br&gt;
Intellectual property rights litigation can be a very tricky thing especially if you aren’t aware of the peculiarities of patents and copyrights. Code reviews play a very vital role when you want to go ahead with litigation as they can highlight the similarities and other crucial pieces of evidence for proving infringement.&lt;/p&gt;

&lt;p&gt;You can use &lt;a href="https://www.codegrip.tech/"&gt;Codegrip&lt;/a&gt; and secure these crucial pieces of evidence and be armored against any possible duplications of your work.&lt;/p&gt;

</description>
      <category>codegrip</category>
      <category>copyrightlitigation</category>
      <category>codereview</category>
      <category>ipr</category>
    </item>
    <item>
      <title>WHAT IS CODE QUALITY, HOW TO MEASURE AND IMPROVE IT?</title>
      <dc:creator>Pravin Uttarwar</dc:creator>
      <pubDate>Wed, 12 Feb 2020 07:35:37 +0000</pubDate>
      <link>https://dev.to/pravin/what-is-code-quality-how-to-measure-and-improve-it-36cm</link>
      <guid>https://dev.to/pravin/what-is-code-quality-how-to-measure-and-improve-it-36cm</guid>
      <description>&lt;p&gt;There are numerous ways to implement code, as there are developers to implement it. While this is one of the many reasons making the profession of a programmer fun, it also means there are varied opinions about what makes good, or high-quality, code. What one individual values as top quality code may be drastically different from what another individual values.&lt;/p&gt;

&lt;p&gt;SO WHAT EXACTLY IS CODE QUALITY?&lt;/p&gt;

&lt;p&gt;In his book “Juran’s Quality Control Handbook”, J. M Juran has concisely defined two widely accepted aspects of code quality:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Quality code consists of those features that cater to the need of customers and subsequently provide product satisfaction.&lt;br&gt;
The first and foremost measure of quality to consider is whether the code meets the requirements that caused it to be written. A code beautifully written, but failing to accomplish the desired outcome, can be said to have low quality. In short, it must actually meet the customer’s needs. However, focusing on this bare minimum of achieving quality code begins to cause problems. In today’s fast-paced technological landscape, requirements change rapidly and thus, software needs to change too to meet these requirements.  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Quality code is free from deficiencies.&lt;br&gt;
This second aspect refers to is the product’s freedom from deficiencies. In the software context, a deficiency is a very broad concept. We can take the “freedom from deficiencies” as referring to the non-functional attributes required in code. Some of these non-functional attributes are:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;• Clarity – Easy to read and legible to anyone who has not written the code themselves.&lt;br&gt;
• Maintainability – An easy to understand context and not being over-complicated makes it easier to make changes in the code if required. &lt;br&gt;
• Documentation – While well-written code explains itself, it is always recommended to add comments to explain the role it plays and its functions.&lt;br&gt;
• Refactored – The formatting needs to be consistent and follow relevant coding conventions.&lt;br&gt;
• Well-tested – The less amount of bugs a software has, the higher its quality is. Rigorous testing helps filter out such discrepancies.&lt;br&gt;
• Efficiency – High-quality code uses the resources available to it optimally to perform the desired action.   &lt;/p&gt;

&lt;p&gt;WHY IS CODE QUALITY IMPORTANT?&lt;/p&gt;

&lt;p&gt;So far, we have discussed what code quality is and what aspects need to be ensured to write code that is of high quality, which brings us to, why is it important? Some of the significant reasons why maintaining a high quality for your code is important are:&lt;/p&gt;

&lt;p&gt;• It makes your software robust&lt;br&gt;
• Increases readability and eases editing&lt;br&gt;
• Makes your program sustainable&lt;br&gt;
• Promotes easy transferability&lt;br&gt;
• Decreases technical debt &lt;/p&gt;

&lt;p&gt;The quality of code is important as it ends up defining the overall software quality. Quality ultimately impacts the security, safety, and reliability of your codebase. &lt;/p&gt;

&lt;p&gt;High-quality code is imperative for development teams today, and especially important for teams developing systems that are safety-critical.&lt;br&gt;
Related post: &lt;a href="https://www.codegrip.tech/productivity/why-is-code-quality-important/"&gt;Why is code quality important?&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--y6e6DQ5M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/y08sdkwfcmbu3qbr4nfk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--y6e6DQ5M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/y08sdkwfcmbu3qbr4nfk.png" alt="Alt Text"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;HOW TO MEASURE AND IMPROVE CODE QUALITY&lt;/p&gt;

&lt;p&gt;Measuring code quality can help you understand what steps need to be taken to improve your code quality. There are numerous metrics you can use to quantify the quality of your code. Some of the non-functional metrics have been discussed earlier. Additionally, you can use a few quantitative measures to reveal the quality of your code:&lt;/p&gt;

&lt;p&gt;• Weighted Micro Function Points (WMFP)&lt;br&gt;
WMFP is a modern software sizing algorithm that takes your source code and breaks it down into several micro functions, subsequently producing several complexity metrics for each of the micro functions. It later interpolates the results into a single score. The metrics used to determine a WMFP score include comments, code structure, arithmetic calculations, and flow control path. &lt;/p&gt;

&lt;p&gt;• Halstead Complexity Measures&lt;br&gt;
The Halstead Complexity Measures date back to the year 1977. These measures essentially include metrics like program vocabulary, program length, volume, estimated bugs, etc. The primary aim is to measure the computational complexity, as the more complex a code is, the harder it is to maintain and the lower its quality.&lt;/p&gt;

&lt;p&gt;• Cyclomatic Complexity&lt;br&gt;
This metric measures the structural complexity of your program. This is done by counting the linearly independent paths through the source code. A higher cyclomatic complexity suggests a higher probability of encountering defects. &lt;/p&gt;

&lt;p&gt;After measuring and articulating your code quality, you can take steps to improve it. Some of the ways you can improve the quality of your code are:&lt;/p&gt;

&lt;p&gt;• Use relevant coding standards&lt;br&gt;
Using a coding standard is highly recommended and one of the best ways to achieve high-quality code. Using a coding standard ensures consistency amongst colleagues and increases the reliability of the codebase. The best way to start using a coding standard is to train your developers and help them comply with it. A static code analyzer can help you do this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MXtlNrTd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4jmzy6s9xn1rdizh30oi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MXtlNrTd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4jmzy6s9xn1rdizh30oi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;• Analyze the code before a code review&lt;br&gt;
It is important and best to analyze code when it’s written and before the code review. This helps save a lot of time and makes the process of resolving errors cheaper and easier.&lt;/p&gt;

&lt;p&gt;• Follow code review best practices&lt;br&gt;
&lt;a href="https://www.codegrip.tech/productivity/best-practices-for-reviewing-code/"&gt;Code review&lt;/a&gt;  is one of the top three ways to ensure code quality according to the State of Code Quality 2016 Survey. When code review is done thoroughly and well, it improves the code quality significantly. &lt;/p&gt;

&lt;p&gt;• Refactor code when necessary&lt;br&gt;
Refactoring old legacy code can help you significantly decrease its complexity and clean up the codebase in the process. &lt;/p&gt;

&lt;p&gt;CONCLUSION&lt;/p&gt;

&lt;p&gt;To sum it up, a well-written code has a visible impact on the quality of your software. It is imperative to understand and measure the quality of your software and see if it is improving as a result of higher code quality. &lt;/p&gt;

</description>
      <category>cyclomaticcomplexity</category>
      <category>complexitymeasures</category>
      <category>codequality</category>
      <category>codegrip</category>
    </item>
  </channel>
</rss>
