Industry Practices and Tools ~ article 2
Hey! welcome back to the blog session of Industry practices and tools article series. Today we are going to discuss the second part of the blog. let's check it out
What is this code quality?
code quality is a free estimation of how long-term useful and long-term maintainable the code is. for example, if a code that is thrown away tomorrow is "low quality" and if a code that is being useful to next developments also and furthermore useful to even open-sourced after establishing its "High quality".
There are few benefits of code quality,
- designs and implementations are easy to understand
- interfaces are defined in a good manner
- easy to build and use
- extra dependencies are less
- up to date
There are several ways to measure the quality of the code
- Agile Metrics - This metric is used to check out the ways to boost up the process of software development.
- Production Metrics - check the outlook of developments done and measures the productivity of the development group.
- Security Responses Metrics - To check the security responsiveness.
- Size-oriented Measurements - Analyze the quality of the software with the help of KLOC.
- Function-oriented Methods - How much functionality mainly a product gives.
- QA Metrics - Use for testing
Now Let's look at what are the available tools to maintain the code quality
Collaborator -
Collaborator is the most comprehensive peer code review tool, built for teams working on projects where code quality is critical.Review Assistant -
This can be identified as a code review tool. this comes as a plug-in that helps you to create review requests & reply to those review responds without leaving the integrated development environment (IDE).
Codebrag -
This is a simple open source review tool which makes the review entertaining and structured. and it is light-weight and free features make it more convenient to the users.
Gerrit -
Gerrit is a web-based code review tool. its a free tool witch use by the software developers to review their code via the web browser and take decisions about the developed code.
Codestiker -
This also a similar open source web-based code reviewing tool that available free. This acct as an assists the collaborative code review.
What is this dependency/package management tools in S.D?
Software projects have structured frameworks and other external devices linked. Such as mediator packages, external libraries, and plug-ins. Many integration issues occur because of these external artifacts. As an example, different kind of file structures are using in different ways and when they integrating together it may occur issues. furthermore, various external artifacts use various integration patterns also.. Therefore there are tools that have invented to manage and reduce the defects that occur.
Ex:-
- Composer [PHP]
- Maven [Java]
- NuGer [.net]
- NPM [JS]
- Bower [JS]
Do you know what is a build tool?
Build tools are a programme that automates the creation of executable applications from source code. The building incorporates compiling, linking and packaging the code into a usable or executable programme. Essentially build automation is the action of scripting or automating a wide variance of duties that software developers do in their daily basis activities.
Why do we use these build tools?
When software developers work in smaller projects, they generally appeal to the build process. this appealing act is cannot do in the larger scale of projects. Because it is very difficult to keep the attention of what needs to built, in what order and what kind of dependencies are using in the building process. Therefore using an automation tool make the development process much easier.
Wanna know what are the top 5 build tools use in industry?
Gradle -
Gradle is an incredibly versatile tool which allows you to write your code in Java, C++, Python or etc. Not only that, it supported by popular IDEs such as Netbeans, Eclipse, and IntelliJ and many more. Did you know because of those features google also chose it as their official build tool for the android studio?
Git -
As we all are familiar with Git is one of the most popular development tools used by many software development fields. it's a source code management tool that can be used remotely by development teams and open source contributors.
Jenkins -
This is the go-to develops automation tool for many software development teams. it's an open source CI/CD server that allows you to automate the different stages of your delivery pipeline.
Bamboo -
Bamboo is Atlassian's CI/CD server solution that has many similar features to Jenkins. both are popular development tools that allow you to automate your delivery pipeline.
Docker -
This has been the number one container platform since it's launch in 2013 and continues to improve. it's also thought of as one of the most important development tools out there.
Le's get to know about the build life cycle
These 2 graphs will give you a simple idea about how is the build life cycle
What is this Maven?
Maven is a standard way of building projects. This means an easy way to distribute project data and an approach to share JARs over several projects. This Maven tool can be used for building and managing any Java-based projects and make daily java work easier and convenient to the Java developers.
This maven also has a primary set of goals. the main goal Maven achieve is to enable the developer to appreciate the total condition of an improvement exertion in the brief timeframe. Therefore to achieve this goal there are few areas that may need to put attention on,
- Making the build process easy
- Providing a uniform build system
- Providing quality project information
- Providing guidelines for best practices development
- Allowing transparent migration to new features
Maven provides developers ways to manage the following
- Builds
- Documentation
- Reporting
- Dependencies
- SCMs
- Releases
- Distribution
- Mailing list
Now Let's check how Maven uses conventions over configurations
Maven uses "Convention" over "Configuration", which means developers are not required to create build process themselves. Wen developers coding they no need to give each and every single detail to configure the code. Meven provides reasonable default conduct for the developments that develop by them. After creating a Maven project Maven creating a default project structure. The person who doing the development needs only to input files accordingly and the developer doesn't need to define and other configurations in pom.xml.
Following is an example of default values for project source code files, resource files, and configurations. (${basedir} = project location)
Let's discuss some interesting facts in Maven
Maven 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. Maven 2.0 version is mostly a build life cycle oriented and clearly says that these steps are well defined to get the destinated output after the successful execution of the build life cycle.
Maven comes with 3 built-in build life cycles,
- Clean - This phase involves cleaning of the project
- Default - This phase handles the complete deployment of the project
- Site - This [ahse handles the generating the java documentation of the project
Build profiles
Profile in maven is nothing but a subset of elements which allows customizing builds for a particular environment. Profiles are also portable for different build environments. Build environment basically means a specific environment set for production and development instances. When the developer work on development phase, they are intended to use the database from the production instance and for the production phase, the live database will be used. Below are the types of build profiles in Maven.
- Per projects - Defined in pom.xml
- Per user/Developer - Defined in Maven settings.xml
- Global - Maven global settings.xml
Build goal
When we run a phase - all goals bound to this phase are executed in order. Here are some of the phases goals bound to them,
- Compile goal from the compiler plugin is bound to compile phase
- test-compile phase
- test-phase
- install phase
- package phase
Other contemporary tools and practices widely used in the software industry
SSH -
Secure Shell is now only major protocol to access the network devices and servers over the internet. SSH developed by SSH communications security Ltd., it is a program to log into another computer over a network, to execute commands in a remote machine, and to move files from one machine to another.
Terminal services or remote login -
Remote Desktop Services (RDS), known as Terminal Services in Windows Server 2008 and earlier, is one of the components of Microsoft Windows that allow a user to take control of a remote computer or virtual machine over a network connection.
Amazon Web Services -
Amazon Web Services is a secure cloud services platform. it is not just cloud service, it is offering computer power, database storage, content delivery and other functionalities to help the business scale and grow.
Bash and Powershell -
When a developer expects to need to know how to write a basic restart script, grab an error code from an existing command or do a few things in a loop, that's what bash and MS PowerShell letting to the developer do.
MongoDB -
This is an open source database management system that uses a document-oriented database model which supports various forms of data instead of using tables and rows as in relational databases.
Comments
Post a Comment