Friday, March 1, 2019

Industry practices and tools 2


1. Discuss the importance of maintaining the quality of the code, explaining the different aspects of the code quality

Creating good quality code is important mainly because it will then result in the software being more durable & 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 & maintainability. In order to develop good 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 code that is clear, simple & concise that can be fully maintained which is different. There are many things that can make one’s code of good quality such as correctness, simple, clear & elegant and finally it performs. Some of the much more important things that make code of good quality which are the one’s that going to cover, are efficiency robustness, usability & portability.

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

Weighted micro function points
This is a modern software sizing algorithm invented by logical solutions in 2009 produce more accurate results than traditional software sizing methodologies, while requiring less configuration & knowledge from the end user as most of the estimation is based on automatic measurements of an existing code
Halstead complexity measures
This was developed to measure a program module’s complexity directly from source code, with emphasis on computational complexity. This measures  were developed by the late Maurice. Halstead as a means of determining a quantitative measure of complexity directly from the operators & operands in the modue.
Cyclomatic complexity
This is a software metric used to indicate the complexity of a program. It is a quantitative measure of the number of linearly independent paths through a program’s source code cyclomatic complexity is computed using the control flow graph of the program.
Lines of code
Lines of code per method

3. Identify and compare some available tools to maintain the code quality

Checkstyle
Code reviews are essential to code quality, but usually , no one in the team wants to review tens or thousands lines of code. But the challenges associated with manually code reviews can be automated by source code analyze tool like checkstyle. Check style is a free & open source analysis tool used in software development for checking whether java code confirms to the coding conventions you have established. It automates the crucial but boring task of checking java. It is one of the most popular tool used to automotive the code review process
PMD
This is a static code analysis tool that is capable to automatically detect a wide range of potential bugs & unsafe or non-optimizes code.  It examines java code & looks for potential problems such as possible bugs, dead code, suboptimal code, overcomplicated expressions and duplicated code. Where as the tools such as check style can verify whether coding conventions & standards are respected, PMD focuses more on preemptive defect defection. It comes with a rich & highly configurable of rules that you can easily configure & choose which particular rules should be used for a given projects.
Find bugs
Is an open source java code quality tool similar in some ways to check style & PMD. But with a quite different focus find bugs doesn’t concern the formatting or coding standards but is only marginally interested in best practices.
Sonar Qube
This is to manage source code quality. Sonar was designed to support global continous improvement strategy on code quality within a company and there for can be used as a shared central system for quality management. It makes management of code quality possible for any developer in the team, As a result in recent years it has become a world’s leader continous inspection of code quality management system.


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

They make sure the same version of depends you used in div environment is what is being used in production. No unexpected behaviours. They make keeping your dependencies updated with latest patch, release or majour version very easy.
The purpose of a dependency manager is to allow developers create a consistent and reproduce set of dependencies for their projects. It should be easy to use, have a well defined behavior  and hooks for customization.

5. Explain the role of dependency/package management tools in software development

A package manager or package management system is a collection of software tools that automates the process of installing, upgrading, configuring & removing computer programs for computer’s operating system in a consistent manner. Package managers are designed to eliminate the need for manual installs & updates.

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

[PHP]Composer
Composer is a dependency manager for PHP. Composer will manage the dependencies you require on a project by project basis. This means that composer will pull in all the required libraries, dependencies & manage them all in one place.


Maven [java]
Maven is a powerful project management tool that is based project object model (POM). It is used for projects build, dependencies & documentation. It mainly do follows,
1.   It make a project build easy
2.   It provide uniform build process(maven project can be showed by all the maven project)
3.   It provides project information (log document, cross referenced source, mainly list, depending list, unit test reports)
4.   It is easy to migrate for new feature of maven.
This is a build tool take care of everything for building process. It does
1.   Generate source code(If auto generated code is use)
2.   Generates documentation from source code.
3.   Compiles source code in to jar of zip file.
4.   Install the packaged code in local repository, server repository or central repository.

