What Can Generics Do For Me?
In .NET v1.0 there were collections, such as the ArrayList for working with groups of objects. An ArrayList is much like an array, except it could automatically grow and offered many convenience methods that arrays don't have. The problem with ArrayList and all the other .NET v1.0 collections is that they operate on type object. Since all objects derive from the object type, you can assign anything to an ArrayList. The problem with this is that you incur performance overhead converting value type objects to and from the object type and a single ArrayList could accidentally hold different types, which would cause a hard to find errors at runtime because you wrote code to work with one type. Generic collections fix these problems.
A generic collection is strongly typed (type safe), meaning that you can only put one type of object into it. This eliminates type mismatches at runtime. Another benefit of type safety is that performance is better with value type objects because they don't incur overhead of being converted to and from type object. With generic collections, you have the best of all worlds because they are strongly typed, like arrays, and you have the additional functionality, like ArrayList and other non-generic collections, without the problems.
Interview Questions on Networking, Part 2
What are the commonly used routing protocols?
Routers add entries to routing table with the help of routing protocols. The commonly used routing protocols are,
Routing Information Protocol(RIP):-
It is used to advertise the current status and information in the routing table, including the routes to the rest of the routers in every 30 seconds.
Open Shortest Path First(OSPF):-
It is used to determine the shortest path, otherwise known as the lowest cost path among the nodes of different networks.
What is a routing table?
A routing table contains the path information for data data packets to reach a particular inter-network. Basically this table consists of the following information,
Network ID, Subnet Mask, Gateway Address, Interface(port), and netric(hops or number of gaps between two internetworking devices).
Routers add entries to routing table with the help of routing protocols.
What is attenuation?
Attenuation is the degeneration or weakening of a signal over distance on a network cable. To avoid attenuation amplifiers or repeaters and short cables are used.
What is TCB(Transmission Control Block)?
A TCB is a complex data structure that contains informations about each connection.
What is silly window syndrome?
It is a problem that can affect TCP performance. This problem occurs when data are passed to the sending TCP entity in large blocks, but an interactive application on the receiving side reads only 1 byte at a time.
What is Beaconing?
The process that allows a network to self-repair networks problems is called Beaconing.
The stations on the network notify the other stations on the ring when they are not receiving the transmissions. Beaconing is used in Token ring and FDDI(Fibre Distributed Data Interface) networks.