Friday, February 22, 2019

VERSION CONTROLLING SYSTEMS (VCS)


What is the need for VCS? 


Version control systems are a category of software tools that help a software team to manage changes to source code overtime.


Version control helps teams solve many kind of problems, tracking every individual change by each contributor and helping prevent concurrent work from conflicting. Changes made in one part of the software can be incompatible with those made by another developer working at the same time.



Differentiate the three models of VCSs


  • Local version control systems :

      →Oldest VCS
      →Cannot be used for collaborative software development


  • Centralized version control systems :
      →Can be used for collaborative software development 
      →single point of failure that the centralized server                         represents


  • Distributed Version Control Systems :
      →Can collaborate with different groups of people in                      different ways  simultaneously within the same project
      No single point of failure




Git and GitHub, are they same or different?

Git is a revision control system, a tool to manage your source code history. 
➨Focused on version control and code sharing.
➨Primarily a command-line tool.
➨provides a desktop interface named Git Gul.
➨No user management features.

GitHub is a hosting service for Git repositories.


➨Focused on centralized source code hosting.
➨Administered through the web.
➨Desktop interface named GitHub desktop.
➨Built-in user management
So they are not the same thing .
(Git is the tool, GitHub is the service for projects that use Git.)



Compare and contrast the Git commands, commit and push

Git is a distributed version control system
commit: adding changes to the local repository

push: to transfer the last commit(s) to a remote server 
  (git push update the remote repository with your local             changes.)



Discuss the use of staging area and Git directory


staging area

staging area is an intermediate storage area used for data processing during the extract, transform and load (ETL) process. The data staging area sits between the data source(s) and the data target(s).

  • Helps you split up one large change into multiple commit

  • Helps in reviewing changes
  • Helps when a merge has conflicts
  • Helps you keep extra local files hanging around
  • Helps you sneak in small changes
Git directory

This is the most important part of Git, and it is what is copied when you clone a repository from another computer. The working directory is a single checkout of one version of the project. These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify.


Explain the collaboration workflow of Git, with example

A Git Workflow is a recipe or recommendation for how to use          Git to accomplish work in a consistent and productive           manner. Git workflows encourage users to leverage Git       effectively and consistently.

Discuss the benefits of CDNs(CONTENT DELIVERY  NETWORK) 


  •  is a geographically distributed network of   proxy servers    and their data centers.

Improving website load times
➨Reducing bandwidth costs
➨Increasing content availability and redundancy
➨Improving website security
➨Performance: reduced latency and minimized packet loss
➨Scalability: automatically scale up for traffic spikes
➨Reliability: automatic redundancy between edge servers

➨Lower Costs: save bandwidth with your web host


 How CDNs differ from web hosting       servers? 



  1. Web Hosting is used to host your website on a server and let users access it over the internet. A content delivery network is about speeding up the access/delivery of your website’s assets to those users.
  2. Web Hosting normally refers to one server. A content delivery network refers to a global network of edge servers which distributes your content from a multi-host environment.

Identify free and commercial CDNs 

free CDNs 

  • Google CDN
  • Microsoft Ajax CDN
  • jsDelivr
  • jQuery CDN
  • Yandex CDN

commercial CDNs
  • Chrome frame
  • jQuery
  • jQuery UI
  • Prototype
  • Dojo Toolkit

Discuss the requirements for virtualization



virtualization is the process of creating a software-based, or virtual, representation of something,such as virtual applications,servers,storage and networks.It is single most effective way to reduce IT expenses while boosting efficiency for all size bussinesses. 


Discuss and compare the pros and cons of different virtualization techniques in different levels.

Hardware virtualization

➜Hardware virtualization or platform virtualization refers to the creation of a virtual machine that acts like a real computer with an operating system.

OS level virtualization  

➜Remote desktop terminals

Application level virtualization 

➜Runtimes(JRE/JVM , NET)
➜engines


Containerization 

➜Dockers


Identify popular implementations and available tools for each level of visualization 



Storage virtualization
pros

  • less energy use
  • More disk space
  • Cost-effective in terms of not   having to purchase as most     additional software

cons

  • Network system is much more complicated
  • Often violates licensing agreements
  • If one system fails,all are fail


popular tools

  • Tintri VMstore
  • Pure Storage Flash Array
  • Infinio Accelerator
  • Condusiv Technology V_locity





What is the hypervisor and what is the role of it? 

hypervisor or virtual machine monitor (VMM) is computer softwarefirmware or hardware that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is called a host machine, and each virtual machine is called a guest machine. The hypervisor presents the guest operating systems with a virtual operating platform and manages the execution of the guest operating systems.




How does the emulation is different from VMs? 
Virtual machines make use of CPU self-virtualization, to whatever extent it exists, to provide a virtualized interface to the real hardware. 
Emulators emulate hardware without relying on the CPU being able to run code directly and redirect some operations to a hypervisor controlling the virtual container.



Compare and contrast the VMs and containers/dockers, indicating their advantages and disadvantages



VMs
➨Heavyweight
➨Limited performance
➨Each VM runs in its own OS
➨Hardware-level virtualization
➨Allocates required memory
➨Startup time in minutes

Advantages:
  • All OS resources available to apps
  • Established management tools
  • Established security tools
  • Better known security controls
  • Easy maintenance, application provisioning, availability and convenient recovery.
  • Virtual machine can offer an instruction set architecture that differs from real computer's.