NuGet (.net)
An essential tool for any modern development platform is a mechanism through which developers can create, shame, and consume useful code. Often such code is bundle in to packages that contain compiled code (as DLS) along with the project that consume these packages.
For .net the Microsoft supported mechanism for sharing code is NuGet, which defines how packages for .net are created, hosted & consumed & provides the tools for each of those roles.
A NuGet package is a single zip file with the .nupky extension that contains compiled code (DLLS) other files related to that code and a descriptive manifest that includes inform like the package version number developers with code to share create packages & publish them to a public or private. Package consumers obtain those packages from suitable hosts, add them to their projects and then call a packages functionality in their project code NuGet itself then handles all of the details.
NPM (js)
Is a package manager for the Node javascript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. It is extremely configurable to support a wide variety of use cases. Most commonly it is used to publish, install, discover and develop node programs.
Bower (js)
Npm & bower are both dependency management tools. But the main difference between both is npm is used for installing node js modules but bower js is used for managing front end components like html, css. Js etc.

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 tool are programs that automate the creation of executable application  from source code. Building incorporates compiling linking and package the code in to a usable for executable form. 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

Build  automation is the act of scripting or automating a wide variety of task that software developers do in their day today activities such as;
1.   Compiling program source code in to binary code.
2.   Packaging a compiled program for distribution.
3.   Running automated tests.
4.   Deploying to production system.
5.   Generating documentation and release note.
As a software developer there are dozen of common tasks that need to be repeatedly completed with projects.
Ex: Preprocessing CSS, Optimizing images, Running tests, Invalidating caches

All of these actions can become tedious if done by hand repeatedly with a bundle tool you can spend a small amount of time automating these sort of tasks. This will help you to focus on the development of your website or app going forward.

9. Compare and contrast different build tools used in industry

Ant/Ivy
Apache Ivy is a transitive package manager. It’s a sub-project of the Apache-ant project, with which Ivy works to resolves project dependencies. An external XML file defines project dependencies & lists the resource necessary to build a project. Ivy then resolves & down resources from an artifact repository either a private repository or one publicly available on the net. Ivy is an ant extension for managing external libraries during the development process giving you a task of adding them to your application build etc. Their some overlap with maven does, but Ivy is much more light weight.
Gradle
Gradle is an open source, advanced general purpose build management system. It is built on ANT, Maven and Ivy repositories. It supports automatic download & configuration of dependencies or other libraries. This allows reusing the artifacts of existing build system. This supports multi-project and multi-artifact builds. Gradle has the nation of projects and tasks.


SBT (Scalar Build Tool)
SBT formergly simple build tool & is a open source build tool for scalar and java projects, similar to java’s maven and Ant. SBT is a modern build tool. While it’s written in scalar and provide many scalar and provide many scalar conveniences, it is a general purpose build tool. SBT is the de facto build tool in the scalar.
MS build
Is the build platform that enables all build activity in visual studio world. This is a build tool that helps automate the process of creating a software product, including compiling the source code, packaging, testing, deployment and creating document.

10. Explain the build life cycle, using an example (java, .net, etc…)

 A build lifecycle is a well defined sequence of phase which the goals are to be executed. Here phase represents a stage in lifecycle. As an example a typical maven build lifecycle consists of the following sequence of phase.
Phase
Description
Prepare- resources
Resources copying can be customized in this phase
Validate
Validates if the project is correct & if all necessary information is available.
Test
Tests the compiled source code suitable for testing frameworks
Package
This phase creates the JAR/WAR package as mentioned in the packaging in pox.xml
Install
This phase installs the package in local/remote maven repository.

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

Maven is a build automation tool for java projects. This is open source project. Maven is very stable & feature-rich providing numerous plugins that can do anything from generate PDF version of your project’s documentation to generate a list of recent changes from your SCM.

12. Discuss how Maven uses conventions over configurations, explaining Maven’s approach to manage the configurations

