1. Discuss the importance of maintaining the quality of the code, explaining the different
aspects of the code quality
long-term usefulness
long-term maintainability
Impact of Quality code
2. Explain different approaches and measurements used to measure the quality of code
3. Identify and compare some available tools to maintain the code quality
SonarQube
Coverity
Coverity Scan is an open source cloud-based tool. It works for projects written using C, C++, Java C# or JavaScript. This tool provides a very detailed and clear description of the issues which helps in faster resolution. A good choice if you are looking for an open source tool
Code Compare
CodCode Compare – is a file and folder comparison and merge tool. Over 70,000 users actively use Code Compare while resolving merge conflicts and deploying source code changes. Code Compare is a free compare tool designed to compare and merge differing files and folders. Code Compare integrates with all popular source control systems: TFS, SVN, Git, Mercurial, and Perforce. Code Compare is shipped both as a standalone file diff tool and a Visual Studio extension.
Key features:
GAMMA
Gamma is an intelligent software analytics platform, developed by Acellere. It supports developers and teams in building higher quality software in less time, by speeding up code reviews.
It automatically prioritizes hotspots in the code and provides clear visualizations. With its multi-vector diagnostic technology, it analyses software from multiple lenses, including software design, and enables companies to manage and improve their software quality transparently.
4. Discuss the need for dependency/package management tools in software development?
Package managers automate the process of installing, upgrading, configuring, and removing computer programs from an operating system in a consistent manner. A package manager deals with ‘packages’ – distributions of software and data in archive files. Packages contain metadata, such as the software’s name, its purpose, version number, checksum and a list of dependencies necessary for the software to run properly. Upon installation, metadata is stored in a local package database. Package managers typically maintain a database of software dependencies and version information to prevent software mismatches and missing prerequisites. They work closely with software repositories, binary repository managers and app stores.
5. Explain the role of dependency/package management tools in software development
Contemporary distributions of Linux-based operating systems install software in pre-compiled packages, which are archives that contain binaries of software, configuration files, and information about dependencies. Furthermore, package management tools keep track of updates and upgrades so that the user doesn’t have to hunt down information about bug and security fixes.
These external artefacts may introduce many integration issues
There are tools to manage these external artefacts..
EX- Maven [Java]
Maven is a multi-purpose tool
6. Compare and contrast different dependency/package management tools used in industry
significance of using a build tool in large scale software development, distinguishing it from small scale software development
Build tools are programs that automate the creation of executable applications from source code.
In small projects, developers will often manually invoke the build process. This is not practical for larger projects, where it is very hard to keep track of what needs to be built, in what sequence and what dependencies there are in the building process. Using an automation tool allows the build process to be more consistent.
8. Explain the role of build automation in build tools indicating the need for build automation
Main 3 types Build automation
9. Compare and contrast different build tools used in industry
Maven
Apache’s Maven is a build automation tool primarily for Java projects, and is the most popular choice for Java developers today by the usage numbers. Unlike Apache Ant, it uses conventions for the build procedure, and only exceptions need to be written down.When to use it: If you want the de facto tool and plugin repository. If you’re running anything unusual with your other tools, Maven will support it. Well suited for large enterprises due to its very fast build speed.
Price: free
Pros:
Cons:
Gradle is an open source build automation system. With version 1.0 released in 2012, Gradle aims to “combine the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build.” Its build scripts are written in Groovy, not XML, which creates a host of different advantages and disadvantages compared to Ant or Maven. Despite being a newer tool in this space, it’s seen widespread adoption.When to use it: Gradle is designed for multi-project environments and incremental builds. It’s good if you’re comfortable with Groovy or are willing to get there. It’s also great for personal projects and SMBs.
Price: free
Pros:
Cons:
10. Explain the build life cycle, using an example (java, .net, etc…)
EX -:
JAVA
.NET
11. What is Maven, a dependency/package management tool or a build tool or something more?
12. Discuss how Maven uses conventions over configurations, explaining Maven’s approach to manage the configurations
13. Discuss the terms build phases, build life cycle, build profile, and build goal in Maven
Terms build phases
A Maven phase represents a stage in the Maven build lifecycle. Each phase is responsible for a specific task.
Build life cycle
A Build Lifecycle is a well-defined sequence of phases, which define the order in which the goals are to be executed
Build profile
A Build profile is a set of configuration values, which can be used to set or override default values of Maven build.
When we execute mvn post-clean command, Maven invokes the clean lifecycle consisting of the following phases.
•pre-clean
• clean
•post-clean
Build goal
Each phase is a sequence of goals, and each goal is responsible for a specific task.
Here are some of the phases and default goals bound to them
14. Discuss with examples, how Maven manages dependency/packages and build life cycle
15. Identify and discuss some other contemporary tools and practices widely used in the
software industry
ADDITIONAL TOOLS AND PRACTICES
Continuous Integration
Continuous integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Continuous integration software tools can be used to automate the testing and build a document trail.
Configuration Management
Configuration Management helps organizations to systematically manage, organize, and control the changes in the documents, codes, and other entities during the Software Development Life Cycle. It aims to control cost and work effort involved in making changes to the software system.
Test automation
HPE UFT offers testing automation for functional and regression testing for the software applications. Visual Basic Scripting Edition scripting language is used by this tool to register the test processes and operates the various objects and controls in testing the applications.
Issue/bug tracking tools
Agile methodologies
Agile software development is an approach to software development under which requirements and solutions evolve through the collaborative effort of self - organizingand cross-functional teams and their end user. It advocates adaptive planning, evolutionary development, empirical knowledge, and continual improvement, and it encourages rapid and flexible response to change
- Code quality matters in many ways
- Code is ,
long-term usefulness
long-term maintainability
- Minimize errors and easily debugged
- Improve understandability
Impact of Quality code
- Efficiency
The goal of code efficiency is to reduce resource consumption and completion time as much as possible with minimum risk to the business or operating environment. The software product quality can be accessed and evaluated with the help of the efficiency of the code used
- Clarity
Clarity is an indicator of quality that says good code should be unambiguous. If you look at a piece of code and wonder what on earth it does, then that code is ambiguous.
This, along with readability and documentation, means any other developer can easily use code written by someone else, without taking a long time to understand how it works.
- Maintainable
Code maintainability is a qualitative measurement of how easy it is to make changes, and the risks associated with such changes.
Developers can make judgments about maintainability when they make changes — if the change should take an hour but it ends up taking three days, the code probably isn’t that maintainable.
Another way to gauge maintainability is to check the number of lines of code in a given software feature or in an entire application. Software with more lines can be harder to maintain.
- Documented
f the program is not documented, it will be difficult for other developers to use it, or even for the same developer to understand the code years from now. One common definition of quality is that it may be “used long term, can be carried across to future releases and products” (without being considered “legacy code”). Documentation is essential to make this happen.
Documentation also provides a way to improve by formalizing the decisions you make when writing. When you document code and do it well, you need to think differently about each component and why it exists in the software. Writing out the reasons for certain programming decisions can improve application design.
- Well-tested
2. Explain different approaches and measurements used to measure the quality of code
- Weighted Micro Function Points
- Halstead Complexity Measures
- CyclomaticComplexity
- Lines of code
- Lines of code per method
3. Identify and compare some available tools to maintain the code quality
SonarQube
It is an open source web-based tool, extending its coverage to more than 20 languages, and also allows a number of plugins
Coverity Scan is an open source cloud-based tool. It works for projects written using C, C++, Java C# or JavaScript. This tool provides a very detailed and clear description of the issues which helps in faster resolution. A good choice if you are looking for an open source tool
CodCode Compare – is a file and folder comparison and merge tool. Over 70,000 users actively use Code Compare while resolving merge conflicts and deploying source code changes. Code Compare is a free compare tool designed to compare and merge differing files and folders. Code Compare integrates with all popular source control systems: TFS, SVN, Git, Mercurial, and Perforce. Code Compare is shipped both as a standalone file diff tool and a Visual Studio extension.
Key features:
- Text Comparison and Merging
- Semantic Source Code Comparison
- Folder Comparison
- Visual Studio Integration
- Version Control Integration and moree Compare
Gamma is an intelligent software analytics platform, developed by Acellere. It supports developers and teams in building higher quality software in less time, by speeding up code reviews.
It automatically prioritizes hotspots in the code and provides clear visualizations. With its multi-vector diagnostic technology, it analyses software from multiple lenses, including software design, and enables companies to manage and improve their software quality transparently.
4. Discuss the need for dependency/package management tools in software development?
Package managers automate the process of installing, upgrading, configuring, and removing computer programs from an operating system in a consistent manner. A package manager deals with ‘packages’ – distributions of software and data in archive files. Packages contain metadata, such as the software’s name, its purpose, version number, checksum and a list of dependencies necessary for the software to run properly. Upon installation, metadata is stored in a local package database. Package managers typically maintain a database of software dependencies and version information to prevent software mismatches and missing prerequisites. They work closely with software repositories, binary repository managers and app stores.
5. Explain the role of dependency/package management tools in software development
Contemporary distributions of Linux-based operating systems install software in pre-compiled packages, which are archives that contain binaries of software, configuration files, and information about dependencies. Furthermore, package management tools keep track of updates and upgrades so that the user doesn’t have to hunt down information about bug and security fixes.
- Third party packages
- External libraries
- Plug-ins
These external artefacts may introduce many integration issues
- file structures and may use different ways of integrating into the main framework
- Different versions are available and difficult to upgrade
There are tools to manage these external artefacts..
- Composer [php ]
- Maven [Java]
- NuGet [.net]
- NPM (Node Package Manager) [JS]
- Bower [JS]
EX- Maven [Java]
Maven is a multi-purpose tool
Having a common directory layout would allow for users familiar with one Maven project to immediately feel at home in another Maven project. The advantages are analogous to adopting a site-wide look-and-feel.
The next section documents the directory layout expected by Maven and the directory layout created by Maven. Please try to conform to this structure as much as possible; however, if you can't these settings can be overridden via the project descriptor.
6. Compare and contrast different dependency/package management tools used in industry
Maven
A repository in Maven holds build artifacts and dependencies of varying types.
There are exactly two types of repositories: local and remote. The local repository is a directory on the computer where Maven runs. It caches remote downloads and contains temporary build artifacts that you have not yet released
Yum
Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm. Yum has a plugin interface for adding simple features. Yum can also be used from other python programs via its module inteface.
NuGet
NuGet is the package manager for the Microsoft development platform including .NET. The open-source NuGet client tools provide users with the ability to produce and consume packages in a similar fashion to RedHat's yum, but with a software development focus. The central package repository for NuGet is known as the NuGet Gallery and is used by all package authors and consumers
Chocolatey
Chocolatey is a package manager for Windows. Designed as a decentralized framework for quickly installing applications and tools, it is built on the NuGet infrastructure and uses PowerShell to deliver packages. Chocolatey packages can be used independently, but also integrate with configuration managers like SCCM, Puppet and Chef.
7. 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
Build tools are programs that automate the creation of executable applications from source code.
In small projects, developers will often manually invoke the build process. This is not practical for larger projects, where it is very hard to keep track of what needs to be built, in what sequence and what dependencies there are in the building process. Using an automation tool allows the build process to be more consistent.
The advantages of build automation to software development projects include
- A necessary pre-condition for continuous integration and continuous testing
- Improve product quality
- Accelerate the compile and link processing
- Eliminate redundant tasks
- Minimize "bad builds"
- Eliminate dependencies on key personnel
8. Explain the role of build automation in build tools indicating the need for build automation
Main 3 types Build automation
- On-demand automation
- Scheduled automation
- Triggered automation
On-demand automation
On-Demand Automation is how innovators like DHL Supply Chain meet customer demands in an evolving workforce environment. On-Demand Automation enables distributors, manufacturers, and fulfillment centers to find, track and move anything in their facilities. On-Demand Automation means no limitations on workflow types
Scheduled automation
Automated planning and scheduling, sometimes denoted as simply AI planning, is a branch of artificial intelligence that concerns the realization of strategies or action sequences, typically for execution by intelligent agents, autonomous robots and unmanned vehicles.
Triggered automation
An automation that is initiated when a file is dropped into a designated Enhanced FTP Folder. B. An automation that is triggered based on a schedule that has been defined. C. An automation that is initiated when a designated value in a data extension is changed.
9. Compare and contrast different build tools used in industry
Maven
Apache’s Maven is a build automation tool primarily for Java projects, and is the most popular choice for Java developers today by the usage numbers. Unlike Apache Ant, it uses conventions for the build procedure, and only exceptions need to be written down.When to use it: If you want the de facto tool and plugin repository. If you’re running anything unusual with your other tools, Maven will support it. Well suited for large enterprises due to its very fast build speed.
Price: free
Pros:
- Extensive ecosystem for plugins.
- Common structure between builds makes understanding other projects easy.
- Full support for almost any CI, app server, or IDE tool.
Cons:
- Lots of download requirements for dependencies and plugins.
- Up and down documentation quality.
- Community is largely quiet.
- Customization is weak.
Gradle is an open source build automation system. With version 1.0 released in 2012, Gradle aims to “combine the power and flexibility of Ant with the dependency management and conventions of Maven into a more effective way to build.” Its build scripts are written in Groovy, not XML, which creates a host of different advantages and disadvantages compared to Ant or Maven. Despite being a newer tool in this space, it’s seen widespread adoption.When to use it: Gradle is designed for multi-project environments and incremental builds. It’s good if you’re comfortable with Groovy or are willing to get there. It’s also great for personal projects and SMBs.
Price: free
Pros:
- DSL base means you have a more customizable and streamlined tool.
- No required build script boilerplate makes for a simpler experience.
- Excellent documentation and active community. For example, Gradleware is a company designed around facilitating the adoption and use of Gradle through consultancy and other guidance.
- It’s simple to create custom plugins.
Cons:
- DSL base means you have a less straightforward and standardized tool.
- As the new kid on the block, the ecosystem for plugins and the like is less developed.
- As a newer tool, its support for CI tools and app servers isn’t as fleshed out as Maven or Ant
Maven is based around the central concept of a build lifecycle. 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 lifecycles: default, clean and site. The lifecycle handles your project deployment, the lifecycle handles project cleaning, while the lifecycle handles the creation of your project's site documentation.
The primary(default) life cycle of Maven is used to build the application- Validate
- Initialize
- Generate-sources
- Compile
- Generate-test-sources
EX -:
JAVA
.NET
11. What is Maven, a dependency/package management tool or a build tool or something more?
At first glance Maven can appear to be many things, but in a nutshell Maven is an attempt to apply patterns to a project's build infrastructure in order to promote comprehension and productivity by providing a clear path in the use of best practices. Maven is essentially a project management and comprehension tool and as such provides a way to help with managing:
If you want more background information on Maven you can check out The Philosophy of Maven and The History of Maven. Now let's move on to how you, the user, can benefit from using Maven
12. Discuss how 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.
Developers do not have to mention each and every configuration detail. Maven provides sensible default behavior for projects. 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.
Terms build phases
A Maven phase represents a stage in the Maven build lifecycle. Each phase is responsible for a specific task.
Build life cycle
A Build Lifecycle is a well-defined sequence of phases, which define the order in which the goals are to be executed
Build profile
A Build profile is a set of configuration values, which can be used to set or override default values of Maven build.
When we execute mvn post-clean command, Maven invokes the clean lifecycle consisting of the following phases.
•pre-clean
• clean
•post-clean
Build goal
Each phase is a sequence of goals, and each goal is responsible for a specific task.
Here are some of the phases and default goals bound to them
14. Discuss with examples, how Maven manages dependency/packages and build life cycle
Maven build life cycle
A Build Lifecycle is a sequence of tasks we used to build a software. For example, compile, test, test more, package and publish or deploy are all tasks we need to do to build a software.
A Maven build lifecycle is a sequence of phases we need to go through in order to finishing building the software
Maven manages dependency/packages
Dependency management is a core feature of Maven. Managing dependencies for multi-module projects and applications that consist of hundreds of modules is possible. Maven helps a great deal in defining, creating, and maintaining reproducible builds with well-defined classpaths and library versions.
ADDITIONAL TOOLS AND PRACTICES
Continuous Integration
Continuous integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Continuous integration software tools can be used to automate the testing and build a document trail.
Configuration Management
Configuration Management helps organizations to systematically manage, organize, and control the changes in the documents, codes, and other entities during the Software Development Life Cycle. It aims to control cost and work effort involved in making changes to the software system.
Test automation
HPE UFT offers testing automation for functional and regression testing for the software applications. Visual Basic Scripting Edition scripting language is used by this tool to register the test processes and operates the various objects and controls in testing the applications.
Issue/bug tracking tools
Most Popular Bug Tracking Software
- Plutora Test
- Airbrake
- Backlog
- ReQtest
- Bugzilla
- JIRA
- Mantis
- Trac
Agile software development is an approach to software development under which requirements and solutions evolve through the collaborative effort of self - organizingand cross-functional teams and their end user. It advocates adaptive planning, evolutionary development, empirical knowledge, and continual improvement, and it encourages rapid and flexible response to change
No comments:
Post a Comment