kvmall.blogg.se

Advantages using sloc software metric examples
Advantages using sloc software metric examples







For example when developing for the web, the less data that needs to be transmitted, the better. Fewer code lines are not necessarily always better, but there are many best practices for better code maintenance and performance to keep in mind.įinally, the hardware being developed for is relevant, even in an age where the average phone has tens of gigabytes of storage. If you are working in a team environment, however, it is essentially a responsibility to ensure your code can be understood by others, and that sometimes means utilising more lines of code than you would otherwise have needed.

Advantages using sloc software metric examples

Regarding the development environment, it is always good practice to make your code clear and understandable, even if you have no reason to believe anyone else will ever see it. On the other hand, while Python is far from cumbersome, some languages are far more streamlined, and not only lend themselves well to a reduced codebase, but even perform noticeably better when less code is being used. However, Python is also one of the most popular languages, and needs to be used in an efficient manner. An example of this is Python, which is a high-level language. Some programming languages are particularly verbose, making it impossible to reduce code lines beyond a certain level because the fundamental components of the code are themselves large. The reality is that the answer to this dilemma depends on a few factors, the most significant of which being Removing unnecessary code will reduce code lines in your software, but it is the removal of unnecessary code what matters, not the act of reducing the quantity of code.

Advantages using sloc software metric examples

Code that doesn’t need to be there can cause unforeseen problems, make your software less performant, and make it harder for other developers to perform code maintenance. It is certainly the case that unnecessary code should be avoided. Naturally, there are developers who disagree- those who say that it is not necessary to reduce the number of lines in order to write good code, so which is it?Īs with many things in life, the answer is far from black and white. Storage is less of a concern these days, though there is still a school of thought that the fewer lines of code there are, the better, especially when it comes to maintaining your code.

Advantages using sloc software metric examples

After all, you can only fit so much data on a five-and-a-quarter floppy disk. In the past, when the size of a typical storage medium was measured in kilobytes, there was a pressing reason to reduce the lines of code used in a program or game.

  • Follow the DRY rules (Don’t Repeat Yourself).








  • Advantages using sloc software metric examples