Maven is a project management & compression tool that provides developers a complete build life cycle framework. Development team can automate the projects build infrastructure in almost no time as Maven uses a standard directly layout and a default build lifecycle. 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 require to place files accordingly & he/she need not to define any configuration in pox.xml. In order to build project maven provides developers with option to mention lifecycle goals & project dependencies. Much of the project management & build related tasks are maintained by maven plugins.

13. Discuss the terms build phases, build life cycle, build profile, and build goal in Maven

Build phase in Maven
When maven starts building a project it steps through a defined sequence of phase & execute goals, which are registered with each phase. A  goal represents a specific task which contributes to the building and managing of a project. It may be bound to zero or more build phase.
Build life cycle in Maven
The sequence of steps which is defined in order to execute the tasks and goals of any maven project is known as build life cycle in maven. Maven 2.0 version is basically a build lifecycle oriented & clearly says that these steps are well defined to get the desired output after the successful execution of the build lifecycle.
Build Profile
A build profile is a set of configuration values which can be used to set or override default values of maven build. Using a build profile you can customize build for different environments such as production-v/s development environment. Profiles are specified in pox.xml file using its active profiles elements and are triggered in variety of ways. Profiles modify the POM at build time and used to give parameters different target environments.

Build goal in Maven
A pluging  goal represents a specific task which contributes to the building and managing of a project. It may be bound to zero or more build phases. A goal not bound to any build phase could be executed outside of the build lifecycle by direct invocation.

14. Discuss with examples, how Maven manages dependency/packages and build life cycle

Maven manages dependency
Dependency mediation
Determines what version of a dependency is to be used when multiple versions of an artifact are encountered. If two dependency versions are at the same depth in the dependency tree, the first declared dependency will be used.
Dependency management
Directly specify the versions of artifacts to be used when they are encountered in transitive dependencies. For an example project C can include B as a dependency in its dependency Management section and directly control which version of B is to be used when it is ever referenced.
Excluded dependencies
Any transitive dependency can be excluded using "exclusion" element. As example, A depends upon B and B depends upon C, then A can mark C as excluded.
Cotemporary tools and practices
The growing demand and importance of data analytics in the market have generated many openings worldwide. It becomes slightly tough to shortlist the top data analytics tools as the open source tools are more popular, user-friendly and performance oriented than the paid version. There are many open source tools which doesn’t require much/any coding and manages to deliver better results than paid versions e.g. – R programming in data mining and Tableau public, Python in data visualization. Below is the list of top 10 of data analytics tools, both open source and paid version, based on their popularity, learning and performance.


   R Programming - R is the leading analytics tool in the industry and widely used for statistics and data modeling. It can easily manipulate your data and present in different ways. It has exceeded SAS in many ways like capacity of data, performance and outcome. R compiles and runs on a wide variety of platforms viz -UNIX, Windows and MacOS. It has 11,556 packages and allows you to browse the packages by categories. R also provides tools to automatically install all packages as per user requirement, which can also be well assembled with Big data.

   Python-   Python is an object-oriented scripting language which is easy to read, write, maintain and is a free open source tool. It was developed by Guido van Rossum in late 1980’s which supports both functional and structured programming methods.
Phython is easy to learn as it is very similar to JavaScript, Ruby, and PHP. Also, Python has very good machine learning libraries viz. Scikitlearn, Theano, Tensorflow and Keras. Another important feature of Python is that it can be assembled on any platform like SQL server, a MongoDB database or JSON. Python can also handle text data very well.

   Excel - Excel is a basic, popular and widely used analytical tool almost in all industries. Whether you are an expert in Sas, R or Tableau, you will still need to use Excel. Excel becomes important when there is a requirement of analytics on the client’s internal data. It analyzes the complex task that summarizes the data with a preview of pivot tables that helps in filtering the data as per client requirement. Excel has the advance business analytics option which helps in modeling capabilities which have pre-built options like automatic relationship detection, a creation of DAX measures and time grouping.

15. Identify and discuss some other contemporary tools and practices widely used in the software industry

•Continuous Integration
•Configuration Management
•Test automation
•Issue/bug tracking tools
•Agile methodologies, DevOps





No comments:

Post a Comment