Monday, August 13, 2012

What happens when we "PING"

This is a typical interview question. A basic explanation to answer this question in an interview is provided here.

1. Ping works in Layer 3 of the OSI model which is "Network Layer"
2. Ping uses ICMP protocol
3. It is mainly used to check the connectivity between two devices
4. When we ping from one device to another, giving the destination device's ip, an icmp echo request is sent to the destination. The destination device sends an echo response which is received by the sender. Some times the request might time out or destination unreachable error message might pop up according to different scenarios.
5. As Ping works in Layer 3, the Layer 2 activities like ARP are carried out as usual. (ARP is used by a device to learn the MAC address of a destination device.)

This is just a basic idea on Ping. A detailed and interesting explanationis available here:

http://www.antionline.com/showthread.php?t=237944

Excellent Explanation For Difference Between Verification and Validation Testing

Verification and Validation: Definition, Differences, Details:
The terms ‘Verification‘ and ‘Validation‘ are frequently used in the software testing world but the meaning of those terms are mostly vague and debatable. You will encounter (or have encountered) all kinds of usage and interpretations of those terms, and it is our humble attempt here to distinguish between them as clearly as possible.
Criteria Verification Validation
Definition The process of evaluating work-products (not the actual final product) of a development phase to determine whether they meet the specified requirements for that phase. The process of evaluating software during or at the end of the development process to determine whether it satisfies specified business requirements.
Objective To ensure that the product is being built according to the requirements and design specifications. In other words, to ensure that work products meet their specified requirements. To ensure that the product actually meets the user’s needs, and that the specifications were correct in the first place. In other words, to demonstrate that the product fulfills its intended use when placed in its intended environment.
Question Are we building the product right? Are we building the right product?
Evaluation Items Plans, Requirement Specs, Design Specs, Code, Test Cases The actual product/software.
Activities
  • Reviews
  • Walkthroughs
  • Inspections
  • Testing
It is entirely possible that a product passes when verified but fails when validated. This can happen when, say, a product is built as per the specifications but the specifications themselves fail to address the user’s needs.
  • Trust but Verify.
  • Verify but also Validate.

Original Content : http://softwaretestingfundamentals.com/verification-vs-validation/


Non technical stuff  - R. K . Narayan's book reviewed here - http://kavithasownblog.blogspot.in/2014/09/waiting-for-mahatma-book-review.html

XML Interview Questions

1. What is xml
XML is Extensible Markup Language. It uses user defined tags unlike HTML and is mostly used for dynamic webpages where the data is transported and stored in data base

2. Difference between xml and html
HTML is Hypertext Markup Language and it is mainly used for presenting data is different formats. It has predefined tags
XML is Extensible Markup Language. It uses user defined tags and involves transport and storage of data rather than presentation of data

3. What is client side scripting
Client side scripts are usually embedded within a HTML document. Whenever a client requests for a file, it is sent by the web server to the client and then at the web browser (client side) the script is executed and document along with the script output is shown.

4. What is a web server
 The primary function of a web server is to deliver web pages to clients when it is requested using the Hypertext Transfer Protocol (HTTP).

Difference Between TCP and UDP - Best Reference For An Interview

Source : http://www.diffen.com/difference/TCP_vs_UDP

Comparison chart


TCP UDP
Acronym for: Transmission Control Protocol User Datagram Protocol or Universal Datagram Protocol
Function: As a message makes its way across the internet from one computer to another. This is connection based. UDP is also a protocol used in message transport or transfer. This is not connection based which means that one program can send a load of packets to another and that would be the end of the relationship.
Usage: TCP is used in case of non-time critical applications. UDP is used for games or applications that require fast transmission of data. UDP's stateless nature is also useful for servers that answer small queries from huge numbers of clients.
Examples: HTTP, HTTPs, FTP, SMTP Telnet etc... DNS, DHCP, TFTP, SNMP, RIP, VOIP etc...
Ordering of data packets: TCP rearranges data packets in the order specified. UDP has no inherent order as all packets are independent of each other. If ordering is required, it has to be managed by the application layer.
Speed of transfer: The speed for TCP is slower than UDP. UDP is faster because there is no error-checking for packets.
Reliability: There is absolute guarantee that the data transferred remains intact and arrives in the same order in which it was sent. There is no guarantee that the messages or packets sent would reach at all.
Header Size: TCP header size is 20 bytes UDP Header size is 8 bytes.
Streaming of data: Data is read as a byte stream, no distinguishing indications are transmitted to signal message (segment) boundaries. Packets are sent individually and are checked for integrity only if they arrive. Packets have definite boundaries which are honored upon receipt, meaning a read operation at the receiver socket will yield an entire message as it was originally sent.
Weight: TCP requires three packets to set up a socket connection, before any user data can be sent. TCP handles reliability and congestion control. UDP is lightweight. There is no ordering of messages, no tracking connections, etc. It is a small transport layer designed on top of IP.
Data Flow Control: TCP does Flow Control. TCP requires three packets to set up a socket connection, before any user data can be sent. TCP handles reliability and congestion control. UDP does not have an option for flow control
Error Checking: TCP does error checking UDP does error checking, but no recovery options.
Fields: 1. Sequence Number, 2. AcK number, 3. Data offset, 4. Reserved, 5. Control bit, 6. Window, 7, Urgent Pointer 8. Options, 9. Padding, 10.Check Sum, 11. Source port, 12. Destination port 1. Length, 2. Source port, 3. Destination port, 4.Check Sum




We have had enough of technical stuff. Just for a refreshment - Book review of a popular book :)

http://kavithasownblog.blogspot.in/2014/09/one-night-at-call-center-book-review.html