profile for Gajendra D Ambi on Stack Exchange, a network of free, community-driven Q&A sites

Wednesday, February 14, 2018

Testing ipv4 connecting in powershell

So we often need to test an ip while automating,be it connecting to vmware vcenter or an esxi host. you can however use the test-connection


1
2
3
4
5
6
7
8
 C:\Users\batman> test-connection 11.73.111.51

Source        Destination     IPV4Address      IPV6Address                              Bytes    Time(ms) 
------        -----------     -----------      -----------                              -----    -------- 
INENAMBIG1L1C 11.73.111.51                                                              32       149      
INENAMBIG1L1C 11.73.111.51                                                              32       153      
INENAMBIG1L1C 11.73.111.51                                                              32       151      
INENAMBIG1L1C 11.73.111.51                     

The problem with this is that it takes a long time and if your intention is to just get an yes or no ($true or $false) kind of answer this is a waste of your time. So I just cooked up a tiny cookie for us.


1
function test_connection_ipv4($ipv4) { if (test-connection $ipv4 -Count 1 -ErrorAction SilentlyContinue ) {$true} else {$false} }
It returns a boolean ($true or $false). If the ipv4 is good then it returns $true and else $false.

Saturday, February 10, 2018

Javascript - Operators - Unary, Binary and ternary


Javascript - Operators - Relational


Javascript - Operators - Logical


Javascript - Operators - Conditional


Javascript - Operators - Comma


Javascript - Operators - Comparison


Javascript - Operators - Bitwise


Javascript - Operators - Assignment




Javascript - Operators - Arithmatic


Javascript - Operators - typeof



Friday, February 9, 2018

SDLC - Software Development Life Cycle


Let us cut to the chase. These are the high level overview of different stages of SDLC.
  1. Planning
  2. Requirement
  3. Design
  4. Implementation/development
  5. Test/QA
  6. Deploy
  7. Maintenance
A client contacts your company or your boss contacts you the manager of a development team for an application or a website which takes orders from a customers and delivers the product. The product can be anything. Let us assume that the products are cakes.

Planning

We will plan the entire product. It involves the cost, the time allocation to the phases from 2-6. 

Requirements

Get the detailed requirements from the client. some of these are 
  • user registration with physical, mobile and email contacts
  • The customer should be able to select between veg/non-veg cake
  • should be able to sort the cakes based on size and cost.
  • should be able to limit the search based on size x to size y
  • should be able to limit the search based on cost range. cost x to cost y.
  • payment gateway
  • billing with taxation details
  • Business rules (ex:- closing the browser logs out)
and more ..

Design

This involves how the dashboard looks, what color scheme to use. Usually a digital artist who is familiar with tools like adobe photoshop does this for websites. Then someone decides on what programming languages to use, frameworks, database, where will the app be hosted (cloud or on premises hardwaree tc.,), mobile aspects, supported browsers and more.

Development/Implementation

Developers will start developing the code as per the design and requirements. The designers sometimes make improvements in their design or adjustment to overcome technological hurdles. Testers will start writing test cases to see whether the code is performing as they intended it to.

Test/QA

This is one of the most important aspect of SDLC. This sometimes happen along with the development phase where the testers will test the features of the software as and when the development team is done coding it. Let us say when the order is placed the inventory item is not getting reduced by one or the cake is being delivered to the wrong address.

Deploy

Once we are done testing and we are happy enough about it's performance then we will deploy it and deliver it to the client or make itself available for the users.

Maintenance

This is also important. Let us say the userbase increases then the hardware or the platform on which the application is running has to be scaled out or scaled up to accommodate more users. You may also find bugs once it is deployed and it will go to the development team to write fixes for those bugs or the client wants some new features and they have to be developed, tested and added to the application.

There are 2 different approaches or methods in SDLC.
Agile.
waterfall.
We will discuss that some other time.

Information Technology Lingos