Friday, March 1, 2019

Industry practices and tools

 Importance of maintaining the quality of the code, explaining the different aspects of the code quality

When we talk about clean code, we talk about reader-focused development style that produces software that’s easy to write, read and maintain. Clean code is code that is easy to understand and easy to change.
The word “clean” became very trendy nowadays, if you look at design, photography, etc. people go for clean things, because nowadays our life is extremely complicated and we want to choose clean and clear options, because it calms us down and saves our precious time. Same in software development & architecture, if you have more code than you need, it shouldn’t be there, there shouldn’t be anything extra.
Importance of Code Quality and Coding Standard in Software Development .These procedures can be for various aspects of the program written in that language.If the source code maintains consistency, a clear view of how code fits in the.Too much explanation will make your code look clumsy.



Explain different approaches and measurements used to measure the quality of code

There are many reasons to why we want to measure quality. Some developers like to use metrics to identify areas of the code that could be improved. Others use metric as a quality gate; if the code doesn't satisfy a certain 'quality' criteria, the build fails.
Managers may have different reasons to why they want to measure quality. Although they may say otherwise, the most common reasons to why they want software quality to be measured are:
  • Lack of trust.
  • Fear of being responsible for things they don't understand.
  • Find other people to blame in case something goes wrong.
  • Try to find a justification for the general dissatisfaction among the people building or using the software.
  • Show they are in control.
  • Cover their backside, showing that they are doing something to control quality (ticking a box).
  • Annual targets and bonuses (normally associated to the percentage of test coverage).
With the exception of a few developers and academics, the people that are keener to find a way to measure software quality are the ones that don't write software on a daily basis. Many of them don't even understand how some of the metrics are calculated, but they want a way to control what they don't understand. How many times have we heard stories about managers who force their teams to keep test coverage above a certain percentage? Do they really know what it means? Would they be able to help the teams to achieve that? Can they distinguish good tests from bad tests.Quality Management Measurement - Learn Software Quality .These attributes describe not only the code but also the other documents that support .A clear understanding of goals can be used to generate suggested metrics for a The GQM approach provides a framework involving the following three steps.

Identify and compare some available tools to maintain the code quality 

Code quality is a group of different attributes and requirements, determined and prioritized by your business. Here are the main attributes that can be used to determine it:
  • Clarity: Easy to read and oversee for anyone who isn’t the creator of the code. If it’s easy to understand, it’s much easier to maintain and extend the code. Not just computers, but also humans need to understand it.
  • Maintainable: A high-quality code isn’t over complicated. Anyone working with the code has to understand the whole context of the code if they want to make any changes.
  • Documented: The best thing is when the code is self-explaining, but it’s always recommended to add comments to the code to explain its role and functions. It makes it much easier for anyone who didn’t take part in writing the code to understand and maintain it.
  • Refactored: Code formatting needs to be consistent and follow the language’s coding conventions.
  • Well-tested: The less bugs the code has the higher its quality. Thorough testing filters out critical bugs ensuring that the software works the way it’s intended.
  • Extensible: The code you receive has to be extensible. It’s not really great when you have to throw it away after a few weeks.
  • Efficiency: High-quality code doesn’t use unnecessary resources to perform a desired action

 Discuss the need for dependency/package management tools in software development

Dependency management has always been hard. One of the best illustrations of the problem is Microsoft’s aptly named “DLL Hell.” Back in the 1990s and early 2000s, Microsoft products were built with the Component Object Model (COM). COM was a complex system. Still, one of its benefits was the ability to expose an application programming interface (API). Integrating API functionality in other applications was done via Dynamic Linked Libraries.
A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing software packages for a computer's operating system in a consistent manner. It typically maintains a database of software dependencies and version information to prevent software mismatches and missing prerequisites.


Compare and contrast different dependency/package management tools used in industry 

In the world around you a dependency is the state of existence of an entity or an item such that its stability is dictated by another entity or resource.For example children are dependent on their parents for care and sustenance. The elderly are often dependent on their progeny for the same. And workers are largely dependent on corporations for money and income.

JVM ecosystem is dominated with three build tools:
  • Apache Ant with Ivy
  • Maven
  • Cradle
 What is a build tool? Indicate the significance of using a build tool in large scale software development, distinguishing it from small scale software development 

A build tool is a programming utility that is used when building a new version of a program. For example, make is a popular open source build tool that uses make file, another build tool, to ensure that source files that have been updated (and files that are dependent on them) will be compiled into a new version (build) of a program.






Explain the role of build automation in build tools indicating the need for build automation 

In the context of software development, build refers to the process that converts files and other assets under the developers' responsibility into a software product in its final or consumable form. The build may include:
  • compiling source files
  • packaging compiled files into compressed formats (such as jar, zip)
  • producing installers
  • creating or updating of database schema or data
The build is automated when these steps are repeatable, require no direct human intervention, and can be performed at any time with no information other than what is stored in the source code control repository.Ant is used to automate a build process, but a build process is often much more than compiling. Ant has "tasks" that can be used to perform miscellaneous useful functions.
This is useful for instance to differentiate between test and production builds where deployment paths, database instances, etc.

Compare and contrast different build tools used in industry 


 Explain the build life cycle, using an example

Maven is based around the central concept of a build life cycle. What this means is that the process for building and distributing a particular artifact (project) is clearly defined.
For the person building a project, this means that it is only necessary to learn a small set of commands to build any Maven project, and the POM will ensure they get the results they desired.
There are three built-in build life cycles: default, clean and site. The default life cycle handles your project deployment, the clean life cycle handles project cleaning, while the site life cycle handles the creation of your project's site documentation
  • validate - validate the project is correct and all necessary information is available
  • compile - compile the source code of the project
  • test - test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed
  • package - take the compiled code and package it in its distributed format, such as a JAR.
  • verify - run any checks on results of integration tests to ensure quality criteria are met
  • install - install the package into the local repository, for use as a dependency in other projects locally
  • deploy - done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.


What is Maven, a dependency/package management tool or a build tool or something more

Taking Java as an example. In java , you may include all the related classes (functionality wise or any criteria) in the same package.Dependency is used to refer when something requires another thing to get executed itself. Simply, ‘A’ depends on ‘B’.
 Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.


 Maven uses conventions over configurations, explaining Maven’s approach to manage the configurations

Maven uses Convention over Configuration, which means developers are not required to create build process themselves. When a Maven project is created, Maven creates default project structure. Developer is only required to place files accordingly and he/she need not to define any configuration in pom XML.




No comments:

Post a Comment