Tutorial 3 (INDUSTRY PRACTICES AND TOOLS 2)
When you first think about
becoming a software developer, you probably have dreams of creating exciting
new features, playing with new technologies, and writing some really cool and
interesting code.
Coding is the ability to design, write,
test, implement and maintain a computer programmer’s source code. In order to
develop quality code, a programmer must have a good amount of experience in
programming and they need to be capable of overcoming problems that come with
programming.
Creating good quality code is important mainly
because it will then result in the software being more durable and much easier
to use and can be maintained with greater ease. ... There are different factors
that can improve the quality of code such as
reliability, portability, robustness and maintainability.
Good quality code is that is clear,
simple and concise that can be fully maintained which is efficient.
There are many things that can make your
code of good quality such as correctness, no DRY(Don’t Repeat Yourself),
Simple, a Proper algorithm with simple steps.
Ain things
about code quality are –
Efficiency-
It’s covers a variety of things such as the reliability and speed being two
examples.
--Remove
unnecessary code.
--Make use
of optimal memory
--Use the
best data types, variable and key words.
Usability -
When program is more usable it focuses
on the user and how easy and effectively the program can be used in particular
ways.
Portability-
We can code across different systems and OS.
Great
Developer Write maintainable Code They write good , clean code that can be
easily understood, modified, and maintained.
Maintainability
– Maintenance of the program is made better and easier if the program has
things like comments and suitable variable names.
Measuring Code Quality with Test Coverage
Metrics. Regular Code Reviews/Functional Testing Clear Requirements.
Software quality is to use the received results for planning
the budget and schedule, estimating costs, testing and QA, debugging.
A set of metrics include the following methods-
Algorithms analysis,
Number of code lines,
The complexity of a software,
Functional points analysis,
Level of testing.
Number of classes and interfaces.
Why they are extremely using these methods?
Productivity depends on the time you spend on tasks and other
in house activities, To track and increase productivity managers use metrics
identifying and prioritizing emerging issues.
Can use metrics to communicate an issue, report a progress of
a project and improve their workflow. And also can take the decisions during a
development process
Metrics---
Agile Metrics
Security Responses Metrics
Size-Oriented Measurements
Function Oriented Methods
QA metrics
Code Review is nothing but testing the
Source Code. Generally , it is used to find out the bugs at early stages of the
development of software.
With this code review the quality of the
software gets improved and the bugs/errors in the program code decrease.
Best Code Review tools in the Market.
Collaborator- See code changes, identify
defects, and make comments on specific lines. Customer review templates are
unique to collaborator. Build custom review reports to drive process
improvement and make auditing easy.
Review Assistant-----
- Flexible code reviews
- Discussions in code
- Iterative review with defect
fixing
- Team Foundation Server
integration
- Flexible email notifications
Codebrag----
Is a simple light-weight, free and open
source code review tool which makes the review entertaining and structured.
Codebrag is used to solve issues like
non-blocking code review, inline comments & likes smart email notifications
etc.
Gerrit- gerrit is a free web-based code
review tool used by the software developers to review their code on a
web-browser and reject or approve the changes.
Gerrit Provides repository management
for Git..
Is also used in discussing a few
detailed segments of the code and enhancing the right changes to be made.
Codestriker-------- is an open source
and free online code reviewing web application. Using that can record the
issues, comments and decisions in a database which can be further used for code
inspections.
Veracode- is used by the developers in
creating secured software by scaning the binary code or byte code in place of
source code.
Can review a large amount of code and
returns the results immediately.
Review Board
Barkeep/Code review Tool/Reviewable/Peer
Review Plugin.
Top static analysis tools for
java,C++,C# and python:
Veracode
RIPS Technologies
PVS-Studio
Kiuwan
Kritika
Gamma
Code Compare
Package manager----
Package manager or package management
system is a collection of software tools that automates the process of installing,
upgrading configuring, and removing computer programs for a computer’s OS
Package managers are designed to
eliminate the need for manual installs and updates.
Package managers are designed to
eliminate the need for manual installs and updates This can be useful for large
enterprises whose OS are based on LINUX and UNIX systems.
Dependency is a broad software engineering term used to refer
when a piece of software relies on another one.
Dependency checking is a function that is performed to ensure
that all pre-requisites for a given run-time images are present. Dependency
checking software makes it possible to verify that all components.
Dependencies may be checked in a pre-defined order if one
component relies on the next for operations.\this may make it evident where the
code would break down upon execution.
Dependency management tools move the responsibility of
managing third party libraries from the code repository to the automated build.
Typically dependency management tools
use single file to declare all library dependencies , making it much easier to
see all libraries and their versions at once
Package management system is a collection of software tools
that automates the process of installing , upgrading , configuring and removing
computer programs for comport operating system in consistent manner.
Package manager
deals with packages, distributions of software and data in archive files.
Packages contain metadata such as the software name, description of its
purpose, version number , vendor and a list of dependencies necessary for the software run properly.
Package manager are designed to eliminate the need for manual
install and updates. This can be useful for large enterprises whose operating
system are based on Linux and other Unix-like systems
Build tools are programs that automate the creation of executable
application from source code. Building
incorporates compiling , inking and packaging
the code into usable or executable form. In small projects , developers
will often manually invoke the build process. This isn’t practical for large
projects where its very hard to keep track of what need to be build in what sequence and what dependencies there
are in building process. Using an automated tool allows the build process to be
more consistence
Build automation is the process of automating the creation of
a software build and the associated processes including compiling computer
source code into binary code.
Build –automation servers------
On-demand automation such as a user running a script at the
command line.
Scheduled automation such as a continuous integration server
running a nightly build.
Triggered automation such as a continuous integration server
running a build on every commit to a version –control system.
Add sara- compiling binary code, and running automated tests.
Advantages of build automation to software development
projects ------
Eliminate dependencies on key personal
Eliminate redundant
tasks.
Accelerate the compile and link processing
Improve product quality
Minimize bad builds
Save time and money
Build tools are programs that automate the creation of
executable applications from source code. Building incorporates compiling,
linking and packaging the code into a usable or executable form.
JAVA BUILD TOOLS
Ant/Ivy ,Maven ,Gradle ,Sbt ,MSBuild
•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.
Ant with lvy---
Ant was the first among modern build tools. In many aspects
it is similar to make. It has very low learning curve thus allowing anyone to
start using it without any special preparation.
BUILD LIFECYCLE
•A Build Lifecycle is a well-defined sequence of phases, which
define the order in which the goals are to be executed
•The primary(default) life cycle of Maven is used to build the
application, using 23 phases
• Validate
•Initialize
• Generate-sources
• Compile
• Generate-test-sources
•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
Manage packages with Maven
•Maven is a multi-purpose tool
•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
Convention Over configuration is a software design paradigm
used by software framework that attempts to reduce number of decisions that a
developer using the framework is required to make without necessarily losing flexibility.
This phrase essentially means a developer only needs to specify unconventional
aspects of the application. When the
convention implemented by tools matches the desired behavior, it behaves as
expected without having to write
configuration files. Only when the desired behavior deviates from
implemented convention is explicit configuration required .
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 is clearly
defined. There are three built-in build lifecycles:- Default life cycle: default lifecycle handles
your project deployment Clean life ,cycle: handles project cleaning , while clean
the site lifecycle handles the creation of your project’s site documentation
BUILD PROFILE
A build
profile is set of configuration values, which can be used to set or override
values of maven build. Using a build profile, you can customize build for
different environments such as Production v/s Development environments.
Profile are
specified in pom.xml file using its activeProfiles/profiles elements and are triggered
in variety ways. Profiles modify the POM at build time, and are used to give
parameters different target environments
MAVEN BUILD GOAL
When we run phase- all goals bound to this phase are executed
I order. Here are some of the phase and default goals bound to them
·
Compiler:compile – the compile goal from the
compiler plugin is bound to compiler phase
·
Surefire:testCompile is bound to the test
compile phase
·
Jar:jar and war:war is bound to package phase
Dependency management allow to define artifacts version in
order to resolve transitive dependencies when no version is defined. Managing
dependencies is a difficult task once we’ve to deal with multi-module projects.
Maven provides a high degree of control to manage such scenario. Usually we
have a set of projects under a common projects . In such a case we can create a
common pom having all the common dependencies and then make this pom
·
The IOT
·
Artificial intelligent
·
Type script
·
Kotlin
·
Java9

No comments:
Post a Comment