Disadvantages:
  • Virtual machine is not that efficient as a real one when accessing the hardware.
  • When multiple virtual machines are simultaneously running on a host computer, each virtual machine may introduce an unstable performance, which depends on the workload on the system by other running virtual machines.
containers
➨Lightweight
➨Native performance
➨All containers share the host OS
➨OS virtualization
➨Requires less memory space
➨Startup time in milliseconds

Advantages:
  • Reduced IT management resources
  • Reduced size of snapshots
  • Quicker spinning up apps
  • Reduced & simplified security updates
  • Less code to transfer, migrate, upload workloads
Disadvantages:

  • Containers don't run at bare-metal speeds.
  • Graphical applications don't work well
  • The container ecosystem is fractured
  • Not all applications benefit from containers.


Friday, February 15, 2019

Compare and contrast declarative and imperative paradigms.

Declarative programming:

is a programming paradigm that expresses the logic of a computation without describing its  control flow.

Imperative programming:

is a programming paradigm that describes computation in terms of statements that change a program state.

Difference between procedural programming and functional programming.  


Functional programming :

is a programming paradigm  a style of building the structure and elements of computer programs that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.



Procedural programming :

  is a programming paradigm, derived from structured programming, based upon the concept of the procedure callThis paradigm helps to structure the code using blocks called procedures,routines,sub-routines,functions, methods.

  •A procedure can implement a single algorithm using the control structures.


 Lambda calculus and Lambda expressions in functional programming.


The lambda calculus is a prototypical functional programming language

  • Higher order function
  • No side effect


Mathematical logic for expressing computation based on   function abstraction and application using variable binding and substitution.

functional language achieve effect by applying functions.


“no side-effects” and “referential transparency” in functional programming.

no side-effects:
In computer science,a function or expression is said to have side effect,if it modifies some state outside its local environment.
In functional programming side effects are rarely used.


  Referential transparency:

Absence of side effects is a necessary, but not sufficient, condition for referential transparencyReferential transparency means that an expression can be replaced with its value.

The importance of referential transparency is that it allows the programmer and the compiler to reason about program behavior as a rewrite system . This can help in proving correctness, simplifying an algorithm, assisting in modifying code without breaking it, or optimizing code by means of memorization,common subexpression elimination.

 key features of Object Oriented Programming



Abstraction : It is the act of representing the essential features without including the background details.

Encapsulation : It is the wrapping of data and associated functions in one single unit.

Inheritance : It is the capability of one class to inherit properties from other class.

Polymorphism : It is the ability for data to be processed in more than one form.

event-driven programming is different from other programming paradigms


Event-driven programming is a program control flow is determined by events, such as sensor inputs or user actions or messages from other programs or threads.


Event-driven programming is the dominant paradigm used in graphical user interfaces and other applications(JavaScript web application)that are centered on performing certain action in response to user input.This is also true of programming for device drivers.


In an event-driven application ,there is generally a main loop that listens for events,and then triggers a callback function when one of those events is detected.In embedded systems,the same may be achieved using hardware interrupts instead of a constantly running main loop.




 Different between compiled languages, Scripting languages, and Markup languages


  • Compiled language : is a programming language whose implementations are typically compilers and not interpreters .

  •  Scripting language : is a programming language that supports scripts—programs written for a special run-time environment that automates the execution of tasks that could alternatively be executed one-by-one by a human operator.

  • Markup language :is a computer language that uses tags to define elements within a document. It is human-readable, meaning markup files contain standard words, rather than typical programming syntax. 

virtual runtime machines


It is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination.

 How the JS code is executed 

Single threaded languages make use of only one CPU at a time, meaning only one thing can happen at a time.

Order of execution in JavaScript is dependent on the following components working together to pass and order information.
  • The Callstack
  • The Event Loop
  • The Task Queue
  • WebAPIs/External Resources

 How the output of an HTML document is rendered, indicating the tools  used to display the output.

example :

html file
<html>
<body>
<h1>Heading </h1>
<p>Hello world</p>
</body>
</html>

Print in webpage
Hello world

Different types of CASE tools


  • Workbenches  :    multiple tools are combined, focusing on specific part of SDLC

  • Environments : combines many tools to support many activities throughout the SDLC


                        framework




framework is a real or conceptual structure intended to serve as a support or guide for the building of something that expands the structure into something useful.

Framework is a collection of libraries, tools, rules, structures, and control, to build software systems


Difference between Framework Library and Plugins



The main difference between plugin and library is that a plugin is an extension that improves the capabilities of an application while a library is a collection of classes and functions that helps to develop a software.


plugin :

A plugin extends the capabilities of a larger application.


A plugin is a software that adds additional features to an application. 

Library :

 A library is a collection of subroutines or classes used to develop software. I think any component that instantiates its own database falls outside the scope of a library.

(set of classes and functions that are used by a computer program. )


 Difference between JDK and JRE

JDK : 
is the Java Development Kit, the full-featured SDK for Java. It has everything the JRE has, but also the compiler .
JRE :
is the Java Runtime Environment. It is a package of everything necessary to run a compiled Java program, including the Java Virtual Machine (JVM), the Java Class Library, the java command, and other infrastructure.